BVH instances support : approaches back

Board: Home Board index Raytracing General Development

(L) [2013/08/29] [ost by spectral] [BVH instances support : approaches] Wayback!

Hi,

What are the different techniques used for supporting instances in BVH ? Is there any paper somewhere about this ? (Mainly on the GPU !)

Thanks
(L) [2013/08/29] [ost by graphicsMan] [BVH instances support : approaches] Wayback!

I haven't been able to find a good source on this.  I looked pretty extensively.  Mostly I think people do the dumb obvious thing, which is to build BVHs over the mesh for the instances and then build a BVH of those.

I'd love to see research on good heuristics for instancing...
(L) [2013/08/30] [ost by ingenious] [BVH instances support : approaches] Wayback!

Ingo Wald's publications from the early 2000's discuss instancing for kd-trees, which is fairly straightforward to extend to BVHs.

@graphicsMan: What do you mean by heuristics for instancing?
(L) [2013/08/30] [ost by spectral] [BVH instances support : approaches] Wayback!

>> ingenious wrote:Ingo Wald's publications from the early 2000's discuss instancing for kd-trees, which is fairly straightforward to extend to BVHs.
Thanks, do you remember which one ?
(L) [2013/08/30] [ost by spectral] [BVH instances support : approaches] Wayback!

I have only find this one : [LINK http://gruenschloss.org/msbvh/msbvh.pdf]
(L) [2013/08/30] [ost by graphicsMan] [BVH instances support : approaches] Wayback!

Hey.  What I mean is this:

Let's say you have a dozen instances of a chair, and they are simply sitting on the ground in a room.  Their bounding boxes do not overlap.  The traditional way of instancing is great, and there will be practically no slowdown from building the acceleration structure over the triangle soup instead.

However, if you have a more complex scene where the chairs are stacked (like lawn chairs stack), all of their bounding boxes will overlap, and the resulting BVH will be really bad.  An example for this that is not at all far fetched would be something like a bunch of nested bowls in a kitchen scene.

By heuristics, I mean is there a way to determine when to use basic dumb instancing, and when to build over their triangle soup instead.  Maybe there are even more options that involve partial instances, etc...  A good way to do these things has not been proposed so far as I know.  If this has been looked at, please post a reference.
(L) [2013/08/30] [ost by jbikker] [BVH instances support : approaches] Wayback!

I use a scheme (not in Brigade2, but some experimental tech) where the top-level BVH is 'abused' for instancing: the leafs of the top-level BVH contain subtree indices. At the point where traversal proceeds from top-level BVH traversal to subtree traversal, a matrix is loaded. This allows for very efficient rigid motion as well as instancing. Of course this does not solve the overlap problem.
(L) [2013/08/30] [ost by graphicsMan] [BVH instances support : approaches] Wayback!

I think that's pretty close to the usual approach I mentioned before.  I think a lot of people use it, and it probably makes for very fast build times.

I'm much more concerned with render time than build time because I may be tracing up to 100s of billions of rays for the lifetime of a single acceleration structure; however, when trees start getting super huge due to instancing, both the build time and the amount of memory required to run the scene do become a significant concern.
(L) [2013/09/06] [ost by spectral] [BVH instances support : approaches] Wayback!

Me too... it is just surprising to find "nothing" when today we try to render so much hair, grass and other kind of instances...
(L) [2013/09/11] [ost by spectral] [BVH instances support : approaches] Wayback!

I use a SBVH (with spatial splitting to improve the traversal performance) and to support instancing I only see 2 methods:

1) Multiples BVH/SBVH
Create 2 BVH, a top-level tree that contains and handle all the instance (pointing to other trees) and several sub BVH, one per object/instance.
It seems to me that it will degrade to performance because on the top-level tree I cannot do spatial split !!

It will degrade the performance mainly when I have a lot of objects and a few instances only.

2) One main tree
Create one SBVH, where each instance is a leaf that contains a simple bounding box, for such leave I will not do any spatial-splitting.
The main problem is that the Instance-Leaf will contains an object_id and I should be able to traverse the tree only for this object_id.
But is it possible to do with a SBVH where we have a list of triangle (with duplicates etc...), they are not ordered by object, so it seems I
have to traverse the whole scene... and it will be expensive ?

Or do you have another idea / opinion ?

Thx

back