PDA

View Full Version : Bullet jitters. What to do?



monovich
12-10-2012, 05:45 PM
Howdy all. I'm doing a very simple scene where I drop a bunch of 100 mm gemstones on a flat plane. The gemstones are simple: two pyramids back to back to make a simple diamond shape. The gemstones are only 8 polygons. All tri-s. The floor plane is a simple box with no lid. It has decent polygon density as well, maybe 200mm.

Problem: I drop the gemstones into the box and they NEVER EVER stop jittering and sliding around. I've upped the friction, lowered the bounciness, pegged the linear and angular dampening to 99%, and tried pretty much everything else I can think of to get them to simply come to a rest and stop moving and nothing works. I've adjusted both the gemstones and the collision plane.

I've also tried increasing polygon density and beveling/rounding the edges of the stones. No luck.

Is there something I'm doing wrong? For some reason I assumed that Bullet could solve something like this with no problems. The old FX system suffered from jitters, but I thought Bullet fixed it.

Does anyone have tips?

Thanks.

-sf

nickdigital
12-10-2012, 05:47 PM
Have you tried increasing the friction amount?

XswampyX
12-10-2012, 05:50 PM
Or drop the mass of your gems to 0.0. They won't move around then.

Or bake them out?

monovich
12-10-2012, 05:52 PM
Here is a link to the behavior. https://dl.dropbox.com/u/8555581/stones.mov

I have upped the friction and that doesn't solve it. I haven't tried mass to 0. Sounds strange but I'll try anything.

monovich
12-10-2012, 05:56 PM
hmm... the mass things help, although 0.0 is too low. .001 helps. Still some movement though.

XswampyX
12-10-2012, 05:59 PM
Had a look at your Mov file....

You need to set your floor to Box shape in the collision settings, not mesh.

monovich
12-11-2012, 05:06 PM
I tried a box shape and that did not improve the quality of the sim at all.

Andrewstopheles
12-11-2012, 07:06 PM
set the gemstones to box instead of mesh ;)

Jim M
12-12-2012, 04:32 AM
1/ Tripled polys work best.
2/ Collision distance of 0 can cause endless jitters.
3/ Sometimes animating the damping when you are happy with the basic sim works a treat. Ramping it up at the end.
4/ Occaisionally I have found dividing a large floor area into more polys helps intersections.
5/ Increasing (or sometimes decreasing) Dynamics FPS can give a cleaner solution.

LW_Will
12-12-2012, 04:48 AM
You might want to make the size of the gems very large... say, half of meter or so. Miniature in reverse, so to speak.

Greenlaw
11-08-2013, 07:57 PM
The jittering has bothered me for some time and today I decided to spend a little more time looking for a solution. According the to documentation, you should be able to use Deactivation Time to stop the jittering but this has never worked for me. Then it occured to me today that, maybe this feature doesn't work for single Parts object.

So I did a test using Fracture's Parts to Layers feature to shatter a sphere and then loaded the object to Layout, which of course brought all the pieces in as individual objects. Then I group selected the pieces and loaded them into Bullet, along with a ground collision object. I 'dropped' the sphere and it shattered as expected. After a few seconds though, the pieces completely stopped rolling and there was absolutely no jitter to be seen.

From this example, I'm assuming that Bullet's Deactivation is not meant to be used with single Part objects, only individual objects. My guess is that Parts objects are being evaluated all the time, probably because it's probably always evaluating collision with itself. Bear in mind, I've only done one test--I should try a few more examples.

For the moment, my feeling is that using a single Parts object has its uses because the setup is very convenient. However, if you need absolutely jitter free simulations, you might try saving the pieces to multiple layers instead.

I hope this info is helpful. I'll post my test scene later this evening--please let me know then if the example does not work for you.

G.

erikals
11-08-2013, 08:47 PM
Ouch, not good... :/

thanks for info. hope it gets fixed very soon.

