Terragen classic material layering

I have exported a 513x513 terragen map and imported the map as 16bit tif in Blender as heightmap for the displacement node in a 15m per point scale,then placed roughly the same camera pos.
For the lighting is used the skytexture with multiscatter.

I tryed to rebuild the coverage and fractal noise.Then the altitude and fuzzy zones for min max alt.
Then the slope min max based on angle with fuzzy zones based of angles
additional a volumetric haze in a box,and a simple cloud layer on a plane

Here a 3 material layers sand,brownish and grass in Terragen v0.9


And the try out in Blender

One problem is that the image texture node with the heightmap needs a interpolation,in this case i selected the cubic.the problem is if someone want to give the heightmap a additional roughness to the map,this in then not possible because we have no image input socket where we could mix in procedual noise as example.And we dont have a seperate cubic interpolation node we could place after the linear Image.

Maybe with a full displacement setup this would be possible.

However goal was to rebuild the material layer system and this seems to work.Next step is to make the layer logic with node groups as simple as possible,Then it should be possible to use basicly the system as masking like the material in Terragen does.

I made a modular “child” node group with menu logic.A is bypass like eg not using Max altitude and B is active then with fuzzy settings.Same A,B with Slope.


You can see that the noise inputs using the same fractal noise like Terragen classic


for fun a render with different sun angle

A new heightmap with only the layer masking nodes für texturing,very classic terragen like with its slope and fuzzy coverage

Here a masking example from one node with min Alt fuzzy and min slope with fuzzy of one layer

I found one missing aspect of the Principled Shader: the approximation of a roughness profile.

If you render an asphalt street, a PBR material with roughness can produce relatively realistic results because the microfacet shading in the Principled Shader is based on an F0 Fresnel approximation. For a flat street, the roughness correlation length is large, and the Fresnel curve can look acceptable in combination with the roughness map.

However, if you look at the side of a reflective street where sand, grass, and other materials are present, you notice that the F90 reflection is much less visible. The reason is the smaller roughness correlation length: the material becomes more diffuse and mainly shows its own color.

This effect is not possible with the Principled Shader out of the box because the Fresnel curve is hardcoded and lacks a roughness- and angle-dependent attenuation model.

In my last render, I implemented such an attenuation of reflections based on viewing angle and surface normal. Without this function, you could not even see the highly saturated terracotta-colored mesa stripes because the default reflection curve is too strong, even at high roughness values.
here you can see the same surface materials of the principled shader out of the box without the angle based reflection attenuation with a IOR of 1.5


can you see the colored stripes?The reflection part is to strong that the transmission part dont show the materials even its roughness is around 0.9


for comparison the attenuation at 0.5.you can see the transmission colors now.still it looks reflective like wet beach sand.

In the final render with the star wars shuttle i used a attenuation of 0.7

If you look at grand canyon or monument valley fotos you can see most oft the time all the colors of the rocks and sands etc.because of the roughness correlation length the material is more diffuse and shows more of the transmission own colors

I think that’s what IOR level is for. Fresnel mimics a perfect surface. Real life isn’t that perfect, and in many cases there are lots of opportunity for light to get trapped and absorbed and not get reflected at all. Zoom in on a square meter of your landscape and compared it to a real closeup; lots of small crevices, pits, and cavities the light will never bounce back to the environment/camera from.

I “lost” the argument with AI, but I would even apply the IOR level trick on metals. It used to in older Blender versions, but currently it has no effect on metal shaders. Yeah, technically it’s a “hack” since metals don’t behave that way, but it’s still a useful hack. Think e.g. sintered metal; there is no way we’ll do proper geometry to do this, where light is actually lost, more so than high roughness can ever achieve.

Yep thats the point.The principled shader uses the Schlick Fresnel approximation based on F0 with curve to F90 with a weight of 1.Nothing wrong with this if the surface is almost perfect flat like car paint.

The principled shader works fine.The problem is that it does not mimic the geometric roughness.

If you have a landscape mesh that has geometry with a detail lvl like the real world then the principled shading would work perfectly,because it would have the roughness from itself with self shadow and geometric bumps which would scatter the light.

Even if we would have a LOD system it would make the shading worse because a LOD uses less texture and mesh detail and has a opposite effect for the shading.

The attenuation i have used is just a hack.A rough diffuse material would have almost a reflection of F0 at all angles around a sphere as example.
The principled shader uses always the approximation curve with its F90 at 1.If you reduce the IOR LvL then you just reduce the reflection amount but not the curve.If you change the IOR you change the F0

The point is that a real rough material its F90 curve gets diffuse and attenuated because of the scattering loss.
The side effect is that the light gets redirected and the surface shows its own color.