|
|
clipka <ano### [at] anonymousorg> wrote:
>
> 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, it seems that something very similar (identical?) to that construction is
required.
Thomas, try this example; it *looks* like it works-- the image_map or
image_pattern IS transformed, whereas the colors/pattern in the texture map are
NOT (or rather, they are inverse-transformed to bring them back to the original
look. I think!) I made some simplifications to your code, so I could understand
what I was seeing. And the 'use-alpha' feature is something I haven't played
around with, until now.
Aside: In your code example, you have emission at 1.0. Are you actually seeing
any effects of the NORMAL that way? I thought such an emission value would
eliminate the normal's appearance (due to it being a 'lighting-based' effect.)
----
#declare My_scale = 1*<.7,.5,.7>;
#declare TRA =
transform{
translate <-0.5, 0, -0.5>
scale My_scale
}
#declare MyTex =
texture {
image_pattern {
png "My_Pattern.png" gamma 1.0 use_alpha
map_type 0
interpolate 2
// once
} // end of image_pattern
transform{TRA}
texture_map {
[0.0 pigment {rgbft <0,0,0,1,1>}]
[1.0 pigment {
bozo // turbulence 1 lambda 3
color_map {
[0.4 rgb <1,0,0>]
[0.6 rgb <0,1,0>]
}
} // end of pigment
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
} // end of reflection
} // end of finish
transform{TRA inverse}
]
} // end of texture_map
}
box{0,<3,3,.01>
texture{MyTex}
}
Post a reply to this message
|
|