Displacement texture distance unexpected behaviour

Hi @andy
picking up on a previous problem, I encountered a strange problem with the displacement of the PBR material.
I accidentally came to this after you explained that the default displacement distance was 100mm, which would adjust according to the units.
While I was checking it in meters (small objects), I noticed that the texture behaved differently in the render viewport ( correctly with the 0.1m) and the Raytrace viewport (approximately 0.01m).
Here’s the raytrace view with 0.1:


Here’s the render view with 0.1:
Strangely, when I reduced it to half the decrease on the render was consistent but the one on the raytrace was not.
with 0.05m it looks to go to 0.0125m:

0.1m stays around 0.01m:

0.2m seems to be 0.04:

Starting with a template in millimetres (small objects), the render and the raytrace are consistent.

Here is a Reaytrace example with 100mm:

Let me know if you cannot replicate.
N

Tweaking displacement while Raytraced is running will currently not work, you’ll have to toggle the viewport to a different mode and back to Raytraced to see the correct state. It basically comes down to the fact that displacement in Cycles is actually applied to the mesh before rendering happens. So making changes means the new displacement is being applied to the deformed mesh - the change I get has only the displacement texture info, there is no info about the original mesh. It is on my list to figure out a way to automate that, but until then you’ll have to toggle.

Here a model with unit set to meters. Reference curve is 1 unit from the ground plane, the mesh plane is on the ground. The height between Raytraced and Rendered mode agree:

Tweaking displacement while Raytraced is running will currently not work, you’ll have to toggle the viewport to a different mode and back to Raytraced to see the correct state.

Hi @nathanletwory
yes I noticed that you needed to toggle but that was not the issue.
I started both files from scratch in millimeters and in meters.

I made a few more tests with the same results (see below).

This is the file from scratch in meters render on the left raytrace on the right.

This is the file from scratch in millimeters.

If I convert the millimeter file to meters but not scale it, it stays the same.
But if I convert the millimeter file to meters with scale, it has the same problem.

Puzzling.

Ok, I see now the differences. I don’t know yet why that happens.

Hi @nathanletwory,
I have noticed something on your message and I think I figured where is the bug - when the displacement is below 1 it goes crazy. [update: and it does not go negative]
here is the mm to m file with displacement = 0.5

here is the mm to m file with displacement = 0.99

here is the mm to m file with displacement = 1

Thank you for the extra information.

I already figured out what the problem is, and a fix for it. I logged this as https://mcneel.myjetbrains.com/youtrack/issue/RH-60920, and should be fixed in our repository soon.

RH-60920 is fixed in the latest BETA