PDA

View Full Version : Envelopes for Bullet Gravity not working



JBT27
10-09-2014, 04:18 PM
I assumed that if I enveloped the gravity on an object, the effect would be obvious and predictable, but the object stays put.

I set gravity on Y to be 0 for 100 frames, then over the next 100 frames build up to -3. But like I say, the object doesn't move. Switch off envelopes and set Y to -3, and the object falls as expected.

I don't get it - there must be some extra trick to this - any ideas please?

I also attempted to gradually drop a stack of objects by having the gravity applied by a null controlling a Y Distance to Object gradient - the stack either dropped all at once, or not at all (despite being set to Parts); the object was an array of quad objects, each about 0.1m across (a bit small maybe).

Thanks.

Julian.

BeeVee
10-10-2014, 03:56 AM
It works fine for me, but you are purely using settings in Bullet right? You went to the World tab and set an envelope on the gravity in there? I set the gravity to be 0 for 20 frames and then with a step go to the normal -9.8 m.

B

jboudreau
10-10-2014, 07:04 PM
It works fine for me, but you are purely using settings in Bullet right? You went to the World tab and set an envelope on the gravity in there? I set the gravity to be 0 for 20 frames and then with a step go to the normal -9.8 m.

B

Hi

Julian is right it doesn't work, Try putting in his exact settings. 0m gravity for 100 frames and then -3m gravity on frame 200. The object stays still.

I did a lot of tests and it's basically hit or miss here. depends on how far away your key frames are from one another and what value you set for gravity.

Here are the rules I came up with

If you want to go less than -5m gravity you can't have any more than 20 frames at 0m gravity and you can't go anymore than 70 key frames away from your previous key frame.

for example:

frame 0 = 0m gravity
frame 20 or lower = 0m gravity
frame 70 or lower = -3m gravity
= WORKS!!


frame 0 = 0m gravity
frame 20 or higher = 0m gravity
frame 71 or higher = -3m gravity
= DOESEN'T WORK!!


If you have gravity set to 0m for 10 frames then you can't go anymore than 210 key frames from your previous key frame.

for example

Frame 0 = 0m gravity
frame 10 = 0m gravity
frame 211 or lower = -3m gravity
= WORKS!!

Frame 0 = 0m gravity
frame 10 = 0m gravity
frame 212 or higher = -3m gravity
= DOESEN'T WORK!!


If you want to go -5m gravity you can't have any more than 20 frames at 0m gravity and you can't go anymore than 104 key frames away from your previous key frame.

for example:

frame 0 = 0m gravity
frame 20 or lower = 0m gravity
frame 104 or lower = -5m gravity
= WORKS!!


frame 0 = 0m gravity
frame 20 or higher = 0m gravity
frame 105 or higher = -5m gravity
= DOESEN'T WORK!!

If you want to go -10m gravity you can't have any more than 20 frames at 0m gravity and you can't go anymore than 189 key frames away from your previous key frame.

for example:

frame 0 = 0m gravity
frame 20 or lower = 0m gravity
frame 189 or lower = -10m gravity
= WORKS!!


frame 0 = 0m gravity
frame 20 or higher = 0m gravity
frame 190 or higher = -10m gravity
= DOESEN'T WORK!!


Julian: In your situation if you do the following below it will work or if you follow the rules above it will work

frame 0 = 0m gravity
frame 20 or lower = 0m gravity
frame 70 or lower = -3m gravity
= WORKS!!

I'm not sure why this works this way but I would say it's definitely some sort of a bug with bullet gravity

Hope this helps

Jason

Jarno
10-10-2014, 08:34 PM
It's because the objects have gone to sleep. If an object doesn't move by at least a certain amount in a certain amount of time (as defined in the Bullet dynamic item's Activation tab), it is deactivated (until something moves close enough to it that there is a potential for a collision to occur).

Change the Activation settings to be suitable to your situation (e.g. use a longer deactivation time, use Always Active, or Activate On Last Key).

---JvdL---

jboudreau
10-10-2014, 08:47 PM
It's because the objects have gone to sleep. If an object doesn't move by at least a certain amount in a certain amount of time (as defined in the Bullet dynamic item's Activation tab), it is deactivated (until something moves close enough to it that there is a potential for a collision to occur).

Change the Activation settings to be suitable to your situation (e.g. use a longer deactivation time, use Always Active, or Activate On Last Key).

---JvdL---

Thanks man, I knew something was funny, I forgot all about the activation and deactivation settings that fixed the problem

Jason

JBT27
10-11-2014, 09:50 AM
Thanks jboudreau - I'll take a look at those over the weekend. Yes, I had it working on a box, so clearly it works, but I have a stack of poly islands, a vertical stack of stones, that I have been trying to make crumble apart from the base. My first thought was gradually introduce gravity up the stack using a null to apply a gradient. But then I hit these problems. Then I found other ways to get that look.

I had overlooked the full effect of the activation controls, so I need to rtfm and do some more 'playing' with it.

Julian.

JBT27
10-11-2014, 10:02 AM
According to the manual, Parts requires a collision event to begin an object breaking, which probably explains a chunk of my problem. Controlling gravity looks like it's not the way to do this.

Julian.