# need help to understand maths of parallax bump mapping

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

## 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 on other sites
pleeeeeeeeeeeeeeease :-)

• ### What is your GameDev Story?

In 2019 we are celebrating 20 years of GameDev.net! Share your GameDev Story with us.

• 27
• 16
• 10
• 10
• 11
• ### Forum Statistics

• Total Topics
634101
• Total Posts
3015528
×