POV-Ray : Newsgroups : povray.advanced-users : A question of speed : A question of speed Server Time
29 Jul 2024 00:23:06 EDT (-0400)
  A question of speed  
From: Andrew Coppin
Date: 8 Jun 2003 09:03:13
Message: <3ee33411@news.povray.org>
Right, well here's a question I bet none of you have ever been asked
before...........................

..............Why is raytracing so slow?

OK, so on the surface I know it probably sounds daft, but think about it...
They have graphics cards that can render polygon meshes in realtime - meshes
with just downright silly numbers of polygons in them - so why does it take
a raytracer a few whole *seconds* to render a single sphere with 1 light
source? OK, OK, because it's in software, not hardware, I know... but I
played Quake II for years without hardware acceleration. (Poor deprived
student... *sniff*) So I say again, WHY is raytracing slower?

Obviouse answer #1 is that the results are higher quality. For something
like Quake (insert Half Life, Unreal, Alien vs Predetor, etc. instead if you
prefer) all the game needs to do is work out where each polygon fits on the
screen, calculate lighting (without shaddows - at least *I* have never seen
a game with shaddows!) and map a texture onto it. With hardware acceleration
it usually does texture smoothing too. And perhaps even edge antialiasing.
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?

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. (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?

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?

Thanks.
Andrew.

PS. If the above text doesn't appear to have a particular POINT to it...
what can I say? I need more sleep!


Post a reply to this message

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