Jump to content
STACKER

SFlora - generate a vegetation by mask.

Recommended Posts

Hi,

After some tests and corrections I decided to put it on the open test.

If anyone needs this program, I will repair the remaining errors and also change or add new features if needed.


Program to generate a vegetation by mask.

It can:
1) Import object list from Terrain Builder.
2) Random place objects on area selected by color from sat. mask texture.
3) Generate object by defined random values of size, direction, pitch.
3) Export result as .txt back to TB.
 
Small manual:

1) Create new project. 

2) Import mask image. 

3) In upper menu select "objects database", and fill it with your objects. 
You can import them from TB project. Press import button and select .tml file from \TemplateLibs folder. 

4) Create new color mapping (press button "New color mapping" and name it).  
Select created color mapping item, then double click on map cell (2d mode)), right click on tile and select color. 

5) Add layers to created color mapping. 
Right click on mapped color item and add layers (like Forest), 
select % object fill on this layer. 

6) Setup layer objects. 
On layer press on "0" button and select out objects for this layer. 

7) Press "Generate placement".  
For all map object placement in map view or in 3d view for single tile generation (for quick TB import, testing). 

8) Result for TB import will be generated as .txt in selected output folder. 

 

 

Notes:

"number of tiles" = basically copy this value from TB project. 

color mapping =  color from mask, on with objects will be placed.

go back to the full map view = press 'M' or Backspace

 

Tips:

1) You may need to setup drive path with more free space for ImageMagick cache files: Menu>AppSettings

2) For better performance us bigger number for "Tiles in row count" in project setup. Try to have < 512px tile resolution. 

Example:  You have 36864px source image resolution and tiles in row count 96,  36864 / 96  = 384px.

 

.Net Framework 4.7 requeued. 

 
Discord channel:
 
Link:
ver. 0.9.9.7c
 
Manual:
 
 
l2R83gW.jpg
 
 
 

 
 
  • Like 9
  • Thanks 1

Share this post


Link to post
Share on other sites

How do I properly install this?

 

I get this error when trying to make a new project.

 

error.jpg

Share this post


Link to post
Share on other sites

Hi,

Please send me screenshot of your project setup.

 

 

Share this post


Link to post
Share on other sites
On 7.4.2017 at 11:18 PM, STACKER said:

Hi,

Please send me screenshot of your project setup.

 

 

I just put the files I downloaded in a folder, there is no install instructions. Also, what is localDB server? It sounds kinda dodgy.

Share this post


Link to post
Share on other sites

I get the error when I press save on the Project Setup menu.

 

error.jpg

Share this post


Link to post
Share on other sites

Okay I will try it, but I have tell you that it triggered my anti-virus....

Share this post


Link to post
Share on other sites

Yes it is because the program is not signed.

Share this post


Link to post
Share on other sites

Now the .exe won't even open and windows tells me that I might not have permission to open it.

Share this post


Link to post
Share on other sites

I dunno, let me check.

 

-edit-

 

Yep, Avast was blocking it.

Share this post


Link to post
Share on other sites

Well, now it works past the setup menu at least. Will test further later.

Share this post


Link to post
Share on other sites

I put in all my mapframe sampler details but it resulted in the trees being placed over 12360x12360 when my terrain is in fact 15360x15360.

Share this post


Link to post
Share on other sites
5 hours ago, Cole_ said:

I put in all my mapframe sampler details but it resulted in the trees being placed over 12360x12360 when my terrain is in fact 15360x15360.

Hi, PM me yours project settings.

Share this post


Link to post
Share on other sites

Hi Stacker,

Great job! I was waiting for a new raster based workflow - it really is more convinient for large maps and vegetation.

I am trying to test a new workflow for making forest and I am making good progress, I first used a test map that is a lot smaller, 6,144 x 6,144m. However when I try to use my fullsize terrain settings nothing happens, it is not making the tiles or anything. I am using a half-size (2m/px) mask image, but my settings should be ok I think.. It seems to be stuck in the Initializing phase - high disk and cpu usage though..

 

My settings are 19 tiles in a row, 2048 tile size, 16px overlap, 2m/px res, 18432px size and easting 200000.... Any ideas?

Share this post


Link to post
Share on other sites

Hi,

I will try with your parameters, then I think I can tell you how to fix this problem.

 

 

Share this post


Link to post
Share on other sites

Thanks!

Here are some screenshots btw of vegetation placement on my test map: 

 

 

BTW could you explain the usage logic of your tool - regarding density and such? Was there a pdf manual somewhere, could've swore I saw one but cant find it anymore

  • Like 1

Share this post


Link to post
Share on other sites
8 hours ago, digitalcenturion said:

BTW could you explain the usage logic of your tool - regarding density and such? Was there a pdf manual somewhere, could've swore I saw one but cant find it anymore

 

Sorry, forgot add to archive.

Here link on manual:
https://1drv.ms/b/s!Ao0Oj5mjcuAijN8J0WTIfALl2CDpmg

 

Btw, cool screens. :)

 

To control density you need to play with "obj. count" parameter.
and with "MinDistance" param. for objects placed in selected layer.
For big trees I recommend use ~1 or 2 m.
For smaller bushes 0.5 or 0.1.

 

As overall workflow i recommend to start in TB by setting up objects templates.
Setup min/max random size for each object. group objects by type in different templates.
Then import TB templates to sflora and there adjust MinDistance values.

 

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

×