|
|
Thomas de Groot <tho### [at] degrootorg> wrote:
> On 30-5-2018 1:37, Kenneth wrote:
> > clipka <ano### [at] anonymousorg> wrote:
> >>
> >> #local Trans = transform {
> >> translate <...>
> >> ...
> >> }
> >>
> >> texture {
> >> image_pattern { ... }
> >> texture_map {
> >> [0.0 pigment { ... transform { Trans inverse } ]
> >> [1.0 pigment { ... transform { Trans inverse } ]
> >> }
> >> transform { Trans }
> >> }
> >
> >
> > Thomas, try this example; it *looks* like it works--
>
> The first suggestion by Christoph was correct...
Yes, you're right (although with a slight change.) I had to do some more
experimenting, to see what I did wrong.
EACH index-entry in the texture_map needs the inverse transform, as Clipka
suggested. (I included only one, after your 2nd index-entry.) My way of coding
the entire construct is *slightly* different, though:
#declare MyTex =
texture {
image_pattern {
png "My_pattern.png" gamma 1.0 use_alpha
....
} // end of image_pattern
transform{TRA} // THE MAIN TRANSFORM HERE
texture_map {
[0.0 texture{...} or pigment{...} etc
transform{TRA inverse}
]
[1.0 texture{...} or pigment...} etc
transform{TRA inverse}
]
}
}
Thanks for giving me a 'push' to test this stuff (and to play around with the
use_alpha feature-- it may have some important implications for my 'city
buildings' scene.)
Post a reply to this message
|
|