POV-Ray : Newsgroups : povray.general : Transforming an image_pattern{} : Transforming an image_pattern{} Server Time
23 Apr 2024 01:33:40 EDT (-0400)
  Transforming an image_pattern{}  
From: Thomas de Groot
Date: 29 May 2018 07:50:28
Message: <5b0d3e84$1@news.povray.org>
I keep bumping into a conundrum concerning image_patterns.

I have the following texture block:

//--------------------------------------------------------------
   #declare MyTex =
   texture {
     image_pattern {png "MyPattern.png" gamma 1.0 use_alpha
       map_type 0
       interpolate 2
       once
     }
     texture_map {
       [0.0 pigment {rgbft <0,0,0,1,1>}]
       [1.0 pigment {
              bozo turbulence 1 lambda 3
              color_map {
                [0.0 rgbft <1,1,1,0,0>]
                [1.0 rgbft <1,1,1,1,1>]
              }
            }
            normal {crackle 0.15}
            finish {
              emission 1.0
              conserve_energy
              diffuse albedo 0.2
              specular albedo 0.2
              roughness 0.001
              reflection {
                0.0, 0.2
                fresnel on
                metallic off
              }
            }
       ]
     }
   }
//--------------------------------------------------------------

To get the image_map used in the image_pattern in the right place and in 
the correct orientation, I need to submit it/the texture to the 
following transformation:

//--------------------------------------------------------------
     translate <-0.5, 0, -0.5>
     rotate 90*x
     scale My_scale
     translate -My_scale.z/2*z
//--------------------------------------------------------------

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?

Thanks indeed for any thought on the matter.

-- 
Thomas


Post a reply to this message

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