displacement amplitude?

Started by Dune, June 29, 2022, 04:51:28 AM

Previous topic - Next topic

Dune

A method I often use to create bushes from trees in more distant areas, is to offset and displace the ground on a separate line after the compute terrain (patch size in this case 10m, which I though was appropriate). But today I found something weird going on. I thought the displacement amplitude is half up, half down, so I used to offset half of the displacement magnitude. But when populating these trees, they were floating.
Am I getting senile? What do I miss?

Kevin Kipper

Does the populated object, the trees, have a value in their Translate setting?  Is there an offset to the actual tree geometry, as in it's not positioned at 0,0,0?

Dune

No, that's not the case. In the fourth jpg you can see what happens if I disable the extra displacement; it's sitting nicely on the ground. It has to do with the amplitude or offset in the PF somehow.

Dune

Here is a very basic test. I still can't figure out why the amplitude is not restricted to the value inserted.

Kevin Kipper

Hi Dune,

Thanks for the example file.

You're correct that the Displacement amplitude value reflects the full distance or range that can be displaced up or down from the lowest displacement to highest displacement as defined by the noise pattern.  I'll revise the online docs to reflect a better description of this.

Here's what the online docs currently say about the offset:
This value is added to the displacement values, offsetting the displacement by a set amount along the displacement direction. Positive values push the displacement out so it looks almost as if it was sitting on a plinth. Negative values will sink the displacement back into the surface. It doesn't reverse the displacement, it's more like creating a hole in the surface and then applying the displacement to the bottom of the hole.

If I'm not understanding what you're after please feel free to elaborate.

Dune

Well, if you have displacement of say 10m, the surface (or instances sitting on that surface) moves up 5m, or down 5m by the fractal noise, half the amplitude. If you offset that amplitude by minus 5m, thus sinking the base first, the highest surface level (or instance 'ground level' or root base), should be at zero (-5+5). The biggest displacement or lowest level being minus 10 (-5 + -5).
But it is not! Highest root levels hover over ground, are thus displaced more that half the amplitude (image 2). That is something I don't grasp. It seems the amplitude is not correct, somehow.

Matt

There is no guarantee that displacement stays within the range you would expect. The more octaves of noise there are, the more likely their displacements will add up to a larger amplitude in some places. So, for example, if you have a large lead-in scale you might find that the region you're looking at is raised or lowered by lead-in octaves. The "variation" parameter can also increase the unpredictability.
Just because milk is white doesn't mean that clouds are made of milk.

Dune

Thanks, Matt. For such use a small number of octaves and low variation would be sufficient, so I'll experiment a bit. Another lesson learned.

WAS

Does compute terrain handling different octave displacement play a role? I notice it does with stuff like intersections. Where up close you have maybe few centimeter of offset, but in the distance on mountains you have meter+ sized spikes?

Dune

I remember you mentioning something like this before, but never dived into it. Maybe a compute terrain isn't even needed in my case, btw.