Fake per-pixel displacement using relief mapping algorithms.
ReliefMapping
Updated: 14 July 2010
Author: jonathan
Compatible Nuke versions: 5.2 or later
Compatibility: Source
This is a shader (Material) which adds per-pixel height-field based "displacement" mapping with normal-map lighting support.
Because this is a relief-map algorithm no actual displacement occurs and the displacement can only go 'in' to, not 'out' of the object.
It works best on flat, closed, convex surfaces (ex. a box) because of the dependency on UV mapping to create the appearance of displacement, and the limited ability to change the outline of the geometry.
TODO:
* The derivation of the shader-space vectors is flaky and should be refined.
* Anti-aliasing...
* Self-shadowing
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.