0
$\begingroup$

I'd like to create several meshes (e. g. mountains) out of a single height map. I'm currently using the displacement modifier. Is there a way that the displacement modifier would consider transparency or a solid color (e. g. black) and ignores these parts during the conversion? Or at least optimizes these parts during vertex creation?

Simplified example, height map:

enter image description here

The lower rectangular area is an example for transparency.

The generated mesh using the displacement modifier looks like this:

enter image description here

Everything that's transparent (or black, whatever works) should not be considered in the final model.

Is there some kind of automatism or do I have to remove the unwanted vertices manually?

$\endgroup$
2
$\begingroup$

The issue here isn't that it's not ignoring black. It is. (Technically, it's treating it as 0 displacement.) The issue is that the areas that look black to you aren't fully black. Open your image in something like GIMP and click around. You're going to see that some of these pixels that you thought were 0/255 are actually up to 5/255.

enter image description here

If you're doing displacement in nodes, you could do some math editing there, but based on your goal, I bet it's via modifier. You can do a little bit of editing of textures to bury the not-quite-black in Blender by adjusting brightness and contrast, but it screws with your picture in ways you might not like.

enter image description here

Really, the right place to do this is in an image editing app.

Displacement modifier is already reading your alpha as 0 displacement (black), despite the fact that the color underneath the alpha is white. The reason for the border around the alpha, again, is that the rest of it isn't actually fully black.

I would recommend using higher color depth for displacement maps, especially those used at this scale. Try making your image in Blender as a 32 bit, and if this kind of image is all you need, you should be able to paint it directly in the UV editor by switching from View mode to Paint mode.

$\endgroup$
  • $\begingroup$ Thank you, but this doesn't answer my question about how to not have vertices generated either for transparent or fully black areas. $\endgroup$ – Roland Jun 27 '18 at 6:10
  • 1
    $\begingroup$ Displacement does not generate vertices, period. $\endgroup$ – Nathan Jun 27 '18 at 6:35
  • $\begingroup$ @Nathan except, in a sense, in the special case of Cycles adaptive subdivision? $\endgroup$ – Robin Betts Jun 27 '18 at 7:34
  • 1
    $\begingroup$ @Robin No, left has no displacement. The subdivision modifier generates the vertices, independant of displacement. Although vertices beeing generated by displacement dynamically would be great, this is currently not the case in cycles. $\endgroup$ – Leander Jun 27 '18 at 8:45
  • $\begingroup$ @Leander Got it. thanks for clearing that up. $\endgroup$ – Robin Betts Jun 27 '18 at 12:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.