|
The average pigment function is all we need to do this. Lets declare some textures to play with:
#declare basetexture = texture {
pigment {radial frequency 8}
finish{specular 1}}
#declare cleartexture = texture { pigment { rgbt 1 } }
#declare secondtexture = texture {
pigment { granite }
normal { granite } }
Image one shows a simple sphere with basetexture applied, Image two shows the same simple sphere with secondtexture applied to it. I didn't bother rendering anything with cleartexture applied to it, because the image is quite boring.
|
 1. Basetexture applied
 2. Secondtexture applied
|
|
Now we just need to create the texture. The example will give you an animation, of course. You want to plug in a number between 0 and 1 for texture_clock. When texture_clock is 0, the first pigment in the list will be applied, and when texture_clock is 1, only the second pigment will be applied. It's when texture_clock is between the two that something interesting happens.
#declare texture_clock = clock; // 0 to 1
sphere { 0.0, 1
texture { average
texture_map { [(1- texture_clock) basetexture ]
[(texture_clock) secondtexture ] } } }
|
 3. Fade to clear
 4. Fade to granite
|