February 2019
Intermediate to advanced
292 pages
6h 55m
English
Hark back to Smooth Triangles, when you made triangles appear curved by modifying the normal that was reported to the renderer. It turns out that this technique can be used in a variety of ways, basically “lying” to the renderer so that the surface shading is done with modified normals. Check out the image, showing this technique applied to spheres and a plane.

By attaching a function to the shape (perhaps directly, or maybe via the material), you can have your normal_at function call the attached function to perturb, or add a small vector to, the normal at the given point. In the preceding image, the red sphere uses a sine ...
Read now
Unlock full access