|
|
Does anyone know of a way to determine the normal of a surface dynamically at
render time? trace() is static/parse time. Attempting to infer from a functions
using the slope pattern doesn't work; its not allowed in pattern syntax and
isn't evaluated dynamically during a render using pigment syntax.
And of course there isn't a f_normal() in functions include.
I created a generic box mapping function that works similar to uv_mapping for a
box and can use box map images made in UV Mapper or alternatively, one of up to
six other pigment functions. It behaves better with cutaway_textures than
uv_mapping for a box, and can be applied to spheres, or other arbitrary shapes.
However, it behaves more like the boxed pigment meaning it is better with mostly
convex objects whereas a proper implementation should take the direction of the
surface normal into account, thereby allowing proper behavior with more concave
objects as well.
I can think of a couple of other uses for having the normal available at
rendertime as well. Any ideas?
--
Batronyx ^"^
bat### [at] cadronhsacom //old & going away
bat### [at] alliancecablenet //new & active now.
http://www.batronyx.com
Post a reply to this message
|
|