How to create and use displacement maps?

It is the coordinate node to get the vector generated by each vertex’s normal in World Space. To simplify, it makes sure that the height map is mapped to be facing the correct direction based on the vertex’s normal (facing) direction.

Hopefully that’s not too confusing.

Eric Ketchum

Thanks for those informations which may be very useful in a very near future for me. :slight_smile:

I’m trying to figure out how to use the constant3vector here in this situation, but I can’t figure out how to use the node to mimic the effect that is trying to be achieved here.

Using the constants like you have shown is a good effect for something minor that I am doing, but the effect is way too jagged. I would like to smooth it out if that is what using the two constant3vectors will do.

If you could please show me an example of how one of these nodes would be set up using this same example I would appreciate that very much. I see that you clear it up a little more for AttemptD but in trying to follow along with that I learned that I can’t use a negative value in any of RGB values. So I don’t understand.

I really like this example too because it’s a simple way to add depth to the terrain.

I am using 4.7.5

Hi DocRogers -

For what you are trying to do I would setup the material as follows with the Displacement map subtraction used to determine the reference plane of 0 in the 0 to 1 height calculations. For instance if you take the Map and subtract 0.25 then you are moving the 0 plane down a quarter of the 0 to 1 so instead of .5 being mid way between 0 and 1 you are telling the mask that 0.25 is halfway. If you are wanting to have more negative space (downs as opposed to ups) then take the number 0.25 and subtract the map from it.

Material:

Also you want to make sure that your displacement map is set up in the texture to be used as a displacement mask. The important things here to change is the Compression settings from TC_Default to TC_VectorDispalcementMap and uncheck sRGB. This will give you much smoother less jagged results.

Texture Setup:

Finally if jagginess is still a problem you may need to up the vertex count of the base mesh before tessellation as tessellation works with the vertices that are already in place the fewer the more jagged your tessellation will be.

Here is a sample project with this setup for you to look at:

Thank You

Eric Ketchum

a) what do you have to select inside of the shader/material that World Displacment is even activated?

I have a material, I can’t connect anything to the World Displacement… it’s just light-grey and I can’t do anything with it.

a) what do you have to select inside of the shader/material that World Displacment is even activated?

I have a material, I can’t connect anything to the World Displacement… it’s just light-grey and I can’t do anything with it.

to be able to access the World Displacement node, you need to go to the main texture result node details (click the node where the World Displacement lives) and go toward the bottom, find “Tessellation” rollout and set the D3D11 Tessellation mode to Flat Tesselation or PN triangles.