0 votes

In SpatialMaterial I found the Depth section (In Godot 4.0 Height), but I don't know how to add the image correctly to Godot.
Is a result like this possible?
Heightmap in Materialize

in Engine by (146 points)
edited by

1 Answer

+1 vote
Best answer

Hi,
this looks like parallax occlusion mapping with some sort of conturing.

https://www.gamedev.net/tutorials/programming/graphics/a-closer-look-at-parallax-occlusion-mapping-r3262/

The conturing is the effect that the contur of the object is cut out from the tecture.

Yes, godot has support for pom in its standard spatial shader and you are free to implement it in a custome shader.
But it has no build in support for that conturing-effect and since godot has no easy access to the render pipeline you can not effectivly build this into a shader (you need a backface depth-prepass for that).

To use pom in the spatial shader goto "Depth" and provide a black and white depth texture. Then enable "Deep parallax". Your mesh has to provide binormals to work and it does not work in combination with triplanar mapping.

by (3,928 points)
selected by

Thanks for your good explanation!

I just found a Godot project by Bastiaan Olij at this Github Pr, which can also help me understand what textures are needed and how to set them up.

Welcome to Godot Engine Q&A, where you can ask questions and receive answers from other members of the community.

Please make sure to read How to use this Q&A? before posting your first questions.
Social login is currently unavailable. If you've previously logged in with a Facebook or GitHub account, use the I forgot my password link in the login box to set a password for your account. If you still can't access your account, send an email to webmaster@godotengine.org with your username.