|
![](/i/fill.gif) |
nemesis <nam### [at] gmail com> wrote:
> The only explanation so far being thrown has been: "we don't want to speed up
> povray's ray-triangle intersections because it would make it much more useful to
> people outside our small geek niche and those people wouldn't be interested in
> using other povray features thus making us feel unloved".
Yes, that's exactly what people have been saying.
Btw, you keep saying that the GPU could be used to speed up ray-triangle
intersection calculations, but what do you base this on?
Raytracers, including POV-Ray, use complex container structures to speed up
ray-triangle intersection calculations (such as octrees or b-trees). This
means that calculating the intersection of a ray and a triangle mesh is
much faster than linear (with respect to the number of triangles). With
most implementations the intersection routine is probably on the order
of O(log n) with respect to the amount of triangles.
How can the GPU be used to speed this up? AFAIK when rendering in the
normal way, GPUs do not prune triangles like that, but instead all you
send the GPU to render is splashed into the screen as-is. The z-buffer
can be used to avoid texturing/lighting/shader calculations on hidden parts
of triangles, but nevertheless *every single triangle* is projected onto
the screen (or, more precisely, rendered onto the z-buffer).
That's one of the reasons why game engines exist in the first place: You
can't send the entire scene to the GPU to be rendered. It would choke. The
game engine prunes the scene to its bare minimum by removing hidden surfaces
(as well as it can) before sending it to the GPU to render. Optimally only
those triangles are sent to the GPU which end up affecting the display
(although in practice getting the optimal result is next to impossible,
at least in real-time, but game engines try to get as close as possible).
Thus much of the pruning is done by the CPU, before the GPU gets to
render anything.
Now, would you kindly explain to me how the GPU can be used to speed up
ray-triangle intersections of a scene with millions of triangles in a
raytracer?
--
- Warp
Post a reply to this message
|
![](/i/fill.gif) |