Normal mapping
-
Upload
yi-lung-tsai -
Category
Software
-
view
105 -
download
1
Transcript of Normal mapping
![Page 1: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/1.jpg)
From texture mapping to parallax mapping — Normal Mapping
Bruce Tsai
![Page 2: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/2.jpg)
Texture Mapping• Add surface texture to 3D model
2
![Page 3: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/3.jpg)
Normal Mapping
• Dot3 bump mapping
• Technique used for faking lighting of bumps and dents
• Only affect shading rather than surface
• An implementation of bump mapping
3
![Page 4: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/4.jpg)
LightingPhong Reflection Model
4
![Page 5: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/5.jpg)
Dot3 Lighting
• Per-pixel lighting
• Dot = Nx * Lx + Ny * Ly + Nz * Lz
5
![Page 6: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/6.jpg)
Bump Mapping• Want more details on
object surface
• NOT want to increase polygons
![Page 7: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/7.jpg)
Bump Map (Height Map)• Invented by Blinn
• Simulate surface displacement yielding modified normal
1. Look up height in height map
2. Calculate surface normal (finite difference)
3. Combine calculated surface normal with geometric surface normal
4. Calculate interaction of new “bumpy” surface with lights in the scene
7
![Page 8: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/8.jpg)
Height MapBlack and white grayscale image
8
![Page 9: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/9.jpg)
Normal Map• Contain modified normal of surface directly
• Lead more predictable results
• (R, G, B) -> (X, Y, Z)
9
![Page 10: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/10.jpg)
Normal Map
10
![Page 11: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/11.jpg)
Two Type Normal Maps• Tangent space
• Store normals relative to surface
• Use on models to be deformed
- Animated character
• Object space
• Store all normals on a unit sphere
• Use on model to be rotated without deformed
- Weapons, vehicle, building
11
![Page 12: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/12.jpg)
Tangent space normal map
Object space normal map
![Page 13: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/13.jpg)
Tangent Space• Pros
• Reuse map
• Tile or mirror map
• Overlay painted details
• Use image compression
• Cons
• Smoothing problems from low-poly vertex normals
• Slower performance
13
![Page 14: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/14.jpg)
Object Space• Pros
• Generate high-quality curvature
• Slightly better performance
• Cons
• Cannot easily reuse map
• Difficult to tile or mirror
• Harder to overlay painted details
• Cannot be compressed well
14
![Page 16: Normal mapping](https://reader034.fdocuments.in/reader034/viewer/2022042607/55a6330c1a28ab7d488b467a/html5/thumbnails/16.jpg)
Reference• www.cs.brandeis.edu/~cs155/Lecture_17.pdf
• http://graphics.cs.williams.edu/papers/SteepParallaxI3D05/
• http://en.wikipedia.org/wiki/Normal_mapping
• http://en.wikipedia.org/wiki/Bump_mapping
• http://www.3dkingdoms.com/tutorial.htm
• http://docs.cryengine.com/display/SDKDOC4/Tangent+Space+Normal+Mapping
• http://gamedevelopment.tutsplus.com/articles/gamedev-glossary-what-is-a-normal-map--gamedev-3893
• http://youtu.be/yHzIx41eiD4
• https://en.wikipedia.org/wiki/Heightmap
• www.falloutsoftware.com/tutorials/gl/normal-map.html
• www.bencloward.com/tutorials_normal_maps1.shtml
• http.developer.nvidia.com/CgTutorial/cg_tutorial_chapter05.html
• https://en.wikipedia.org/wiki/Phong_reflection_model