PDA

View Full Version : Bullet, start explosion within an object?



raw-m
12-16-2013, 02:40 PM
I've been working in this for the best part of the day and need help!

I have a sphere shape made up of lots of objects. I'm using Bullet with a bit of Vortex to rotate them around while not crossing through each other. So far, I'm surprised how nicely Bullet works, nice and quick considering the amount of objects.

My problem is that I want an explosion to move pieces away a few seconds in - not firing an object at another like the blowing up bridge example, more of a push from a specific location. I've tried Explosion added to a null with a distance to object gradient attached but can't get it to work as expected. I'm a bit confused between the relationship the gradient settings have with the Strength setting it's applied to. ie, changing the Strength effects the gradient despite the gradient having exact distance values. Anyone know?

I've also tried adding an object set to Kinematic and animating its scale, from 0 upwards - to push away objects. Bullet doesn't seem to work with scaled objects.

Blimey, I hope all this makes sense! I'll post some screen grabs later. Can anyone shed some light on how I could do this in the meantime?

pinkmouse
12-16-2013, 03:36 PM
Well, I've never been able to get Explosion to work set as Force, so I normally use Acceleration. Don't know if that's just my lack of comprehension of what it's supposed to do, or a bug in 11.6, (where's the swamp thing when you need him! :D ). I've also never used a gradient, just envelopes. You also need to crank up the strength, a few hundred is a good start. Single or double digits gets you nowhere, very slowly. :).

118733


And here's a quick re-purposed scene:

prometheus
12-16-2013, 11:37 PM
It should work with explosion and force, skip the gradient and donīt try to scale anything, but instead use the envelope on the effect type force strenght, set a keyframe at 0 value 0, set a keyframe for the keyframe just before desired start at value 0 then the desired keyframe at value 100%.
Direction properties set to center.

that is based on placing a null with explosion force in the middle of a hollow box with thickness walls, that is fractured in some pieces, you could set the activation mode to start or activate on last keyframe, the sleeping mode donīt seem to work with an envelope this way.
gravity might be best to turn off for checking that the other stuff works first.

It worked here anyway, might send a simple scenefile ..but try out by yourself first, I donīt understand why you donīt get explosion force to work pinkmouse?
Lw 11.6 here.

Michael

prometheus
12-17-2013, 12:10 AM
the force option is a very much lower strength than the acceleration or velocity mode, so that might need much higher values than the acceleration or velocity in order to make it show properly, and my sample also used the mesh mode since it doesnīt seem to affect the convex pieces properly (im evaluating that now)

Also notable, if you would try to select the envelope curve in the graph editor and ctrl left mouse move the time for adjusting when the explosion starts, I noticed that the explosion wonīt start at all when moving the the curve ahead in the graph timeline, I had to adjust that by setting the object activation that is supposed to explode, to a value of 0 on the linear speed threshold and the angular speed threshold.

118737


Michael

pinkmouse
12-17-2013, 02:43 AM
...I donīt understand why you donīt get explosion force to work pinkmouse?
Lw 11.6 here.


Morning Michael. Dunno if you looked at my last scene, but I've redone it using Force, and with the value cranked up to 10000. As you can see, nothing happens at frame 200 when the envelope kicks in. Yet the scene is fine set to Acceleration or Velocity. This is what I don't understand. Feel free to have a play and see if you can get anywhere with it. :)

raw-m
12-17-2013, 03:47 AM
Many thanks for you time pinkmouse and prometheus - got it working and couldn't have done it without you.

1. setting items Linear Speed Thres and Angular Speed Thres to 0 got the ball rolling.
2. add Explosion to a null, use Acceleration as the Effect Type. Had to crank up the Strength to 1000, a lot more that I was trying before.
3. I wanted falloff around the explosion so in added a gradient to the Strength. The only way I could get it to work with the envelope is to set all the Values to 0 and Alpha to 0% at the centre of the null position - even though alpha is at 0% I found the Value also had to be 0(?).

All works great. I'd like to see a better description of what effect the different Effect Type has on forces. I've read the manual many times over and still find it confusing, especially how the difference in Strengths works (positive and negative values)!

Cheers guys :D

