Jump to content
  • Advertisement
Sign in to follow this  
TheSeb

need help to understand maths of parallax bump mapping

This topic is 4851 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi, I have a documentation and i don't understand some points. this is the link : http://www.infiscape.com/doc/parallax_mapping.pdf page 3 in the text:To compute a texture coordinate offset at a point P, the eye vector must first be normalized to produce a normalized eye vector V. The height h at the original texture coordinate To is read from the height map. The height is scaled by a scale factor s and biased by a bias b in order to map the height from the range {0.0, 1.0} to a range that better represents the physical properties of the surface being simulated. For example, a brick wall texture might cover a 2x2 meter area. Also imagine the surface of the bricks and the recessed grout give the surface a thickness of 0.02m. The correct scale factor for this material would be 0.02 / 2 = 0.01. Coupling this with a bias of 0.0 would then remap the height field to a range of {0.0, 0.01}. Using a bias of ­0.01 would remap the range to {­0.99, 0.0}. The average of these two extremes is probably best for most textures. b = s ∙ ­0.5 here : Coupling this with a bias of 0.0 would then remap the height field to a range of {0.0, 0.01}. 1)how we get this new range ? here : Using a bias of ­-0.01 would remap the range to {­-0.99, 0.0}. The average of these two extremes is probably best for most textures. b = s ∙ ­-0.5 2)why do we take -0.01 3)and how do we get the range {­-0.99,0.0} ? 4)how we obtain ­-0.5 in b = s ∙ ­-0.5 ? here : An offset is then computed by tracing a vector parallel to the polygon from the point on the surface directly above P to the eye vector. This new vector is the offset and can be added to To(To : Texture Origin for the coordinates) to produce the new texture coordinate Tn. Tn = To + ( hsb ∙ V{x, y} / V{z} ) 5)why do we divide V(x, y) by the z component ? [Edited by - TheSeb on August 5, 2005 7:18:57 PM]

Share this post


Link to post
Share on other sites
Advertisement
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!