Greenlaw
11-08-2013, 10:28 PM
I'm not sure it's actually a bug. I could be wrong but I think the concept of a single Parts object as multiple objects might be unique to LightWave so Bullet might not fully understand it. I'm not a programmer but I imagine the devs could possibly make it work by having Lightwave trick Bullet into thinking each 'part' really is a separate object, but I really don't know--I'm sure it's more complicated than that. Anyway, we currently have two ways to set up sims: Part objects for convenience and separate objects or layers for better accuracy. The user will have weigh what's more important in a give situation and use the appropriate method. I think most of the time, Parts will work fine, and I can use the individual objects approach when I really need the sim to be absolutely jitter free.

The big issue I see with using individual objects method is writing out .mdd data for, say, a collapsing building that may have to be broken out into thousands of pieces--that's a lot of .mdd files. Is there a way to do a sim, and then write out a single .mdd for the entire scene? I thought I read there was some way to do this using a third party script. (I think we might have had something like that in the Box at R&H--I'll ask my former 'box-mates' if that tool actually existed or if I"m just imagining things again.) :p

That said, for a collapsing building in a film or TV production, you probably won't need the sim to be 100% jitter free because you'll most likely cut away from the shot long before the destruction settles down anyway--otherwise the shot will be painfully long and boring. Where you'll most likely need jitter free sims is for smaller simulations that end quickly, like a breaking wine glass for example--and in that case you'll probably be dealing with far fewer pieces anyway, making .mdd a more practical option. (Thank goodness for the new Multi-Loader.)

Just a few thoughts. Hope this is helpful. I'll try a few more tests tonight to be sure what I wrote above is true.

G.

erikals
11-09-2013, 07:11 AM
Is there a way to do a sim, and then write out a single .mdd for the entire scene?

not sure, but i remember William Proton made a video where he selects 4 particle emitters and saves them somehow.
but that was particles, so might be different...

as far as i remember, this Bullet Jitter was actually a LightWave issue...
(damn if i can find that link though...) :P


might help >
http://forums.newtek.com/showthread.php?138619-Bullet-Physics-Dynamics-probelm-items-passing-through-the-ground-slowly&p=1352944
http://forums.newtek.com/showthread.php?136310-Bullet-Objects-keep-bouncing
http://forums.newtek.com/showthread.php?127599-Lightwave-11-0-1-Building-Destruction-Test (yours) :]

Greenlaw
11-09-2013, 09:17 AM
...as far as i remember, this Bullet Jitter was actually a LightWave issue...
(damn if i can find that link though...) :P

Yes, that's why I think it's Parts object related, and why Deactivation seems to be okay with individual objects. As far as I know, the Parts object is a LightWave thing (like single point polygons,) which may be why Bullet has some issues with it but is fine when using separate objects. That's my theory anyway. I'm not 100% sure yet since I've only done a single test. I didn't get to test this further last night but will run a few this morning. Hope I'm right.

G.

prometheus
11-09-2013, 11:33 AM
not sure, but i remember William Proton made a video where he selects 4 particle emitters and saves them somehow.
but that was particles, so might be different...

as far as i remember, this Bullet Jitter was actually a LightWave issue...
(damn if i can find that link though...) :P


might help >
http://forums.newtek.com/showthread.php?138619-Bullet-Physics-Dynamics-probelm-items-passing-through-the-ground-slowly&p=1352944
http://forums.newtek.com/showthread.php?136310-Bullet-Objects-keep-bouncing
http://forums.newtek.com/showthread.php?127599-Lightwave-11-0-1-Building-Destruction-Test (yours) :]


Regarding selecting 4 emitters and saving out, that is probably just selecting the emitters and simply go to one of the emitters file tab, and save all selected motions, which saves all the emitters to one single pfx file.

Michael

vector
11-10-2013, 03:14 AM
So it would be nice send parts to layers to get a correct bullet simulation. Does it exist a script that converts not connected meshes of an object single layer to different layers? Could it work better?

prometheus
11-10-2013, 09:03 AM
So it would be nice send parts to layers to get a correct bullet simulation. Does it exist a script that converts not connected meshes of an object single layer to different layers? Could it work better?

