How does displace map work ?


#1

Good day !
I have a few questions:

  1. How to read 8-bit displace texture made in Maya for example?
  2. What information does one pixel provide?
  3. How to calculate maximum displacement of one white pixel in coordinates?
  4. Can 8-bit displacement move vertices below original surface?

#2

there serval ways to do this. i recommend to bake your texture to your vertieces and displace each vertex by its color. or your can do a texture look up to get the color info by its uv coordinate.

(expressions should work faster than in regular script.)

btw. you wont be happy with 8 bit.

greetz
dirk


#3

Thank you for your answer.

I’m helping my friend to make a custom 3d viewer with displacement functionality.
So i was wandering is there any way to know exactly the distance that vertexes will be moved in case of 100% white pixel ?

And what channel store that information?


#4

thats totally up to you, you could shoot the verts through the entire universe. but i guess 64bit systems cant handle that.

:wink:

its only 1 how far one is away is up to you.


#5

Thank you for your reply!

Please correct me if i’m wrong : In baking process Low-Res mesh casts rays onto the Hy-Res mesh. The most distant point gets white/black color. So that means that all data is purely relative and there is no way to know exact distance from the image only ?


#6

Sorry ive no clue what you try to do. Are you talking about an animated mesh? If so it wouldnt make lot of sense. So you made your displacement map out of a highres and now you want to bake this back? Modern computers can handle a huge amonut of vertieces also
at animated meshes.

I wont be able to answer in the near future. I wish you lot of luck in what ever you try to do.


#7

Thank you for your time.

I am simply trying to understand how displacement works.
That way i can help my friend to use it’s functionality.