Jump to content
zgmrvn

Surface Painter - a simple toolbox for map makers

Recommended Posts

gRYvV9nogRUN4myV7FRwthMc8ba7bxXZGkglVgRXrDT_-Lw-WugY5Dhbdo9DxDAGUCjS1mKrSU4EdlP4E-uVydWfSTgRLC3krANBF1FzILdVhEQYcHfYff2wd_6Nff1dpgdtbGqn

 

Surface Painter

a simple toolbox for map makers

 

by [CORP] zgmrvn & [CORP] Hashlych

 

 

Current version : 1.1.2

Date : 10/19/2017

 

 

 

Surface Painter is a simple toolbox to help map makers in specific tasks. It's not meant to cover all your needs, the mod currently has very few features but it's open source and meant to be modular, allowing you to create your own modules using the interface, controls and other features like the Object Pool.

 

GitHub : https://github.com/zgmrvn/surface-painter-mod

 

thanks to :

 

features

 

Surface Painter

This tool lets you tweak the surface map directly in Arma using a dll that replicates your actions in an image file.

instructions here : https://github.com/zgmrvn/surface-painter-mod/blob/master/readme.md

Run Arma with Battleye disabled. Take manual backups of your surface map.

 

Object Pool

It lets you define objects that will be used by modules. You can search objects by name and set the spawn probability for each one.

 

Brush

A simple brush tool for random object placement.

 

Edge

Draw lines and create objects along them, can be set to detect terrain and follow it.

 

Export

Allows you to export created objects in your clipboard in a Terrain Builder format.

 

Download

https://github.com/zgmrvn/surface-painter-mod/releases

  • Like 14
  • Thanks 1

Share this post


Link to post
Share on other sites

Very interesting tool! How well do object rotations transfer into Terrain Builder? So far I dont think there has been success getting anything but the direction of an object to import right, pitch and roll has always been messed up.

  • Like 1

Share this post


Link to post
Share on other sites

@HorribleGoat it looks like its ok for object's pitch/bank, however, it appears to be a little mistake that prevents the exported objects to be imported in Terrain Builder. Will be fixed very soon.

Share this post


Link to post
Share on other sites

The problem has been at the Terrain Builders import so even if you export the numbers they may not be correct when imported in to TB. Looking forward for your results though!

Share this post


Link to post
Share on other sites

Oh wow, this is a very nice tool!

The UI/UX immediately sticks out here, which will make working long stretches of time with it not as tiring/frustrating as with similar tools.
And after throwing a quick look at the github link, I am impressed at the modularity of the tool allowed through config. A solid framework that makes me say that this is seriously good engineering seldomly seen. Keep it up!

As I am clubbing my way through almost 50 villages on my terrain I found that assembling fences is always the most time intensive part. Do you have any plans for rapid fencing of areas that includes matched edges and corners?

  • Like 1

Share this post


Link to post
Share on other sites
On 30/08/2017 at 3:04 PM, mondkalb said:

which will make working long stretches of time with it not as tiring/frustrating as with similar tools.

Be carefull since this mod does not has project management functionnalities, you can't save or recover your work...

 

On 30/08/2017 at 3:04 PM, mondkalb said:

As I am clubbing my way through almost 50 villages on my terrain I found that assembling fences is always the most time intensive part. Do you have any plans for rapid fencing of areas that includes matched edges and corners?

First I want to clean the code and refactor few things then i'll look for new features.

 

Silola made a crazy work on what he calls "wall builder" but it's not released and i don't know if it will ever be

 

 

  • Like 1

Share this post


Link to post
Share on other sites

I got a similar error message. I got my Surface.bmp and the right dll files in my Arma directory, but I can't set the Map size or the pixel size. Hhtr1NGjSlGyBUtCQoNW0Q.png

Share this post


Link to post
Share on other sites

Make sure you .dll Files are the right ones, for x32 or x64 and put them as well into the root directory. I had the same error.

Share this post


Link to post
Share on other sites

@Rangooo Hello. Thank you for testing!

I think it's a problem in relation with the DLL. First, check in your .rpt file (localized in: /AppData/Local/Arma 3/<date>.rpt).

You should see a log message saying that Arma has successfully loaded it.

 

CallExtension loaded: corp_tls (.\corp_tls.dll) [0.0.1]

If not, there might be an error message (not a very useful one :/ ) indicating that something goes wrong.

 