prometheus
12-17-2013, 04:13 AM
Morning Michael. Dunno if you looked at my last scene, but I've redone it using Force, and with the value cranked up to 10000. As you can see, nothing happens at frame 200 when the envelope kicks in. Yet the scene is fine set to Acceleration or Velocity. This is what I don't understand. Feel free to have a play and see if you can get anywhere with it. :)

I checked your scene, as I mentioned before it doesnīt seem to be able to work with box shape, use mesh instead, why that is I donīt know, probably something with inside polys or something, but itīs not enough with that..as I mentioned before too, it doesnīt seem to be working with activation sleep mode, try always active or activate on last key.
The linear speed threshold might also need to be set to zero, even though checking your sample it seems to be working without it.

so I got it working with your scene by switching shape mode to mesh, and changing activation to last key, I also had to remove the gradients in the glue strength and use a breaking angle instead..so your model is perhaps to complex from the beginning, a little hard to track down all forces, gradients,glue strenght etc..so I had to eliminate and turn of other items and restore glue strength etc.

I would recomend test on simpler samples, such a box with hollow inside and some thickness on the walls and get an ideo on how using envelope on the explosion force works..Im quite new too it myself, so it was the first time I tried it...but it worked out after some tests, issues might be to have a nice force explosion where the pieces dampens as well, which I currently donīt
know if that is handled well.

Michael

- - - Updated - - -


Many thanks for you time pinkmouse and prometheus - got it working and couldn't have done it without you.

1. setting items Linear Speed Thres and Angular Speed Thres to 0 got the ball rolling.
2. add Explosion to a null, use Acceleration as the Effect Type. Had to crank up the Strength to 1000, a lot more that I was trying before.
3. I wanted falloff around the explosion so in added a gradient to the Strength. The only way I could get it to work with the envelope is to set all the Values to 0 and Alpha to 0% at the centre of the null position - even though alpha is at 0% I found the Value also had to be 0(?).

All works great. I'd like to see a better description of what effect the different Effect Type has on forces. I've read the manual many times over and still find it confusing, especially how the difference in Strengths works (positive and negative values)!

Cheers guys :D

I think it should be enough only setting the linear speed threshold to zero.

I will post my very simple sample later..

prometheus
12-17-2013, 04:16 AM
Ohh..I might add that having the parts mass distribution set to vertices as in the Jenga tower sample doesnīt work well, if set to solid the pieces will explode on the set keyframes in
the graph editor around 200.

Michael

raw-m
12-17-2013, 04:20 AM
Have you tried adding forces together? I've added a subtle Vortex expecting the Vortex and Explosion to have an additive effect but the Vortex reduces the impact of the Explosion by quite a bit.

jeric_synergy
12-17-2013, 10:38 AM
....All works great. I'd like to see a better description of what effect the different Effect Type has on forces. I've read the manual many times over and still find it confusing, ....
:grumpyface: But how would we get that better description into the manual in a TIMELY way? :verygrumpy:

