|
|
![]() |
|||
|
How Displacement Shaders Work Displacement shaders are a powerful tool for making interesting and highly detailed photorealistic images. With displacement shaders, people can use PhotoRealistic RenderMan as a modeler. Rough stuff such as the skin of a dinosaur are mostly modeled by applying texture map on flat geometric surfaces. But the displacement shaders are sometimes difficult to use, and this is a shot note about how it works.
First move surface point P to a new position Q. Using factory-provided templates, people can only move P along surface normal vector N, but I think you can move it to anywhere you like by writing custom shaders. Then recalculate the normal vector at the moved point. When the shape of the surface is changed, the surface's tangents and normal vectors must be updated. The new normal vectors will be used by surface and light shaders as the surface shading normal. So the surface is no longer flat. The bump shaders sinply performs calculation at P, but the displacement shaders use Q instead. When the surface is actually displaced, the outline is changed just like in the real life. But sometimes bump is good enough and people want to perform displacement at the same time, is that possible? Yes, but you need a custom template.
|
||||
|
||||
|
||||