PDA

View Full Version : Beginner bullet dynamics question



Sebasvideo
08-08-2013, 07:03 AM
I'm trying to learn the basics of bullet dynamics following Dan Ablan's LW 11 Signature Course, in which he has a small building and a wrecking ball. I have set everything like he described, but when he runs the simulation, the building breaks and the pieces fall in the area. But when I try the same exact thing, as soon as the ball touches the building, the pieces fly out in the opposite direction so fast that even by the next frame, most of them are completely gone, with only a small handful of them remaining in that area. To make it weirder, there are two surfaces, a door and a window, that remain in place completely untouched by the dynamics, even though they are part of the same object.

I have a bit of experience with dynamics in Modo, so I'm familiar with these settings to some extent, but changing them doesn't seem to help much.

Any suggestions?

BeeVee
08-08-2013, 07:21 AM
Can you post the scene here for us to help?

B

Sebasvideo
08-08-2013, 08:12 AM
Sure, here they are:

116209

116210

I did this in 11.6, I don't know if maybe its bullet engine doesn't work well yet? I tried to open the scene in 11.5 but it said it was missing several plugins, and when it opened the simulation was just as bad.

Thanks,

Sebastian

Edit: there seems to be something wrong with this scene, because when I was working on it I went to the last frame to calculate the dynamics and the "Simulating Dynamics" bar showed the whole progress in just a couple of seconds. But now I closed Layout, and a few minutes I opened it again. The progress bar showed right away, but this time it got stuck at 15% for like two minutes and now it moved to 16%, but it seems to me that for a simple small building that has a 100 piece fracture it doesn't make sense that it's taking so long, especially on an i7 3930k with 32 GB of RAM. Task Manager shows that only 9% of the CPU is being used. Should I try this in 11.5?

BeeVee
08-08-2013, 08:28 AM
Hi Sebastian,

Just simming now but it's very slow. I think that part of the problem is that you are working at too big a scale, and the fact that your wrecking ball isn't at 0, 0, 0 doesn't help. Try a simpler example at 1m scale to get a better idea of how things will work.

B

Sebasvideo
08-08-2013, 08:40 AM
Thanks Ben. I don't get it, if he can run this in a laptop and it sims right away, even if his is a 20 piece fracture and mine is 100, but there's a big difference between the speed of a laptop and my CPU, so it shouldn't take ages to run. And he's working with the same size model. I actually opened his scene and it's just as big, but it sims in a second. I can try scaling down the building and see what happens.

BeeVee
08-08-2013, 08:54 AM
Are you sure it's the same scale? Your ball is 100m in diameter and your building is 350 m high, 200 m across and 300 m deep.

B

Sebasvideo
08-08-2013, 09:10 AM
Are you sure it's the same scale? Your ball is 100m in diameter and your building is 350 m high, 200 m across and 300 m deep.

B

That seems really big, but yes, I opened his lwo from the course content, and it's that big. In fact, in his video you can see that the size of the grid is 1km, and the ball he draws is over 50m diameter. But I think I found what the problem was. He did this in LW11, and it seems that LW11 has different defaults than LW 11.5 or .6. Since he didn't change any parameters in his video I didn't either, but when I opened his scene and compared the bullet properties in it to mine. In the building properties, mine were set to Shape Mesh, in his to Convex Pieces. Collision Margin was set to 5mm in mine, in his to 0. He had Mass Dist. set to Surface, I had it to Solid. I went back to his video wondering why if he hadn't changed those settings he had a very different result, but it turns out that those settings were like that by default for him, so I'm guessing different versions have different default settings? The mass setting is different two between versions, his has one drop down list called Mass Method, I have Mass Distribution and Mass Specification.

So in conclusion, after I changed those settings my sim ran in five seconds and fragments fly away but not millions of miles away, just a few meters.

BeeVee
08-08-2013, 11:28 AM
Good. :) All the same though, Bullet is designed to work with objects that are neither too big or small. As you can imagine, a collision margin on 5 mm on something that is 10 m across is really invisible and increases the calculation time massively. Convex Pieces is also faster to calculate than the mesh itself, since it's a simplified version - have a read of the manual, it's really very good (I wrote it :D). There are lots of examples to help you through.

B

Sebasvideo
08-08-2013, 01:39 PM
Good. :) All the same though, Bullet is designed to work with objects that are neither too big or small. As you can imagine, a collision margin on 5 mm on something that is 10 m across is really invisible and increases the calculation time massively. Convex Pieces is also faster to calculate than the mesh itself, since it's a simplified version - have a read of the manual, it's really very good (I wrote it :D). There are lots of examples to help you through.

B

Thanks Ben, I would like to read the manual from start to finish but what makes it difficult is that there's one full manual for LW 10 and then several addendums, and if I read the whole version 10 manual there's probably many things that changed and I will have used a lot of time reading things that changed. It would be great to have a unified version, or at least updated to LW 11.5 and then an addendum for 11.6. For now I'm going to try to finish Dan Ablan's LW 11 and 11.5 courses.

About the size, I wanted to ask you about a problem I ran into. I used the Size command in Modeler to reduce the size of the building like you told me to see if fracture worked better. I reduced it quite a lot, but it's still a few meters wide. So I fractured it, which went fine, but when I used Send To Layout, I see that it is really tiny compared to the size of the light and the camera. In perspective mode, when I try to get close to it, I can only get so far; if I press Shift+A, it appears pretty far. After a certain point, the closer I get, at one point the ground plane starts to disappear, then the building, showing fractured pieces. This is before applying any dynamics.

Now, in Modo this happens sometimes and it's usually solved by raising the "Target Distance" slider in the camera properties. I haven't seen anything like it here, and I tried to search the manual but I'm not sure what words should I use for this. I searched for the word Threshold because it's like this happens after a certain threshold, but I didn't find anything that would tell me why this was happening.

Do you know how can I avoid this?

BeeVee
08-08-2013, 04:04 PM
Yes, but by the same count, Bullet was only added in 11. For the sizing you need to change the Grid size shown at the lower left corner of Layout. You can do this with the [ and ] keys or View > Grid > Increase/Decrease.

B

XswampyX
08-08-2013, 05:18 PM
It's your model. You have single points in there, single poly geometry and even intersecting geometry. Not that the model is bad.... it's just bad for bullet dynamics. :)
Try this..... 116223

Oh, because your scale is so large the dynamics seem slow/weak gravity.

Hope that helps.

Cheers!