PDA

View Full Version : Help with 'Tin Stack' in Bullet (Scene file included)



The Wizzard
02-13-2014, 10:38 PM
Hi everyone (that reads this :) )

I'm having a little problem with Bullet in this scene (See below).
I need these 'Tins' to stay standing until they are hit by the sphere and I just can't get them to "Stack" and wait for the ball to hit them.

120166

Now I know what you're thinking - Just use "Start Asleep" But I need them to fall in to place at the start so, That's not an option :(
Also, they won't settle in to a stack, They bounce and fall down. You will also see I'm getting penetration between them.

Is bullet able to work this way or should I try for 'another' physics engine?

Please try my scene, I have Bullet setup, and see if you can get it to work.
SCENE FILE:
120165

ANY help would be greatly appreciated - Cheers.

:thumbsup:

lino.grandi
02-14-2014, 02:08 AM
120167

The main problem with your scene is the scale. Bullet in general doesn't work too well with real scale objects if they are small (that's a general problem in Bullet). We're working on a solution to solve this.
In the meanwhile, the best thing you can do is to use a bigger scale for the simulations. Then it's always possible to bake the simulation using MDD and then scale everything as needed.
About the "Tins", I've replaced the separated objects with a Parts object, with Glue Strength set to 100% and Breaking angle set to 1%.
You should get exactly what you need.
I've created 2 keyframes for the ball to define the vector/direction to launch it.
Of course you can edit them to get more or less strength.
I normally tend to use Convex Pieces (or Box) as Shape where possible. Box and Convex Pieces Shapes tend to generate a more stable solution for the simulation.
I hope this helps!

The Wizzard
02-14-2014, 02:16 AM
Thanks Lino,

While your scene works... My actual scene (This was a test) has 2500 'Tins' and I can't use a Parts model - They need to be separate objects for the detailing :(

I'll have a go at re-making my actual scene again by scaling everything up, using your scene scale.

Results to follow.

3DGFXStudios
02-14-2014, 05:55 AM
You can use parts. If you want to attach a highres model you can add a point with a weightmap assigned to it and use the instancer to instance the highres model to the points.

lino.grandi
02-14-2014, 06:09 AM
You can use parts. If you want to attach a highres model you can add a point with a weightmap assigned to it and use the instancer to instance the highres model to the points.

That's a very nice suggestion.

The Wizzard
02-14-2014, 07:16 AM
I've read something like this before... I need to give it try next.

I've up-scaled every model by 1000% and still running in to issues with Penetrations, Giggle and Collapsing before an impact.

If anyone wants to give it a go - I need a scene with a stack (wall) of 5x5cm cylindrical tins that's at least 30 across and 40 high. Which is hit by a small van driving through it.

Have fun, I'll appreciate any Help|Test scenes|Etc.

Thanks in advance.

lino.grandi
02-14-2014, 08:39 AM
5cm is still too small. Try 50cm. ;)

jeric_synergy
02-14-2014, 10:09 AM
:scratches head: If Bullet is known to have issues with small objects, wouldn't it be possible to have a "Scale" slider that would invisibly scale everything internally for calculation purposes, avoiding forcing the animators to scale everything up in the Scene itself? :stumped:

Seems to be offloading labor onto the user instead of using the (supposedly) labor saving device in front of us.

The Wizzard
02-16-2014, 12:37 AM
At Lino

I have been taking your scene apart and while the basic set up works, I Need far more Tins...

So, I kept all your settings in Bullet (Layout) and simply increased the number 'Tins' in modeller with Copy/Paste... and it fails like my original scene does
- I.E. some of the Tins collapse and penetrate before the impact happens :(

Please have a look at this scene to see what I mean.

120193


120194

lino.grandi
02-16-2014, 01:37 AM
I answered to that already. ;)




The main problem with your scene is the scale. Bullet in general doesn't work too well with real scale objects if they are small (that's a general problem in Bullet). We're working on a solution to solve this.