should be able to do that with the connected to layers command, under layers tab/layer utilities/connected to lyrs.
it will actually move all disconnected parts in one layer to each on layer, so if you draw out a flat rectangle poly with divisions, and then unweld it, then run the command, you will
end up with each one of those unwelded parts with itīs own layer.

Michael

pinkmouse
11-10-2013, 10:06 AM
But then you loose the ability to use glue...

vector
11-10-2013, 11:41 AM
Thank you, Prometheus, very interesting. Although not a problem for me lost the glue in this case, but interesting know that

Greenlaw
11-10-2013, 12:12 PM
Pink Mouse, I think you're right about that. Like vector, it didn't matter for the shots I've been working at work but, yeah, that's an important limitation to be aware of depending on the result you need.

I do hope LW3DG can figure out how to make Parts objects work absolutely jitter free without cheats and workarounds--that would be the best solution of course. I was just pointing out one way to get jitter-free results with the current software.

G.

pinkmouse
11-10-2013, 02:20 PM
In the sting I've just done for a friend, I got around the jitters by enveloping the Dynamics Framerate down to zero at the end of the animation. Once Youtube has finished chuntering away it will be up in the gallery.

edit: Here you go:

http://forums.newtek.com/showthread.php?138640-Title-Sting-for-Management-Training&p=1353125#post1353125

erikals
11-10-2013, 04:52 PM
good idea, though this wouldn't work for say, a tall building collapsing, as the pieces would have to settle at different times.

erikals
11-10-2013, 05:08 PM
wonder if it's possible to copy this "Sleep" Blender Bullet Engine idea... >


Physics is calculated on the structures displayed in white, which indicate the Rigid Body object’s center of gravity, and when the simulation reaches a state of equilibrium, those structures turn green, indicating that the Rigid Body object is “sleeping”. Sleeping increases the efficiency of the simulation and reduces the possibility of jitter for motion-less objects.

taken from page 35,
http://people.sc.fsu.edu/~gerlebacher/gd/documentation/bullet_physics_blender.pdf

Greenlaw
11-13-2013, 04:13 PM
I've been doing quite a bit of Bullet stuff today at work, and I'm running comparisons between a object with Parts vs. the same object with separate Layers. So far, the sim for the Layers version is consistently running much faster and more predictably than the Parts version. Admittedly, Jitter isn't an issue in this example because we cut out of the shot way before the action has a chance to settle down, and glue isn't important for this scene either--but the improved speed and accuracy is a big plus.

So, IMO, depending on what you need to run the sim for, this is another reason to consider Layers over Parts.

Sorry, I can't show what I'm doing here--maybe I can get clearance in a few months but, until then, maybe I can make a similar but significantly different example to demonstrate.

G.

Greenlaw
11-13-2013, 04:17 PM
wonder if it's possible to copy this "Sleep" Blender Bullet Engine idea...


Color coding is a great idea! I hope LW3DG can implement that in the LightWave version of Bullet. I can see how that helps when troubleshooting a scene.

Greenlaw
11-14-2013, 02:05 AM
Oh, I almost forgot: with the Layers object and multiple MDDs, I found that I could easily reposition some of the debris to favor the camera angle. Yes, I could have done this with a single object MDD using my copy of Chronosculpt, but it was nice to be able to do this directly in Layout specifically to the camera I was rendering with. Score 1 for Layers.

The major downside to using a Layers-based setup was MDD assignment. I had duplicated the hierarchy of the Layers object (the pieces were attached to a null to make them easy to position,) and naturally Layout added the numbers 'ObjectName (1)' and 'ObjectName (2)' to designate the duplicates. Unfortunately, Multi-Baker named the MDD files something like 'ObjectName_1_2' and 'ObjectName_1_2' so Multi-Loader had trouble automatically assigning the MDDs. I was still glad to have Multi-Loader available because it did make the assigning task easier than it could have been, but without the auto-assign feature, assigning many dozens of MDDs with very similar names was tedious and time consuming. Parts wins that point.

Whew! So many 'gotchas' to keep track of. :p

G.

erikals
11-14-2013, 06:38 AM
maybe,... create the simulation with Bullet, then HardFX scan it, then use EditFX to fix the jittering parts.

