How do I use World Machine erosion flow maps in TG?

Started by Jeff Brown, May 04, 2009, 06:02:39 AM

Previous topic - Next topic

Jeff Brown

I want to mask colours/distributions etc.  It's not exactly rocket science but I can't find an answer to this in the forums.  The making of the maps/masks is not an issue, just how/where to apply them in TG2.

Many thanks

Jeff
morbidorbits

PS - hello to anyone that remembers me  ;D

rcallicotte

So this is Disney World.  Can we live here?

Jeff Brown

Quote from: calico on May 04, 2009, 09:06:14 AM
I don't know that you can do this.

You could in Terragen of old (using SoPack etc) and I am certain you can do it much easier in TG2 - if you know how  ::)

I made heightfield in WM2 with a matching Erosion Flow map bmp.
I want to be able to distribute snow (for example) using the Erosion Flow map.
How do I do this?

I thought I had it sussed using an image shader but it wasn't controlling/masking as required.

Any help would be very much appreciated

Tangled-Universe

You'll have to load the masks into separate image map shaders (create shader -> color shader -> image map shader) and set the projection to plan Y (XZ-axis).

The tricky (and unlogical part for me, still) is to match the map with the terrain. You'll have to adjust the size and coordinates of the projection to fit the terrain. I can't give you straight directions how to do this properly because I personally find it hard to determine which size you'll have to choose and also the coordinates.
What I usually do is loading an image of something colorful and test that in the preview for quick evaluation of scales and positioning.

Once you've figured this out your imagemap shader is ready to be used as a mask. The output of the imagemap shader must then be fed into the blendshader-port of your surfacelayer, powerfractal, etc. etc. Depending of what you want of course.

I'm sorry I can't be very clear on the most important aspect, but this is how you should do it normally.

Martin


Jeff Brown

Martin,

Thanks - I had the 'important part' sussed.  I needed the last part in your response:-

"Once you've figured this out your imagemap shader is ready to be used as a mask. The output of the imagemap shader must then be fed into the blendshader-port of your surfacelayer, powerfractal, etc. etc. Depending of what you want of course."

I will try this now and let you know how I get on.

;)

RArcher

What I do is load the generated .ter file into Terragen 0.9x and check the size there.  Then you can set all your image maps to be the proper size using the number shown.

Take a look here for some picture examples of how to line up some image masks (ignore the parts about generating a terrain etc.) :

http://www.archer-designs.com/tutorials/terragen2/working-with-gis-data/index.html

Jeff Brown

I have been slaving over this for a good while now and the thing that caused me so much pain?  I needed to select 'Flip Y' on the Image Map shader!  It looks like the map has lined up nicely at last.....

Thanks all
:D




Oshyan

It's pretty simple, for future reference (though it seems like you've figured it out now):

In World Machine, get the size of the terrain in meters/kilometers. Load your mask in an Image Map Shader in TG2 and set the size to the same as you found in WM. Set the position to match your Heightfield's position (making sure that the position origin is the same, either left corner or center). Set projection to PlanY. In some cases, as you found, you'll need to flip the image (FlipX or FlipY). You can also tile images here.

To use the image as a "mask", use it as the Density Shader for any other shader, or as the Fractal Breakup input on a Surface Layer (making sure to have Fractal Breakup turned up).

- Oshyan

Jeff Brown

Hi Oshyan,

Why is there a slight difference between the size in World Machine (8,000m) and the size in Terragen 0.9.43 (7,996.096m)?  Does this make any difference?  I haven't noticed any bad misalignment yet.


"To use the image as a "mask", use it as the Density Shader for any other shader, or as the Fractal Breakup input on a Surface Layer (making sure to have Fractal Breakup turned up)."

Also, with the 2 methods of linking up the image map as a mask, are there any differences between using the Density Shader or the Fractal Breakup methods?

Cheers!  I'm liking the results so far - thanks to all of you for turning dreams into reality!

Jeff

Oshyan

The size difference may come down to either a greater accuracy on TG's part (rounding in World Machine), or different interpretation of the pixels and area in the terrain between the two. It might be down to the handling of edge pixels, for example.

Fractal Breakup is specific to Surface Layer nodes and provides more control over the strength of the effect and what it applies to (displacement or not, for example). It interacts in a more complicated way with the "coverage" of the Surface Layer however, so its use may not be entirely intuitive. Essentially, when coverage is at 1 (full), Fractal Breakup does not have an effect. You must reduce Coverage below 1 for it to begin influencing the surface. Coverage of 0.5 and Fractal Breakup of 1 is equivalent to a full influence of the Fractal Breakup on the shader's coverage. The Blend Shader input is available in most other nodes and is more like a basic masking effect.

- Oshyan

latego

Quote from: Oshyan on May 05, 2009, 02:25:42 AM
The size difference may come down to... different interpretation of the pixels and area in the terrain between the two.

I think this is a perfect example of the different Cell registration conventions http://vterrain.org/Misc/cellreg.html. World Machine emits just altitude data; it is up to the target application to handle them. In the 2.x versions, there is a checkbox in the world size dialog which allows to create "+1 terrains" i.e. terrains with 1025 x 1025 size instead of the usual 1024 x 1024. I have always seen .ter files with this +1 sizes, so I assume that TG thinks in terms of terrain mesh vertices.

Bye!!!

DannyG

Question: can I get the the white to scaler for a mask with out painting RGB colors over the flow map? I have to believe this is very easy to do by now
New World Digital Art
NwdaGroup.com
Media: facebook|Twitter|Instagram


bobbystahr

Quote from: RArcher on May 04, 2009, 09:20:42 AM
What I do is load the generated .ter file into Terragen 0.9x and check the size there.  Then you can set all your image maps to be the proper size using the number shown.

Take a look here for some picture examples of how to line up some image masks (ignore the parts about generating a terrain etc.) :

http://www.archer-designs.com/tutorials/terragen2/working-with-gis-data/index.html
That link gives a page not found =but using your search feature I found this:
http://www.archer-designs.com/tutorials/blending-terragen-2-with-gis-data/
something borrowed,
something Blue.
Ring out the Old.
Bring in the New
Bobby Stahr, Paracosmologist

bigben

#14
You can also create variations of the flow map by running it through a colour adjust node (I run every image-based mask through one just in case). I usually use a number of these with different black/white levels to provide different distributions.  e.g. increase the black level to restrict the shader to the floor of a valley. That way it's possible to create a number of variations with a single image map.

I also set the image map to linear as it's easier to predict what the mask will do at specific black/white levels.