PDA

View Full Version : Man I Suck - Now I have bullet problems



Bax33
02-23-2013, 02:26 PM
I thought I would try to use bullet (for my first time) to animate a moving chain. To start with I thought I would just freeze the first link and have the chain hang there. Nope! Not me. My link falls right through. About the only thing I can do to prevent it is up the lateral, lower the gravity and up the friction drastically and if I increase the frames to around 700 it still falls through eventually. Here is what is really perplexing me. I found another thread here: http://forums.newtek.com/showthread.php?133363-Bullet-Chains where XswampyX provides a scene with four chains that just hang there and get hit by a clynder. They work beautifully and it looks as though he is using the default settings in Bullet. Yet, in my scene (attached), the chain breaks. Even more complexing when I load one of the chains from XswampyX's scene, it fails in my scene and immediately falls to it's demise even though the first link is still set to static.:screwy: I even tried adding my chain to XswampyX's scene and it still breaks apart.:bangwall: I don't like to keep coming back and asking for instructions, but I've tried to resolve this on my own for about 6-7 hours now without really getting any closer except when I mess with all the settings taking them to the extreme. Why does the Chains_Roller scene XswampyX shared work so much better than mine? Besides the obvious answer which is that XswampyX is so much better at this than I am. :thumbsup::rock:

Thanks for whatever direction you can provide.

XswampyX
02-23-2013, 06:01 PM
Morning Bax33,

Thanks for the name check. :D

Here's an amended scene. I reset your pivot point to 0,0,0 and deleted all your extra chain link layers. I then used clone in Layout to generate the additional chain links.

I had to change the object shape from mesh to convexed and alter the weight to 1 kg per link.

I also upped the frame rate of the simulation to stop the links from breaking.

Hope this helps.

Cheers!

Bax33
02-23-2013, 06:19 PM
Thanks XswampyX. I'll examine this and do my best to learn from your expertise. Thanks again.

GoatDude
02-23-2013, 07:44 PM
Tweaked your scene file.

Bax33
02-23-2013, 07:45 PM
Thanks XswampyX, it did help considerably, but it may have also opened a can of worms. I was able to create a new scene, send the link, clone it and move it to get the swaying effect. Yea!! Thanks much. I used the settings you did and everything worked. However, I do have some questions:

1. Do you know why the mass had to be set to 1?

2. What is the reasoning for uping the fps? How or why does it keep the links from breaking apart?

3. Apparently, we can't import all the links (primary and clones) into another scene and keep the motion? When I import the chain links using import item from scene, everything looks good until I click play and then the links detach from the primary but still keep the motion even though they are tangled.

4. Can you provide a correlation to the settings you provided and the size of the link. For example, I reduced the link size to be 2" from top to bottom and then sent it to layout where I cloned it and used the same settings that worked previously. However, with the link size reduced, the links fail to stay linked. I'm thinking it might be due to the 5 mm collision setting because if I reduce that to .5 um then the second link stays attached to the primary but all the rest still fall.

I'm going to have to review the bullet dynamics section of the documentation again as well.

man777
02-24-2013, 07:31 AM
I myself spent a couple of days dealing with Bullet, but this time with soft deformations (did chain tests before, no problems), with hair for instance. What I can say of all this is YEAH, the mass values are essential!!!!!!!!!
Objects react to other ones using these mass differences. Kind of like with real gravity, where an object attracts a second one, which in its turn attracts the first one in an equal reaction. (The Earth attracts you of course, but you also attract the Earth, which is a bit harder to understand).

Sorry if I'm not clear, English ain't my native language. ;)

Example: a simple sphere with long hair guides. If you give absurd mass values, simply with the gravity, hair guides collapsing on the sphere could deform it, even resulting with complete exploded geometry.

So first thing with Bullet is to give a check on mass values! :)