Download

Heightmap distance field only works when there is another object that affects distance field.

Hello,
I’m experimenting with landscapes right now, and I tried using heightmap for distance field. It did not work. After some more tweaking I noticed that it only works if there is another object in scene affecting field.
So now I wonder if it’s working as intended, or if I missed some option that turns on heightmaps distance field mesh, but then again, why does it work when there is another object? I’d love some clarification on that matter.
Cheers

EDIT: It seems to be related to fact that I use projected grid shader on plane that I want to test distance from landscape on, but I have no idea why it does work this way.

EDIT2: Or not, I tested few things and it looks like it’s something wrong with mesh itself, even without projected grid shader.

b37a003d22.jpg
My projected grid ocean plane, with same mesh with simple DistanceToNearestSurface/1000 -> Diffuse shader to the right.

5f071c9aaf38e08a062ad592679fc761342e13af.jpeg
Same scene after I add simple primitive cube.

thats because Landscape dont have distance field as far as i know you could combine it with the DepthFade node witch works for Landscape and SM !!

hoope this helped you