Then, check your installation:

  1. Did you copy all DLLs (in accordance to the version of Arma 3 you're using: 32 or 64 bit) into Arma 3 root directory (like: steamapps/common/Arma 3)

  2. Did you launch Arma 3 without BattleEye ?

  3. You can also check if it's not your AV that blocks the DLLs.

 

I wrote the DLL part for the addon, and I know it's not very stable at the moment. But I'm working on it to improve stability and easy way to install/use it.

 

@Jan Phillip It's probably because the DLL can only handles bitmap images for now. The surface map you used might be in an other format (like png I guess). I will work to support others formats later sorry :s

(edit: never-mind, I misread your post. Format is good. Maybe the image size is to big. Are you using 32 bit or 64 bit version ?)

Share this post


Link to post
Share on other sites

So i tried to use the surface painting tools, however my surface.bmp comes out as follows:

 

2zLgnxd.png

 

In further tests it simply generated a corrupted file that no program can open.

Share this post


Link to post
Share on other sites

@-ben- Thank you for testing.

The .dll can only handles 24-bit uncompressed Windows bitmap right now. But I'm working on adding more image formats.

If you are using the right image format, can you please provide me some informations about your system ? (OS, CPU model/type)

I could use informations about your input image as well. (format, compressed or not, size, weight etc.)

  • Like 1

Share this post


Link to post
Share on other sites

Surface Painter v0.1.3

 

The DLLs have changed and are now packed in a single one so you should remove the old ones :

 

x32

corp_tls.dll
libgcc_s_dw2-1
libstdc++-6
libwinpthread-1

x64

corp_tls_x64.dll
libgcc_s_seh-1
libstdc++-6
libwinpthread-1

then copy the new one corresponding to your system.

 

Changelog :

  • scalable pixel, any world size/surface map size ratio is supported (it has nothing to do with image file, still limited to BMP 16k)
  • UI has been reworked
  • module options are now config based and automatically created so it's easier to create and configure modules
  • pixel visualisation optimization

 

WIP features :

  • DLL will handle TIFF LZW as default image format since it happens to be the faster for TB
  • Objects Pool needs to be reworked : UI and more parameter per object, like z-offset, min/max scale, keep horizontal...
  • notification system
  • Like 2

Share this post


Link to post
Share on other sites

Tested the painting with 1.03. 

New DLL

24bit Windows BMP.

 

The image size and scale is correctly identified in the info section of the UI, and it detects all the colours that are on the mask too.

 

However when i press generate there is now a script error: 

 

Error in expression < {
_pixels = [];

{
private _key            = _x select 0;
private _pixel            = _x select 1>
19:41:21   Error position: <select 0;
private _pixel            = _x select 1>
19:41:21   Error select: Type Object, expected Array,String,Config entry
19:41:21 Error in expression < {
_pixels = [];

{
private _key            = _x select 0;
private _pixel            = _x select 1>
19:41:21   Error position: <select 0;
private _pixel            = _x select 1>
19:41:21   Error Generic error in expression

Share this post


Link to post
Share on other sites

sorry, i fix this in a couple hours.

Share this post


Link to post
Share on other sites

Now tested with 1.4

 

Script error is gone, when i press generate it hangs for a bit while it does it's thing and then gives me back control so it appears like it's done something. The last modified date of the surface.bmp is changed so it has accessed the file, but it does not modify the mask for me. Been testing on a very distinguishable area, multiple colours and the file after export always remains unchanged. Tried both normally and launching arma as administrator. :(

Share this post


Link to post
Share on other sites

Surface Painter v1.0.0

 

DLLs have been implemented in the mod directory, so if you have the v0.1.4, you have to delete sp.dll and sp_x64.dll from your Arma 3 directory.

 

added - notification system
enhanced - refactored surface painter tool, it now supports large images, instructions here : https://github.com/zgmrvn/surface-painter-mod/blob/master/readme.md
enhanced - splited modes and extras in modes list (export module is now in the bottom-left corner)

  • Like 2

Share this post


Link to post
Share on other sites

Okay, steps in the right direction! Firstly, idk if this is on all resolutions but when i loaded up (2160 x 1440) the UI the icons for the buttons did not appear correctly.

 

In regards to the surface painting. It is writing to the file properly now, however it has some strange by product. On my mask i have black to represent sand, and since i was using it on a mask for an island there was a lot of black, so i painted some of my materials down as a test, starting with orange which is a soil texture, and carried on then hit generate. It generated and wrote to the file however it converted all of the black in my original mask to orange. I copied a new version of the mask in and tried again, painting yellow down first and sure enough when i generated it replaced all the black in the mask with yellow. So for some reason it is converting black in my mask to whatever colour i first start painting down then.

 

Progress has been made for sure though. :D

 

Also might be helpful to write in the mask readme about what properties the Tiff needs to be saved as: file compression, pixel order, etc.  

Share this post


Link to post
Share on other sites

Hey guys

I'am trying my hardest to get this working but have failed todo so as far(Surface painter). So I can paint pixels on the map no issues and its reading all of the colours from my layers.cfg but when I export it gives me the failed to export msg. is there anyway of diagnosing why this is the case?

using win10, 64bit, 4096 size images at 2.5 pixel/mtr (10240) 

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

×