1
$\begingroup$

I've been struggling to get a height map to be displaced in a plane. I'm trying to do what is done so nicely in this answer, and in fact, do it with a variant of the height map in that question, which was also me.

I have now tried 2 approaches with 2 planes, both of which are in the attached file. The planes are UV unwrapped.The first approach was to add a subdivision surface modifier, and a displace modifier with the height map image as its texture.

blender window showing editors for all involved settings

The second approach was with a shader. It plugs the color data from the image texture from the height map into the Y axis of a Combine XYZ node, and then plugs that into a vector displacement node, and from there into displacement on the material output.

enter image description here

Neither method is working. For both planes, Displacement and Bump is selected under Properties > Materials > Settings > Surface. Cycles is the render engine. What is wrong here?

$\endgroup$
9
  • 1
    $\begingroup$ have you been in the Properties panel > Material > Settings > Surface > Displacement, then choose Displacement Only or Displacement and Bump. If it still doesn't work maybe share your file? $\endgroup$
    – moonboots
    Nov 5, 2019 at 10:29
  • $\begingroup$ @moonboots No, I hadn't, thanks. Also there was another problem - the strength in the displacement modifier was set to 1, so nothing was offset. $\endgroup$
    – kim holder
    Nov 5, 2019 at 15:11
  • $\begingroup$ @moonboots But I continue to have problems. I'm going to edit the post and include the file. $\endgroup$
    – kim holder
    Nov 5, 2019 at 15:17
  • 1
    $\begingroup$ Try to set scale of the node around 200-500 to see any displacement. As for modifier approach - use UV map instead of Local coordinates. I don't know why but there is some problem with the last one. $\endgroup$
    – Serge L
    Nov 5, 2019 at 17:35
  • $\begingroup$ @SergeL I was trying to use UV coordinates, and I don't understand why it used local coordinates. Maybe that was the source of the problem in the modifier case, but I was trying to tell it to use UV coordinates, and it never occurred to me it wasn't. $\endgroup$
    – kim holder
    Nov 5, 2019 at 18:37

1 Answer 1

3
+100
$\begingroup$

Everything works fine.

enter image description here

But you forgot to choose a UV for modifier approach

enter image description here

and used a wrong setup for shader displacement.

enter image description here

Also you'd better re-export your height map as OpenEXR or PNG 32 bit otherwise the result shall be jagged.

enter image description here enter image description here

Your example file on developer.blender.org works fine too.

enter image description here

$\endgroup$
1
  • $\begingroup$ Based on a question comment from Serge L, I had already set the Texture Coordinate field to UV, but the effect looked the same as the tiling (flat), and I didn't realize that was due to Strength needing to be adjusted way upwards. I bet I tried sliding it around, couldn't see a visible effect and discarded that. So I really needed a full answer like this one. Thanks. This should help others too as there currently aren't instructions for this out there, that I could find. PS to get a small example file I used low bit depth, but as this is for a game, we are using 16 bit PNG for the source file. $\endgroup$
    – kim holder
    Nov 21, 2019 at 15:33

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .