Original Post
Hello!
I'm currently in the process of writing a simple raytracer I require for a MAX plugin.
Sofar, I'm using a BSP tree for accelerating the raytracing. I'm getting about 25000 raytraces/second in an 80.000 poly scene. Is this good?
I'm currently using FP math for calculation. However, since on a P3 processor int math is about 9 times faster than fp, I'm thinking about rewriting the raytracer to operate entirely with 32bit integers.
Since currently my intersectTriangle() function uses barycentric coordinates to determine if a found ray/plane intersection lies within the boundaries of a triangle (and those coordinates are in the range 0.0 - 1.0), I was wondering if there is a fast and efficient way to calculate a ray/triangle intersection entirely with integer math.
Also, I'm not sure if a BSP tree is an optimal approach of acceleration for the type of raytracing I require. Does anybody here have any links to different acceleration schemes (Octree, or maybe something entirely different)? And I don't mean something general like "build a tree of 8 cubes/level, subdiv until subdiv limit or face limit is reached, then raytest the cubes", but something a bit more specific.
One of the beautiful things about my current BSP builder is that it's freakingly fast, as vivisecting a scene consisting of about 3 million polygons takes just about 2 seconds (including precomputation of the plane equation and the area for each triangle).
I'm also thankful for every other links to raytracing information you could provide.
For eyecandy, this is a picture rendered using my plugin. The raytracer I'm using is responsible for placing the "dirt" you can see accumulating at all the ridges and corners. Using a 15 level bsp tree, this image rendered in about 3mins 20sec.
Thanks alot
Ciao, ¡muh!
[edited by - thebigMuh on September 30, 2002 4:49:41 AM]
For eyecandy, this is a picture rendered using my plugin. The raytracer I'm using is responsible for placing the "dirt" you can see accumulating at all the ridges and corners. Using a 15 level bsp tree, this image rendered in about 3mins 20sec.
Thanks alot
Ciao, ¡muh!
[edited by - thebigMuh on September 30, 2002 4:49:41 AM]