POV-Ray : Newsgroups : povray.general : Transforming an image_pattern{} : Re: Transforming an image_pattern{} Server Time
25 Apr 2024 18:01:44 EDT (-0400)
  Re: Transforming an image_pattern{}  
From: Thomas de Groot
Date: 30 May 2018 02:54:48
Message: <5b0e4ab8$1@news.povray.org>
On 29-5-2018 16:01, clipka wrote:
> Am 29.05.2018 um 13:50 schrieb Thomas de Groot:
> 
>> This is not a problem /per se/ if I apply the transformation to the
>> whole texture. However, for reasons I do not want to go into here
>> presently and to simplify the question, I would like to apply the
>> transformation /only/ to the image_pattern{} part of the texture. This
>> seems not to be possible, or am I wrong?
> 
> I would naively expect the following to work:
> 
>      texture {
>        image_pattern { ... }
>        translate <...>
>        ...
>        texture_map {
>          ...
>        }
>      }
> 
> but I suspect you tried that already.

You will laugh, but no. I did not try that :-/ The heat must have addled 
my braincells...

That works of course but...

> 
> The source code isn't immediately obvious about whether this would have
> the desired effect or not, so my naive expectation might be out of touch
> with reality.

the resulting effect is not entirely what I expected but that probably 
is another hurdle I need to take next. Nothing to worry about. New 
testing session in operation now.

> 
> If that doesn't work, I'm pretty sure no other construct will - except
> of course for individually un-doing the transformation for each
> component in the texture map:
> 
>      #local Trans = transform {
>        translate <...>
>        ...
>      }
> 
>      texture {
>        image_pattern { ... }
>        texture_map {
>          [0.0 pigment { ... transform { Trans inverse } ]
>          [1.0 pigment { ... transform { Trans inverse } ]
>        }
>        transform { Trans }
>      }
> 

Yes, that was something I tested, especially for the normal where the 
result was crucial.

Thanks for putting me back on track! :-)

-- 
Thomas


Post a reply to this message

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