Greenlaw
12-17-2013, 12:40 PM
The Explosion Force should work as described above. Alternatively, you could place a collision object inside the object (assuming there's space in your object,) and animate the scale of the collision object to 'explode' the surrounding object. This approach is more visually interactive. When you Multi-bake your MDD, just leave this collision object out of the selection.

BTW, I like to use Item Shape on my Force objects to help me visualize their position and range of influence. This is especially helpful if you animate them.

G.

prometheus
12-18-2013, 12:40 AM
The Explosion Force should work as described above. Alternatively, you could place a collision object inside the object (assuming there's space in your object,) and animate the scale of the collision object to 'explode' the surrounding object. This approach is more visually interactive. When you Multi-bake your MDD, just leave this collision object out of the selection.

BTW, I like to use Item Shape on my Force objects to help me visualize their position and range of influence. This is especially helpful if you animate them.

G.

I wish for some built in visual feedback for the forces, after all...the old dynamics has it and it is contraproductive having to build nulls or item shapes.
would also be nice to have an activate by keyframe slider directly acessable in the force options, so you donīt even have to work with the graph editor, just activate the force at specified keyframe.
Maybe in updated versions in Lw12.

Michael

raw-m
12-18-2013, 12:55 AM
Thanks Greenlaw, I tried the scaling approach but it didn't seem to work. I'll try it again as that would be spot on if I could control it like that. As mentioned, the problem could have been that the Vortex force seemed to greatly reduce the Explosion force when applied.

Ps. Totally agree with the UI on the forces, needs to be a lot clearer on what's going on.

Greenlaw
12-18-2013, 10:52 AM
Thanks Greenlaw, I tried the scaling approach but it didn't seem to work...
I'm almost certain I've done that in the past but maybe I'm mistaken. (It happens.) :) Will take a look at it this afternoon and let you know if it works here.

Since were talking about improving Bullet, I'd like top see Deactivation work with Parts mode--that would solve the jitter issue when using Parts. Deactivation appears to work fine with Rigid mode but it's apparently ignored when in Parts mode. I'm guessing this is more complicated to do with Parts mode if all the pieces are being considered as a single object and the object is constantly colliding with itself or has pieces falling into infinity. Hopefully LW3DG will have a solution by version 12.

G.

Greenlaw
12-18-2013, 11:31 AM
I just tried it--no it doesn't work. And now that I'm doing this, I don't think think it's supposed to. Sorry for the bum info.

It will probably work if you baked the scaling object as an MDD and then used that as a Deformable Bullet object, but this setup will probably calculate very, very slowly. (If you want to try it, remember to set the Shape Retention to 100 and Shape Lock to Translation and Rotation for the MDD/Deformable object.)

G.

prometheus
12-19-2013, 02:51 AM
Apart from implementing easier way than to activate collision and explosion forces through gradientīs or the graph editor through
an activate by keyframe slider, there could also be a value slider that shows visual feedback of the effector size, and also scalable, and have a checkbox of autokeyframe scale/size.so you simply activate the force at any keyframe in the animation, and then use the effector size(also visuable in layout openGL) and scale it with the slider and it will be animated if you scale it differently at another keyframe.

Itīs a way of..
1. visualize the forces radius in openGL for better feedback overview.
2. make it easier to adapt/activate in time and to control it in bulletīs UI in a fast workflow.
3. expand on the actual functionality, and to allow forces to be scaled.

Additionally the forces should be scalable through standard size modification commands as you do with old wind forces, or scaling other dynamic objects.

Michael

raw-m
12-19-2013, 03:50 AM
Totally agree with you here, Prometheus. It seems like the forces feel pretty limited without applying a gradient/distance to object setting and they can be pretty fiddly to setup, not to mention the amount if clicks you have to make in order to get to it. Coupled with limited visual feedback of what's going on etc. I really hope Matts listening and can work his magic at LW3DG!

Greenlaw
12-19-2013, 09:34 AM
What's really fun is to add Turbulence and other textures to Forces. That's how we animated the leaves in the 'B2' excerpt we released last summer:

'Brudders 2' one minute excerpt (http://vimeo.com/channels/littlegreendog/68543424)

This trick gives Bullet affected elements fancy 'paths' to follow.

G.

prometheus
12-20-2013, 01:13 AM
What's really fun is to add Turbulence and other textures to Forces. That's how we animated the leaves in the 'B2' excerpt we released last summer:

'Brudders 2' one minute excerpt (http://vimeo.com/channels/littlegreendog/68543424)

This trick gives Bullet affected elements fancy 'paths' to follow.

G.

Yeah it is nice, though you could do that as well with the old system using procedural textures on particle velocity, or on directional wind velocity and then use old hardfx.
And the brudders looks cute and nice:)

raw-m
12-20-2013, 05:40 AM
Just had the chance to play around with this a little further and even more confused now! Using and Explosion force on a null it appears that scaling the null has an effect on the force - but not sure how this works with the Strength setting, especially with a Object Distance set in the Gradient - they all have influence and no idea the relationship between them!

Greenlaw
12-20-2013, 11:39 AM
Yes but unlike ParticleFX, with Bullet I'm using the actual collision of the leaves geometry against the environment. Granted, the leaves are very simple geometry but it makes a big difference compared to 'rolling' PFX particles. You can see this interaction it mainly where the leaves skitter over the ground and the way they get caught in the leaves in the trees and ivy. With ParticleFX, the interaction would be a lot less realistic.

Also, the calc times are very nice: just a couple of minutes for most dense scenes, a minute or less for less many other scenes.

G.

Edit: Whoops--I missed your reference to HardFX. I suppose HardFX could do something similar. It's been ages since I last used HardFX though and I never used it this way, so I don't know. From what I recall, I don't think the setup would be as easy or calculate as quickly, but I could be mistaken.