POV-Ray : Newsgroups : povray.unofficial.patches : Transforming an object without transforming its texture : Re: Transforming an object without transforming its texture Server Time
2 Sep 2024 14:16:04 EDT (-0400)
  Re: Transforming an object without transforming its texture  
From: Chris Huff
Date: 18 Apr 2000 17:27:30
Message: <chrishuff_99-1739C1.16301818042000@news.povray.org>
In article <qqm### [at] schlattfmiuni-konstanzde>, Thomas 
Willhalm <tho### [at] willhalmde> wrote:

> IMHO it would be more "clean" to introduce a way to invert a 
> transformation.
> As far as I know, the inverse matrix is already calculated internally.
> (The struct TRANSFORM has the two members "matrix" and "inverse".) 
> So, the implementation should be easy.
> 
> Then you would get the desired effect like this:
> 
> #declare Trans = transform { translate .. rotate .... }
> #declare InvTrans = transform { invert_transform Trans }
> object { ... texture { ... transform{InvTrans} } transform {Trans} }

While I agree that something like this would be useful(as a matter of 
fact, I have been considering it for my next project), I don't see how 
it helps in pretextured objects. If your example is used, you don't even 
need inverse_transform, you could write it like this:

#declare Trans = transform { translate .. rotate .... }
object { ... transform {Trans} texture { ... } }

However, many times, an object is composed of many parts with different 
textures, your solution requires that everything be #declared and 
assembled separately.

Really, I think a way to access CSG sub-objects and their 
textures/transformations/interiors/flags through a dot notation would be 
the best and most elegant way to do things. MegaPOV has taken some steps 
toward this already. Some way to attach variables and macros to objects 
would also be very useful.

-- 
Christopher James Huff - Personal e-mail: chr### [at] yahoocom
TAG(Technical Assistance Group) e-mail: chr### [at] tagpovrayorg
Personal Web page: http://chrishuff.dhs.org/
TAG Web page: http://tag.povray.org/


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.