| 
  | 
"Anthony D. Baye" <Sha### [at] spamnomore hotmail com> wrote:
>
> The reason the elements are individually textured is that, though they may use
> the same texture, the orientation of that texture is important w/r/t the
> individual object, and cannot be placed on the whole model.
>
> The problem is that I want to apply a series of overlays to the object as a
> whole, to simulate the effects of age, decals, spray-paint etc...  doing this to
> individual objects would make the csg ten times as complicated - making it
> impossible for me to construct the object procedurally, and use different
> overlays for different situations - and involve complex transformations of
> textures on the micro-level.
>
The texture transformations needn't be complex, internally POV represents them
as just a matrix. You just need to know the transformation for your object, then
you can do transform { ... inverse }.
For example if you're doing a recursive object, just keep track of the
transform:
#macro Object(ParentTransform)
   #local ObjectToParent = transform { rotate 20 scale .2 translate .1*y };
   #local ObjectToWorld = transform { ParentTransform ObjectToParent };
   object {
      TheObject
      texture { LocalTexture }
      texture { GlobalTexture transform { ObjectToWorld inverse } }
      transform { MyTransform }
   }
   // recurse
   Object(ObjectToWorld)
#end
But I agree it would be much nicer if POV could provide a more general solution
for handling layered textures (I'm always annoyed that it doesn't let you layer
over a texture_map).
 
 Post a reply to this message 
 | 
  |