|
|
Hi,
Nothing massively important here, just a real-time raytracing test
involving volumetric isosurface clouds. There are no light_sources; I
faked lighting by using a texture with an ambient finish. As you can see
in the image, it's possible to get reasonably fast frame rates (when
using more than one core).
For real-time raytracing, POV does not support animating anything but
the camera, which makes things like this impossible unless you "cheat"
by having one object per frame, like frames on a film strip.
I noticed that beta 25 runs faster than 27. I don't know why this is. I
hope the POV Team keeps real-time raytracing as an option!
For those who are interested and have a quick computer, here is the code:
//recommended resolution:
//160x120
//add this to the command line:
//+a0.1 +am2 +r1 +j0.0 +bm2 +kla +rtr
#include"transforms.inc"
#default{finish{ambient 0}}
// distance from one object to the next
#declare step=30;
// number of frames
#declare frames=10000;
#declare V=0;
#while(V<frames)
camera {
right x*4/3
up y
location<V*step,-10,-10>
look_at <V*step, 0, 0>
angle 40
}
#declare V=V+1;
#end
#declare lpos = <1,.5,0>;
#declare lcol = <1,.875,.5>*2;
#declare air = <.1 .2 .5>;
sky_sphere{
pigment{
spherical scale 2 translate y
Point_At_Trans(lpos)
poly_wave 2
pigment_map{
[0 rgb air-.1]
[1 rgb lcol*2]
}
}
}
fog{rgb air fog_type 2 distance 5 fog_alt 1 fog_offset -2}
#declare pf=
function{
pattern{
granite scale 13
translate -20
}
}
#declare hSpeed=.05;
#declare vSpeed=.025;
#declare V=0;
#while(V<frames)
isosurface{
function{
-pf(x-V*hSpeed,y-V*vSpeed,z)+.5
}
accuracy .02 max_gradient 1
contained_by{box{<-12,-1,-12>,<12,1,12>}}
pigment{
function{pf(x-V*hSpeed,y-V*vSpeed,z)} translate lpos*.5
color_map{[.25 rgb(air+.5)/4][1 rgb lcol]}
}
finish{ambient 7.5 diffuse 0}
translate x*V*step
}
#declare V=V+1;
#end
Beware of using this technique! You can run out of memory very easily,
especially when using infinite objects such as planes.
Sam
Post a reply to this message
Attachments:
Download 'rtric.jpeg.jpg' (25 KB)
Preview of image 'rtric.jpeg.jpg'
|
|