Here is the source code for the "baking" of a procedural texture to a UV
map.
It's really slow. Like, really slow. Thankfully you would probably only need
to use it once for a mesh.
I'm pretty sure there is even a better way to do this that involves
declaring each polygon individually, texturing it, translating it to its UV
coordinate position, and then rendering that. That would be much faster
because it could use POV-Ray's internal bounding heirarchy rather than an
O(n) check for each pixel to see which face it lies in; plus there's much
less calculation involved and it would all be done with POV-Ray's internal
code. Unfortunately I didn't think of that until I was halfway done with
this.
- Slime
[ http://www.slimeland.com/ ]
Post a reply to this message
Attachments:
Download 'uvOven.pov.txt' (125 KB)
|