It's simpler to do it like this:
texture {
pigment_pattern {
gradient z
// transform gradient without affecting patterns in the texture_map
scale 2
translate -z
}
texture_map {
[0.45 T_Earth_Day]
[0.55 T_Earth_Night]
}
}
That way you don't need to work out how to undo the transformation.
--
Tek
clipka <ano### [at] anonymous org> wrote:
>
> > texture
> > {
> > gradient z
> > texture_map
> > {
> > [0 T_Earth_Day]
> > [0.45 T_Earth_Day]
> > [0.55 T_Earth_Night]
> > [1 T_Earth_Night]
> > }
> > scale 2
> > translate <0, 0, -1>
> > }
>
> Note that this also scales & translates the individual textures in the
> map; you'd need to do something like:
>
> texture
> {
> gradient z
> texture_map
> {
> [0.45 T_Earth_Day translate z*1 scale 0.5]
> [0.55 T_Earth_Night translate z*1 scale 0.5]
> }
> scale 2
> translate z*-1
> }
>
> (Also note that I removed the texture map entries for 0 and 1, as
> they're not needed if they're identical to their respective "neighbor"
> entries.)
Post a reply to this message
|