Greenlaw
11-14-2013, 11:37 AM
Found a Layers Renamer script in the LW3DG database. This can help Multi-Loader with the auto-assignment of MDDs. I wish the script could assign sequential numbers though, and with definable 0 leaders.

The effect I'm working on has a creature breaking out of a hard element. The element was hollowed out and I'm using Kinematic Collision to do the breakout. It's working surprisingly well with the Layer object--the pieces stay steady until the action starts, calc time is very fast, and the pieces breakaway credibly. I do wish I could use Glue though--that would help make certain regions of the crumbling look better. Maybe I can make the object half and half, though I'm not sure the Parts half will be stay steady enough to match the Layers half. When I have time, I'll experiment with this further.

Anyway, just wanted to share the above tip.

G

bobakabob
04-24-2014, 07:20 AM
Found this thread after having problems with jitter. Some good suggestions though it's problematic placing all the components of a fractured mesh into seperate layers if this wasn't done automatically. I'm on 11.6.1.

Are there any more recommendations e.g. on the size of objects, and does resizing in Layout resolve any issues?

I have found Fracture can create lots of single and two point poly 'debris' which is worth cleaning up in Modeler otherwise it can lead to crashes in Layout.

Greenlaw
04-24-2014, 10:37 AM
TrueArt has a parts to layers tool--I believe it's part of the modeling pack. I've seen similar parts to layers tools elsewhere--I haven't used them but you could check lwplugindb (http://lwplugindb.com/).

If you have errors caused by Fracture, a parts to layers tool might actually help you find them. I haven't tried that yet--the idea just occurred to me.

Mike Green has a variation of the fracture tool called BreakUp (http://www.mikegreen.name/)on his website. Because it uses LightWave's booleans, it can sometimes be prone to errors too, but in many cases it works where the native Fracture fails (and vice versa.) I often switch between the tools when I have to break things.

Lately I've been using the 3rd Powers (http://www.3rdpowers.com/index_store.html) Boolean Tool a lot. I'm finding this tool be be more reliable to use than the native boolean tools, plus it's fully interactive. I've been mainly using it to for modeling but I've also used it to break up objects. The process is not automated like with Fracture though--but on the other hand the breakage is more directable. (Maybe the developer could be talked into making his version of Fracture?)

Just some ideas--hope this is helpful. :)

G.

bobakabob
04-25-2014, 12:57 PM
Thanks for all the helpful input here, Greenlaw. Where there are really problematic jitters I'm using invisible kinematic objects to gently nudge them in the hope it influences them back to normality.

prometheus
04-25-2014, 04:09 PM
Found this thread after having problems with jitter. Some good suggestions though it's problematic placing all the components of a fractured mesh into seperate layers if this wasn't done automatically. I'm on 11.6.1.

Are there any more recommendations e.g. on the size of objects, and does resizing in Layout resolve any issues?

I have found Fracture can create lots of single and two point poly 'debris' which is worth cleaning up in Modeler otherwise it can lead to crashes in Layout.

isnīt connected to layers available in the 11.6.1 version? under the layers tab? the plugin for that is the core_tools.p anyway
it is named connected to lyrs as the menu button, but the command is parts to layers, and the plugin is the core_tools.p

Greenlaw
04-25-2014, 05:05 PM
You're right! I wasn't aware of this native version. Thanks for the tip. I just tried it and it seems to work well.

