Physics Simulation Forum

 

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
PostPosted: Wed Feb 16, 2011 1:24 am 
Offline

Joined: Wed Feb 16, 2011 1:19 am
Posts: 2
I have a brief question after reading Erwin's SIGGRAPH 2010 presentation on "optimizing proximity queries". I've just finished implementing a simple broadphase obb bounding volume hierarchy using OpenCL and I'm thinking about how to write the tree traversal kernel. What I am wondering about is how you would store the list of collision pairs generated by the intersection tests with leaf nodes during the traversal, considering that OpenCL/CUDA doesn't allow dynamic data structures.

With a pre-order traversal the number of possible intersections for each leaf node is far too large an amount to assign to a buffer. I'm also concerned about the lack of synchronization as each thread proceeds with the traversal and finishes work at different times. The breadth-first approach seems more promising, but it would be launching many threads without any work towards the bottom of the tree.

Thanks very much for any advice on this matter.


Top
 Profile  
 
PostPosted: Wed Feb 16, 2011 8:10 am 
Offline
Site Admin
User avatar

Joined: Sun Jun 26, 2005 6:43 pm
Posts: 3746
Location: California, USA
Kim wrote:
I have a brief question after reading Erwin's SIGGRAPH 2010 presentation on "optimizing proximity queries". I've just finished implementing a simple broadphase obb bounding volume hierarchy using OpenCL and I'm thinking about how to write the tree traversal kernel. What I am wondering about is how you would store the list of collision pairs generated by the intersection tests with leaf nodes during the traversal, considering that OpenCL/CUDA doesn't allow dynamic data structures.

In our prototyping work on CUDA and OpenCL, we pre-allocated a fixed number of pairs for each object (20 pairs for small objects, and more for large objects).

For a more general solution, you could use DirectCompute Append Buffers. Unfortunately, OpenCL doesn't have this feature, even though I regularly asked for this in the OpenCL working group. As a workaround, you could use global atomics, and increment an integer counter as index in the pair buffer.

Quote:
With a pre-order traversal the number of possible intersections for each leaf node is far too large an amount to assign to a buffer. I'm also concerned about the lack of synchronization as each thread proceeds with the traversal and finishes work at different times. The breadth-first approach seems more promising, but it would be launching many threads without any work towards the bottom of the tree.


We are currently doing research in this area, but this is still preliminary unpublished work. Let's cross fingers we get some good results that we can share, later this year.

Thanks!
Erwin


Top
 Profile  
 
PostPosted: Mon Apr 18, 2011 6:21 am 
Offline

Joined: Wed Feb 16, 2011 1:19 am
Posts: 2
Sorry to resurrect this old topic but is the opencl code for the tree traversal actually available to look at somewhere? I'm coming back to this after working on something else and now I can't even find the folder for the opencl broadphase test I was looking at before in the bullet src.

Thanks


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group