:scratches head: If Bullet is known to have issues with small objects, wouldn't it be possible to have a "Scale" slider that would invisibly scale everything internally for calculation purposes, avoiding forcing the animators to scale everything up in the Scene itself? :stumped:

Seems to be offloading labor onto the user instead of using the (supposedly) labor saving device in front of us.

- - - Updated - - -

Taking a look now!



At Lino

I have been taking your scene apart and while the basic set up works, I Need far more Tins...

So, I kept all your settings in Bullet (Layout) and simply increased the number 'Tins' in modeller with Copy/Paste... and it fails like my original scene does
- I.E. some of the Tins collapse and penetrate before the impact happens :(

Please have a look at this scene to see what I mean.

120193


120194

lino.grandi
02-16-2014, 01:56 AM
120195

Here it is!

I've changed the shape to cylinder and set the collision margin to 15mm. It works pretty well.

Also try to activate and set the Breaking Distance to 25mm, it may help in some situation.

I hope this helps! Please let me know! ;)

The Wizzard
02-16-2014, 02:33 AM
Thanks you, Good job...

The Wizzard
02-16-2014, 02:47 AM
One final scene, if you don't mind...

My actual number of Tins (2500) which still fails after a few frames without collision.

I would be more than grateful if you could sort this one out and I'll leave you alone LOL

120196

Kevbarnes
02-16-2014, 03:00 AM
[QUOTE=lino.grandi;
The main problem with your scene is the scale. ........ Then it's always possible to bake the simulation using MDD and then scale everything as needed.
[/QUOTE]


Hi Lino

Just been following this thread. this looks really good - and with very little jitter to static objects at end of simulation, very natural.

could you confirm a couple of things:-

1. From your scene files I'm assuming that its better to scale up the dynamic elements in modeler first?
would you get the same effect/benifit if you used real-world objects but then scaled them up in Layout using a global scene null - ie will bullet see the scaled elements larger or would they still be treated as real world.

2. I'm also assuming that one would have to add the resultant mdd solution back on to the larger scaled dynamic elements and then globaly scale
them back to match a real world scene - ie the mdd file could not be used on the smaller scene objects.

thanks

Kevin

lino.grandi
02-16-2014, 06:19 AM
Hi Lino

Just been following this thread. this looks really good - and with very little jitter to static objects at end of simulation, very natural.

could you confirm a couple of things:-

1. From your scene files I'm assuming that its better to scale up the dynamic elements in modeler first?
would you get the same effect/benifit if you used real-world objects but then scaled them up in Layout using a global scene null - ie will bullet see the scaled elements larger or would they still be treated as real world.

Yes Kevin. The resize must be done in Modeler. We're working out some new Bullet options for better supporting any real scale object.




2. I'm also assuming that one would have to add the resultant mdd solution back on to the larger scaled dynamic elements and then globaly scale
them back to match a real world scene - ie the mdd file could not be used on the smaller scene objects.


MDD stores vertex position data, so you can use the MDD on the smaller objects as well, as long as the point index has not changed (and of course just scaling an object is going to preserve it).
What you need to do, of course, is to create a Master Null and parent all the objects to it. Then you have to use the MDD Reader to apply the cache to the objects, and set the Apply Cache To option to Object Space.
Scaling the master, should scale the whole simulation accordingly.

Any doubt you may have, just ask! ;)

lino.grandi
02-16-2014, 07:48 AM
120200

And a final new content...

I had to scale the objects again...but this should work. 2500 is a big number! ;)


One final scene, if you don't mind...

My actual number of Tins (2500) which still fails after a few frames without collision.

I would be more than grateful if you could sort this one out and I'll leave you alone LOL

120196

Kevbarnes
02-16-2014, 08:14 AM
Any doubt you may have, just ask! ;)

Thanks Lino - for all your support

... I hope you get paid overtime!

cheers

Kev