From: Martin R. <ma...@MP...> - 2004-10-12 19:19:39
|
Hi! > Another thing about the triangle mesh: I thought about splitting up huge > triangle meshes into several smaller ones for speeding up the ray > intersection test (I'll implement a fast rejection test in the mesh as well, > but a object hierachy approach would additionally be good for huge > meshes). Both method will be very necessary for large meshes. > On the other hand it would be nice to share one data structure for the > mesh between the sub meshes. Ideally, a shape would have some > interface to the hmaker so that they can work together on building > an appropiate object hierachy. Did you spend some thoughts on > something like this already? Yes, and so far it has always given me a headache :) I think it would be very hard (and confusing) to subdivide the mesh in a way that it appears as several objects to the renderer. This approach would let the global hmaker do all the work automatically, but I expect it would be really nasty to write. It's probably better to keep the whole mesh in a single object and build a sort of octtree (or similar) inside it, so that only a small part of the triangles need to be tested. But this certainly needs a lot of thought, and exactly for that reason I was so keen to see Mikael's implementation. I'll let you know if I have an idea. Cheers, Martin |