(For others who are wondering, Connected to Layers is found under the Layers - Layer Utilities menu, if you're using default menus.)

G.

50one
08-05-2016, 07:43 AM
Damn, two years on and the jittering is still there for parts objects. Nice...

Snosrap
08-05-2016, 09:51 PM
Damn, two years on and the jittering is still there for parts objects. Nice... Solved with Chronosculpt. Anyone with LW2015 gets Chronosculpt for free. It's the easiest way to not only stop the jitters but also a lot more. I used Chronosculpt to fix the jitters here:
https://vimeo.com/157240124

50one
08-06-2016, 12:41 PM
Thanks! I have installed CS yesterday but haven't got time to figure out how to smooth out the jittering.

However....Finally fixed the Jittering by changing the scale of my object 8X to almost 8 meters p/object and finally got "almost" perfect/steady pile of meshes.

prometheus
08-06-2016, 01:50 PM
Thanks! I have installed CS yesterday but haven't got time to figure out how to smooth out the jittering.

However....Finally fixed the Jittering by changing the scale of my object 8X to almost 8 meters p/object and finally got "almost" perfect/steady pile of meshes.


Around 9.28 a bit of pinning of bullet simulation..,.

https://www.youtube.com/watch?v=RKn2poOxEbg

Also to consider, If you have to friction force, things will not have friction and thus bounce around more, so increasin friction might help in some cases ..at least a bit.
Also setting the parts properties mass distribution to vertices may sometimes work, roll and bounce behavior becomes a bit different though.

50one
08-06-2016, 01:59 PM
Trust me Prometheus I have tried everything, no bounce, huge friction different distribution methods etc. and one of the reasons it jitters is the "parts" type, however it's the bullet itself apparently so listened to their advice and cranked up the size and this somehow solved the issue, well 98% OK so have to go with that as I don't have time to change anything now.

thanks for the video!

Edit. See, that's the thing with bullet demos anywhere, they show me a box of sixteen pieces, I have a pile of 300 meshes, frigging mess that took ages to simulate

prometheus
08-06-2016, 02:33 PM
Trust me Prometheus I have tried everything, no bounce, huge friction different distribution methods etc. and one of the reasons it jitters is the "parts" type, however it's the bullet itself apparently so listened to their advice and cranked up the size and this somehow solved the issue, well 98% OK so have to go with that as I don't have time to change anything now.

thanks for the video!

Edit. See, that's the thing with bullet demos anywhere, they show me a box of sixteen pieces, I have a pile of 300 meshes, frigging mess that took ages to simulate


Well..yeah, more complex pieces seem to be connected to slower simulations obviously, and suspect that goes for most software.
Bullet may be the same in speed in various software implementations..not sure, and how the new engine in ligthwave will perform with that will be interesting to see, but I donīt think it would be faster in houdini etc.
Not sure how lagoa is performing, probably way faster.

Then physx etc.
Upcoming plugin eep Impact fx relies on physx, itīs very early in development though...
https://www.youtube.com/channel/UCbM1dr1h_5koFsIdPH2EdDA/videos?shelf_id=0&view=0&sort=dd


Fun to listen to Alan Mcay and his destruction series with max and maya...some fracturing and destruction takes several days to simulate.

BokadCastle
08-06-2016, 04:05 PM
to stop jitters, use "activate on last key".

see this tut near the end.
https://www.lightwave3d.com/learn/article/lightwave-115-forces-tutorial/

MonroePoteet
08-06-2016, 04:51 PM
I have had some luck ramping up the Angular Damping and Linear Damping with an Envelope when I want the Parts to quit jittering. It works pretty well except all the parts stop jittering at about the same time. The jittering also seems to be more constrained by increasing the Bullet "Dynamics framerate (fps)" in the World Tab under Bullet=>Item Properties to something like 600 or so.

mTp

50one
08-06-2016, 05:08 PM
to stop jitters, use "activate on last key".

see this tut near the end.
https://www.lightwave3d.com/learn/article/lightwave-115-forces-tutorial/

Tried different activation methods even textures in gravity channel.

- - - Updated - - -


I have had some luck ramping up the Angular Damping and Linear Damping with an Envelope when I want the Parts to quit jittering. It works pretty well except all the parts stop jittering at about the same time. The jittering also seems to be more constrained by increasing the Bullet "Dynamics framerate (fps)" in the World Tab under Bullet=>Item Properties to something like 600 or so.

mTp

ended up with 8x scale and 220 FPS.

Greenlaw
08-06-2016, 06:52 PM
to stop jitters, use "activate on last key".

That works to keep items settled until the collision begins.

The jittering that may occur at the end of a simulation can be settled using Deactivation time but this only works for regular object, not a single Parts object. I believe the reason a Parts object will jitter is because Deactivation requires that all bodies to stop moving and colliding with each, which is rarely happens with a Parts object because it's almost always reacting to itself. For example, some little piece is always colliding with other pieces in the same Parts layer, or some pieces of the layer has fallen off or through a ground plane towards infinity. If any of this is happening, the Parts object can never truly be at rest to deactivate. A regular object, on the other hand, has a greater chance of settling down because it's never colliding with itself the way a Parts object does, and if it happens to be falling into the void, that's okay because it's not effecting other regular objects anyway.

If you're using a Parts object in the simulation, the proper way to avoid the post jitters is to break out the Parts object into separate layers. Some users don't want to do this because the number of layers can get unwieldy for Layout, but I just parent all the layers to a null, which lets me move them as a whole and collapse them to a single line in Scene Editor. If Layout gets too slow with the number of objects, set them to bounding box mode, and use VPR when you need to see exactly what they look like. (IMO, most of the time, you really shouldn't need to see every piece with that level of accuracy all the time...but that's up to the user and situation of course.)

Some fracture plugins and tools will let you split out all the parts to separate layers, and Connected To Layers (under Layer Utilities in Modeler) can take an existing Parts layer and split it out to multiple layers. Be sure you save a copy of the single layer version before using this plugin.

That doesn't mean you should always avoid using a Parts object. Parts objects are more convenient to work with so I prefer to use them when I know we'll be cutting away before any potential jittering is noticeable. (It's actually pretty rare for a TV and movie scene to linger so long on a destruction sim.) But if I'm working on a scene where we really do need to watch a destruction past it's conclusion, then I'll bite the bullet (so to speak,) and break out the object to layers properly.

Edit: Funny...I just looked above and saw the same info posted here back in April 2014. Sorry, I didn't realize this was an old thread. Never mind. :)

Snosrap
08-06-2016, 07:29 PM
Thanks! I have installed CS yesterday but haven't got time to figure out how to smooth out the jittering.

However....Finally fixed the Jittering by changing the scale of my object 8X to almost 8 meters p/object and finally got "almost" perfect/steady pile of meshes.

Yep changing scale can help too but I hate doing that. :) There is almost nothing to figure out with CS, I had never used it before unit that project and it was just super simple - plus no scaling of my scene required. :)

