code-google-com / bullet

Automatically exported from code.google.com/p/bullet
0 stars 0 forks source link

new btUniformCompoundScalingShape to scale compound shape with convex children #274

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
I implemented a new btUniformCompoundScalingShape which has either a 
btCompoundShape or 
another btUniformCompoundScalingShape as single child, and which applies a 
uniform scaling 
factor to the child shape. This works only if the children of a compound shape 
are convex or consist 
of further compound shapes/btUniformCompoundScalingShapes with this restriction.

The children are not modified, so one can re-use the same compound shape 
several times with 
different scaling factors in a single scene.

The implementation has been tested thoroughly in the case where the compound 
shape does not 
use a BVH tree. I still have to test the BVH tree case.

I hope I didn't forget to upload something which is needed for this patch.

Original issue reported on code.google.com by ol...@arcor.de on 11 Sep 2009 at 10:02

Attachments:

GoogleCodeExporter commented 9 years ago

Thanks, we'll look into it!

Original comment by erwin.coumans on 17 Sep 2009 at 9:07

GoogleCodeExporter commented 9 years ago
Adding my vote for this patch. I have a scenario where I need to generate convex
decompositions for procedurally generated geometry, but there is generally at 
least a
10:1 ratio of instances of the shapes (with different scale/position/rotate) vs.
unique shapes. This would allow me to only store vertices for the unique 
geometry.

Original comment by jhurlima...@gmail.com on 28 Apr 2010 at 7:44

GoogleCodeExporter commented 9 years ago
Actually, I just realized my scenario requires non-uniform scaling along the 
three
axes so this particular solution wouldn't work. Could be useful for other 
scenarios
though.

Original comment by jhurlima...@gmail.com on 28 Apr 2010 at 3:50

GoogleCodeExporter commented 9 years ago
@jhurliman
So your child shapes are mainly btConvexHullShape?

We could make it easier to share such shape (its vertices) using different 
non-uniform 
scaling. Would that help you?

Original comment by erwin.coumans on 28 Apr 2010 at 5:05

GoogleCodeExporter commented 9 years ago
@erwin I'm using convex decomposition, so all of my child shapes are 
btConvexHullShape. 
Being able to share the vertex data for the convex decompositions across 
different 
shapes each with non-uniform scaling is exactly what I'm looking for.

Original comment by jhurlima...@gmail.com on 14 May 2010 at 7:55

GoogleCodeExporter commented 9 years ago
The btConvexPointCloudShape allows to share vertex data, each with different 
non-uniform scaling.

Original comment by erwin.coumans on 7 Apr 2011 at 6:33

GoogleCodeExporter commented 9 years ago
We are now closing old issues that are not going to be fixed anymore. Our focus 
is not on Bullet 3.x at http://github.com/erwincoumans/bullet3

As mentioned, the btConvexPointCloudShape allows to share vertex data, each 
with different non-uniform scaling.

Thanks for the old contribution!

Original comment by erwin.coumans on 11 Sep 2013 at 12:11