Planetside Software Forums

General => Terragen Discussion => Topic started by: Feyszar on February 28, 2013, 07:55:14 AM

Title: Fake Stone / Smoothing problem
Post by: Feyszar on February 28, 2013, 07:55:14 AM
Hi guys,
I read a lot about fake stone and masking in the forum, but for some reason I still can't figure out why my terrain displacement is still showing up on the fake stones.

So I stacked all my stone shaders into merge shaders and plugged everything into a surface layer at the end of the network.

My network stream is:
Heighfield > Compute Terrain > terrain displacement with PFS > Stone

Before my stone shader, some terrain displacement is done with power fractals, which I want to ignore for the stones.
As far as I understand, "smoothing" always refers to the last computed terrain, right?
So turning on "smoothing" should ignore previous displacements, because the terrain was computed before.

When I turn smoothing on all displacements will be smoothed. Do I get something wrong? ???
Is there any other way to ignore the displacements?

Cheers


Title: Re: Fake Stone / Smoothing problem
Post by: Hetzen on March 02, 2013, 09:10:20 AM
Smoothing should only smooth the heightfield in your network. What might be happening, is that the roughness with smoothing off, is coming from the pixels or fractal detail in your heightfield.
Title: Re: Fake Stone / Smoothing problem
Post by: Tangled-Universe on March 02, 2013, 09:47:26 AM
Smoothing smoothes the terrain in patches with a size similar to the "gradient patch size" in the compute terrain node.

You can try reducing the gradient patch size, but you can expect that the displacements of the fake stones will be altered.

This is because the fake stones are being created/displaced using the "averaged" normals provided by the gradient patch size.
Averaged isn't the most accurate description, but most easy to remember/visualize.
Actually, the gradient patch size in the compute terrain samples normals over the patch size and makes sure that the normals in that patch size don't change too quickly over space. (so that a local 'up' normal will not be neighboured by a tangent/lateral normal, for example)
If they would then you can potentially create intersecting spikes when you strongly displace with smaller scale fractals.

Reducing the gradient patch size allows normals in the terrain to change more quickly and thus the fake stones will be displaced/based on a rougher (in regard to normals) base. This is why you can expect your fake stones to look different after changing the gradient patch size.