|
|
Adapted from my repeating HF generator from:
(http://news.povray.org/povray.binaries.scene-files/26011/)
This uses a function pigment, there is a bit of distortion, but depending on
the pattern, it is nowhere near as noticeable as the spherical camera type,
and it is repeating in both the x and y directions rather than giving the
'banding' that the spherical camera tends to give.
-tgq
//start scene
camera{
orthographic
up y*image_height
right x*image_width
location -z
look_at 0
}
#macro RepeatPattern(Ptrn)//macro to make repeating texture
#macro CMap(C) color_map{[0 rgbt C*<3,3,3,0>+<0,0,0,1>][1 rgbt
C*<3,3,3,0>+<0,0,0,0>]}#end
#local Pat=function{pigment{Ptrn}}
#local FR=function{Pat(cos(x),sin(y),(sin(x)+cos(y))/2).red}
#local FG=function{Pat(cos(x),sin(y),(sin(x)+cos(y))/2).green}
#local FB=function{Pat(cos(x),sin(y),(sin(x)+cos(y))/2).blue}
average
texture_map {
[pigment{function{FR(x,y,z)} CMap(<1,0,0>)}finish{ambient 1}]
[pigment{function{FG(x,y,z)} CMap(<0,1,0>)}finish{ambient 1}]
[pigment{function{FB(x,y,z)} CMap(<0,0,1>)}finish{ambient 1}]
}
scale <image_width,image_height,1>/radians(360)
#end
#declare Ptrn=//use whatever pattern you want here as a pigment
pigment{
bozo turbulence 0.72
color_map{
[0 rgb <1,0,0>]
[1 rgb <0,1,0>]
}
scale 1/2
}
plane{z 0 texture{RepeatPattern(Ptrn)}}
//end scene
Post a reply to this message
|
|