Planetside Software Forums

General => Terragen Discussion => Topic started by: fferro on March 26, 2009, 01:28:23 PM

Title: merge heightfields with and without fractal detail - How to?
Post by: fferro on March 26, 2009, 01:28:23 PM
What I need is a terrain showing fractals at the distance and not near the camera.

(http://f.imagehost.org/0749/mergeShader.jpg)

Left part shows a preview of two heightfields (both with the same DEM file) merged with a Distance from Camera shader.
The first hast Fractal Detail on and the second off.
The Distance from camera has correct settings, (I can see the mix zone inside this point of view).
The right side of the image shows the terrain with fractals only.
The center part of the image shows the Distance from Camera Shader settings:
Mix Controls > Mix to A: 0.5
Choose by Altitude: All
Merge Mode > Colour Merge Mode > Mix(Normal)
Merge Mode > Displace Merge Mode > Mix(Normal)

What would be the right parameters to the merge shaders, or the right way to mix the heighfields?
Thanks
Fernando
Title: Re: merge heightfields with and without fractal detail - How to?
Post by: cyphyr on March 26, 2009, 01:39:49 PM
I think your principle is right, its just that its problematic with heightfields, the fractal detail is either there or not. Could you not just use a normal power fractal for your added detail rather than a second heightfield?
If you just add a power fractal after the "Heightfield without Fractal Detail" and set its displacement and scale low enough would that not do the trick?
Sorry I don't use heightfields much but that would work under most normal circumstances.
good luck
richard
Title: Re: merge heightfields with and without fractal detail - How to?
Post by: Matt on March 27, 2009, 01:26:39 AM
That should work. The only problem is that the distance might be calculated to the original position on the undisplaced planet, rather than where the position ends up after the heightfield has raised the surface. Try testing with smaller distance values and see if you can force it show the fractal detail in the distance, then adjust from there.

Matt