|
 |
Nieminen Juha wrote:
> Ok, here it is. This should be faster than the gradient-version:
>
> #macro Squares(p1,p2,p3,p4)
> checker
> pigment
> { checker pigment { p1 }, pigment { p2 }
> scale <.5,1,1>
> }
> pigment
> { checker pigment { p4 }, pigment { p3 }
> scale <.5,1,1>
> }
> scale <1,.5,1>*2
> warp { repeat 2*x }
> #end
>
> #declare P1=pigment { rgb x }
> #declare P2=pigment { wood turbulence .5 scale .4 }
> #declare P3=pigment { granite scale .5 }
> #declare P4=pigment { rgb z }
> camera { location -z*7 look_at 0 }
> plane
> { -z,0 pigment { Squares(P1,P2,P3,P4) }
> finish { ambient 1 }
> }
>
I won't continue the competition for speed nor really test this,
but it seems to me that checker is a 3D pattern, moving
in the three axes...
Or I just misinterpret the warp... I think you would need more
warp statement for y and z !
I'm far too incompetent with patterns included in other patterns
(I'm at a complete loose to understand where to apply correctly
a translate or scale to a pattern to do exactly what I think),
but does the warp repetition only apply to the outside pattern or
also at the computation of the internal pattern ?
If the second, then a paving of wood tiles would really be boring
and unrealistic. (but there is also this reset_child thing to look
at)....
For my patch, it is available and everybody is free to take it.
I would be please to see it in SP (or even better in the official!),
but I do not want to bother anyone and delay any releases...
(I would dreams simply of a 3.1g based SP with all the UV and photon,
and iso things...)
Post a reply to this message
|
 |