prometheus
08-08-2016, 12:30 PM
Some fracture plugins and tools will let you split out all the parts to separate layers, and Connected To Layers (under Layer Utilities in Modeler) can take an existing Parts layer and split it out to multiple layers. Be sure you save a copy of the single layer version before using this plugin.



Aint I picky....I would say the native fracture let you split to parts to separate layer, (just check partīs to layers) and with crackit (use distribute pieces to empty layers one by one)
Connected to layers works to ofcourse if you by any chance need it after having made fracture pieces in one layers as you said.

Crackit (external old plugin) is however much slower, on the other hand it gives a more natural lookin crack, which also works better when metaforming the pieces to become stones etc..but that is a different story.

Greenlaw
08-08-2016, 12:57 PM
Yes, Crackit was great!

Also Dodgy (http://www.mikegreen.name/)has some alternative fracture plugins at his website. Look for BreakUp and Voronoi Shatter.

In my experience, they all work a little differently so if one isn't doing what you need, you have a few other methods to choose from.

A fun trick you can do with most fracture plugins is to squash your object before you run the fracture, and then size the result back to normal size. This can make the pieces look more like splintering wood.

Another trick I like to use it to apply DP Edge on the inside faces of a fracture. This way, the seams are hidden until the object breaks, and you'll see nice beveled edges on the chunks. Note that DP Edge does require clean breaks to work properly so it many not work properly with all fracture results.

Final Tip: Any of the fracture programs seem to work much more predictably if your object is divided into small and fairly equal polygon sizes. If your geometry has a minimal structure (i.e., it was modeled 'efficiently',) you may find a greater chance of boolean errors. For this reason, I usually keep two versions of a model when working on a destruction fx sequence: An optimized version for general animation rendering and a specially subdivided version that works better for fracturing.