POV-Ray : Newsgroups : povray.binaries.images : RTR isosurface clouds screen shot and code (28k jpg) : Re: RTR isosurface clouds screen shot and code (28k jpg) Server Time
1 Aug 2024 08:17:52 EDT (-0400)
  Re: RTR isosurface clouds screen shot and code (28k jpg)  
From: Paolo Gibellini
Date: 16 Oct 2008 04:42:26
Message: <48f6fe72$1@news.povray.org>
Hallo, Sam!
Your code is interesting for static images too, decreasing a bit the 
number of the frames we have strange and interesting lighted clouds.
;-)
Paolo


 >stbenge  on date 15/10/2008 01:40 wrote:
> 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

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.