//blended cells, wanted to do for ages but couldn't see how #macro mycells(Offset) //this is the cells-based patten we want to blur pigment_pattern { cells translate Offset } /*colour_map { #local f=0; #while ( f <= 1 ) [f rgb .5+.5*] #local f=f+.05; #end }*/ pigment_map { [.25 gradient x+y/2+z/3 sine_wave frequency 3 ] [.25 agate] [.5 agate] [.5 radial] [.75 radial] [.75 granite] } #end #macro blend(V) pigment_pattern { //gradient controlling the blend gradient V phase .001 //cells and gradient don't quite line up, but this completely fixes it!!! I'm a bit freaked out by that //mess with this colour map to reduce blend region colour_map { [.2 rgb 0] [.8 rgb 1] } } cubic_wave #end #declare blendedcells = pigment { blend(x) pigment_map { [0 blend(y) pigment_map { [0 blend(z) pigment_map { [0 mycells(<1,1,1>)] [1 mycells(<1,1,0>)] } ] [1 blend(z) pigment_map { [0 mycells(<1,0,1>)] [1 mycells(<1,0,0>)] } ] } ] [1 blend(y) pigment_map { [0 blend(z) pigment_map { [0 mycells(<0,1,1>)] [1 mycells(<0,1,0>)] } ] [1 blend(z) pigment_map { [0 mycells(<0,0,1>)] [1 mycells(<0,0,0>)] } ] } ] } } //test: sphere { z*5, 2 pigment { blendedcells rotate -10 scale .3 }//turbulence .8 } finish { ambient .3 diffuse 1 } } light_source { <-1,1,-1>*1000, rgb 1 }