POV-Ray : Newsgroups : povray.advanced-users : A question of speed : Re: A question of speed Server Time
29 Jul 2024 00:23:19 EDT (-0400)
  Re: A question of speed  
From: Christopher James Huff
Date: 8 Jun 2003 09:56:55
Message: <cjameshuff-B4793C.08481508062003@netplex.aussie.org>
In article <3ee33411@news.povray.org>,
 "Andrew Coppin" <orp### [at] btinternetcom> wrote:

> But essentially, the overall lighting of the map is recomputed radiosity (at
> fairly low res). Now, what does a raytracer do that means a graphics card
> can map a dozen textures onto several hundred polygons and animate it at 30
> FPS while a raytracer takes seeveral seconds for a scene with a single
> sphere?

It actually simulates the light travelling through the scene. And modern 
hardware can render a sphere + light source at a decent framerate.


> The only answer I've ever come across (and correct me if this is no longer
> true) is that ray intersection tests take up as much as 90% of the
> calculation time.

They can. Texturing calculations also account for a lot, especially with 
the more complex procedural textures, but the main reason raytracing is 
slower is that it traces the rays of light through the scene instead of 
projecting triangles onto an image plane and "painting" them onto the 
image with an image map stretched across them.


> (3D hardware uses Z-buffers and elaborate coherence
> techniques to ensure it can operate on just the polygons that are visible on
> each line, if I'm not mistaken.) So if you wanted to make a raytracer go
> faster, reducing the number of ray intersection tests would be the place to
> start, yes?

Correct. You can also reduce the time taken for intersections, for 
example by replacing a slow isosurface with a mesh. And you can bound 
expensive-to-calculate objects with simpler objects like boxes or 
spheres: if the ray doesn't hit the bounding shape, you know it can't 
hit the real shape so you can just skip those computations. You can then 
bound a group of these bounding shapes with another single bouding 
shape, ending up with a tree structure that eliminates a great number of 
unnecessary calculations. POV builds such a structure automatically, 
though manual bounding can still give better results in some cases.


> Is that or is that not what POV-Ray's vista buffer and light buffers are
> designed to do? And would I be right in thinking that these don't apply to
> reflection and refraction?

Correct. These techniques are useful when you have a lot of rays from a 
known location. Reflections and refractions spawn rays from anywhere in 
the scene, so they can't be optimized in this way. The bounding tree 
works no matter where the ray comes from, though.

-- 
Christopher James Huff <cja### [at] earthlinknet>
http://home.earthlink.net/~cjameshuff/
POV-Ray TAG: chr### [at] tagpovrayorg
http://tag.povray.org/


Post a reply to this message

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