New to TG, help needed about multiple heightfield handling

Started by alessandro, July 22, 2013, 11:41:15 am

Previous topic - Next topic

alessandro

Hello folks, sorry for this and other newbie questions I may post around here.
I'm learning TG and I'm creating a landscape with two heightfields. I'd like to ask if the way I've setup things is the 'orthodox' one, or I'm doing some mistakes.
Basically I have two heightfields, each with its own color shader (left HF has a red color tone, right HF a green one).
However, I'm not sure how to setup shaders so that each HF retains its own color: if you see in the attached image, the whole terrain (i.e. the two HF's and the planet), get a mixed coloration (red and green are mixed producing a yellowish/greenish mix).
I used a mix shader node but I do not know how to set up the Mix Controller input so that each HF color shader remains separated.
But then, even if that's possible, what colour would the planet get?
Yeah, I'm quite confused....  :-\

Attached the TG screencap and also the experimental .tgd file.
Thanks for any help.

reck

Hi alessandro,

Welcome to Terragen forums. There are lots of experienced and helpful people on this forum who i'm sure will be able to help you. As you probably know TG3 is about to released so a lot of people are focused on that for the moment.


Dune

If you want 2 separate terrains with different color sets, you can mask each by a simple shape shader. If you enter each line as child into a surface shader (no color), and blend this by the respective simple shape shaders, you can add them in the merge shader.


Tangled-Universe

You can "stack" heightfields by connecting the red heightfieldshaders to each other.

In your default scene do the following:
Click on the terrain tab and add another heightfield terrain.
The way this is connected into your node network is "stacked".
Now you can move the terrain next to the other by changing the coordinates in the red heightfield-shader.

Ulco's suggestion to mask one of both terrains with a simple shader is a very good one.
There's likely not a better way.

However...

I would never use 2 completely separate chains for every terrain, especially not if you need to compute the terrain in between again.

It's best habit to have your terrain(s) blended/combined before computing the terrain.
This is especially true if you have powerfractals for displacement and seperate surface shaders for every terrain separated, computed and then merged.
This will create a lot of overhead for the renderer, because the shaders are being called from the planet-node and thus the renderer needs to traverse the entire network for both sides first before merging.

Best habit is to first create, displace and merge the terrains, then compute and then shade/texture.
The default scene reflects this desired approach nicely, though very simplistic.

alessandro

Thanks a lot for this clarification too.

I had already the feeling that I was doing something wrong, i.e. trying to create separate heightfield chains (which BTW is possible as reck explained). So I see, I need to prepare the heightfields, merge those and compute the terrain mesh, and later on do the shading. I think I got a better idea of the TG workflow now :)
I'm coming from the Vue world so I guess I'll need some experimenting to get acquainted to TG. I'll probably bother you guys again... thanks for kind explanations