ive got a single model instancing into the distance at about 30 fps.
Now id like to compose a world made of multiple models.
So, the first thing I need is some kind of instance structure that rays can pass empty space and detect hitting instances least steps possible, whats the best method for transformed instances? Animation isnt the most important thing, but id like it to be quick to create because you need to be able to edit the world.
I bet this is the best forum to ask this question, with all the raytracing gurus here
Thanks for any replies.
I'd go for an octree or a regular grid using a 3d brehsenam ( sp??? ) ray tracing function, i went down this route years ago but due to hardware restrictions it was painfully slow.
If i were you i'd look also into gpu raytracing i saw demos running at 40-50 fps
Yeh, the octree seems like the obvious solution, I just hope I dont blow the memory with all the models loaded into a large texture, to be accessed as they are travelled into.
Im thinking 4096x4096, with this method, itll store about 256 models, and I can employ some lod technique for getting into the distance, i hope thats not too much.
For voxels, definitely go for octree - you won't find better suited acceleration structure for voxels. On the other hand if you're with triangles, you can go either with KD-trees (those created in O(n log n), are quite useful - although still too slow for real time editing), or BVHs/QBVHs - they're a bit faster to create and if you create your BVH on GPU, it can take just a few seconds for power plant.
Ad fps, I can get around 15-30 fps (varies with camera position ofc) in Sibenik on Mobility Radeon 5470 (no magic involved, though viewport is 800x600), and way lot more (basically inmeasurable, it jumps a lot over 100 fps - if I use some 1920x1080 viewport, then in falls to like 30 - 50 fps - varies with different view of course) on Radeon HD 6870 at home. Although I'm using KD-trees, and precomputation of KD-tree takes quite a time (about 3 seconds for Sibenik, when I need rly HQ tree, otherwise I can get under a second, but ray tracing is slower then of course ... acceleration structure creation runs on CPU).
I use BVH and store them on disc with the object, seems ok.
But my renderer is software only at the moment so speed isn't an issue, I don't have any.