POV-Ray : Newsgroups : povray.general : Need help with texture_map : Re: Need help with texture_map Server Time
2 Mar 2024 11:13:46 EST (-0500)
  Re: Need help with texture_map  
From: Josh English
Date: 21 Mar 2023 23:27:30
Message: <641a75a2$1@news.povray.org>
On 3/21/2023 7:13 AM, Chris R wrote:
> Josh English <Jos### [at] joshuarenglishcom> wrote:
>> I solved this problem a couple of years ago with my "Portland Burns"
>> image. The hard drive with all my code died and I can't seem to recreate it.
>>
>> The idea is to create a texture map that allows for a transition between
>> two other textures with a transition zone in-between. A quick sketch:
>>
>> box {
>>     <0, 0, 0>, <1, 1, 0>
>>     texture {
>>         planar
>>         texture_map {
>>           [clock-0.01 Final_Texture ]
>>           [clock-0.01 Transition_Texture ]
>>           [clock Transition_Texture ]
>>           [clock Clear_Texture ]
>> }}}
>>
>> But if I scale this texture or add turbulence on the outer texture, the
>> inner textures are also scaled or transformed.
>>
>> I swear I had pulled this off before but I can't suss it this time.
>>
>> Any suggestions?
>>
>> Josh English
> I generally solve this problem by using a pigment_pattern{} in the outer texture
>   rather than the pattern directly.
> 
> texture {
>      pigment_pattern {
>          planar
>          // apply transformations here
>      }
>      texture_map {
>         [clock-0.01 ...]
>      }
> }
> 
> That way your transformations apply to the planar mapping without distorting the
> textures inside of the texture_map.  I believe you can also apply the
> transformations within the body of the outer texture and it will still only
> apply to the pigment_pattern without altering your inner textures.
> 
> 
> 
> -- Chris R.
> 
> 

I think that's it. It works just like I remembered my Portland Flag 
image. For some reason using pigment_pattern in a top level of the 
texture definition seems, well, wrong.

Thank you.

-- Josh


Post a reply to this message

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