A new version of Cineversity has been launched. This legacy site and its tutorials will remain accessible for a limited transition period

Visit the New Cineversity
   
 
Jittery Almonds
Posted: 07 February 2013 05:10 AM   [ Ignore ]  
Total Posts:  69
Joined  2006-06-20

I’ve read a number of web pages and forums on this subject but I can’t seem to crack it.

I have a bunch of almonds inside a metal tube.  They need to sit there until these little discs start pushing them along.

I’ve started with a cloner object with the almonds.  I put them inside the tube then ran the dynamic for a few seconds.  I picked a frame and reset the initial state of the almonds so they are all lying there.

However they jiggle and jump and jitter just sitting there.  I have tried a number of solutions.  Increased the Angular and Linear Damping.  Increased it all the way to 1000%.  It helps a little but then the pushing disc doesn’t work.

I’ve increased the mass to about 1,000,000 to see if they were heavy enough they wouldn’t move.  I’ve increased the steps per frame.  The # of iterations.

I’ve tried various types of collision shapes.

The little buggers won’t stop jittering.

I am attaching a test file.  If anyone has a suggestion or solution I would appreciate it.

File Attachments
ALMOND TEST.c4d.zip  (File Size: 998KB - Downloads: 203)
 Signature 

“Nothing is Easy”
     ————Jethro Tull

Profile
 
 
Posted: 07 February 2013 03:53 PM   [ Ignore ]   [ # 1 ]  
Administrator
Avatar
Total Posts:  365
Joined  2006-05-17

Dynamic simulations are dependent on many different things, even down to the OS you use.
First, dampening only has so much affect on the calculation.
Jittering is really a sign that an object is not able to find a correct rest position, likely because of an intersection that causes it to “pop” to a new location where it is no longer intersecting anything.
This you know from working with the scene.

In the expert tab for the dynamics, you have the “collision margin” and “scale”.
The first is how far from a point / edge / poly another point / edge / poly has to be to trigger a collision.
If an almond is 1.5 cm wide and the collision margin is 0.25cm then your collision margin is a little less than a quarter the whole size of an almond.
Try lowering this.
Next you have the “scale”.
The bullet engine is best suited for similarly sized objects, like the almonds in your scene.
The “scale” should be set to be similar to the average size of the objects in the simulation.
So again, this value can be lowered.

Next you have “steps per frame”
This is the number of divisions in time (between frames) this is most important when you have fast moving objects.
The Maximun solver iterations is the number of times CINEMA iterates through different object positions per step to try and find the final position of an object.
The iterations will be the most important part in this setup.

The next thing is the tube…you do not need to use the whole mesh.
Split the inside of the tube from everything else and then use just the inside as a collision mesh.
You can also set this to “static mesh”
The high friction value you are using can also introduce instabilty, as well as the dampening levels.

If you focus more on the scale settings you can get pretty decent results just changing the settings in the expert tab.
You will need to clean up all the other tags though and get rid of the high settings.

Profile
 
 
Posted: 07 February 2013 03:58 PM   [ Ignore ]   [ # 2 ]  
Administrator
Avatar
Total Posts:  12043
Joined  2011-03-04

Hi TAK,

I have currently only a Laptop running, so with… edit/ Patrick’s answer, I will not even test more./edti

My best advice, don’t use “Shape: Automatic”, use the one that will come closer to your work, otherwise it won’t work properly.

If you are in explore mode, use one parameter at the time. Set it back if you explore others after that. E.g. your Mass is 100…for Almonds? ;o) Will say: I read in your settings that you left parameters there—perhaps if they doesn’t show a change. Not a good idea. Exploring mode is great to learn what is not in the books, but to get a very specific target, not my advice.

I have replaced all simulations” tags and I got silence over the first 30 frames, adjusting the “Shape” of course. Well, the push through stuff is not tested here. Anyway:

What I see in this set up is a huge option for optimization. The chambers in which the Almonds stay is in terms of dimensions not changing. So you need for the ride in the tube only a few main “states” to cover pretty much anything. Roughly said that would be: Static, acceleration, constant move (these are perhaps several) and deceleration. You might have one or the other idea. So you need only to find a methode to change among these states and during the ride a little bit faster.

I’m trying as often as possible to have things more under control to get the results I’m after. Dynamic is certainly a big help, but I think it has as well the danger in it, to rely on it too much and get stuck if the system is not second nature to the artist.

All the best

 Signature 

Dr. Sassi V. Sassmannshausen Ph.D.
Cinema 4D Mentor since 2004
Maxon Master Trainer, VES, DCS

Photography For C4D Artists: 200 Free Tutorials.
https://www.youtube.com/user/DrSassiLA/playlists

NEW:

NEW: Cineversity [CV4]

Profile
 
 
Posted: 07 February 2013 04:05 PM   [ Ignore ]   [ # 3 ]  
Administrator
Avatar
Total Posts:  365
Joined  2006-05-17

For this scene I started by reducing the dampening back to 0, for the rotation and position.
I removed the individual dydnamics tags from each almond and instead used 1 tag on the cloner with “individual elements” set to “all”
Next the size increment was set back to 0.
The margin is turned off, as this will be set by the scene settings…only use this if you need to override the scene wide margin.
I set the friction back to 50, and added 5% bounce.
For the pipe collider I split the inside of the mesh from everything else…only this part gets the collision tag. Set to “static mesh”
On this I also reduced the friction to 50%
The discs also need to be fixed.
Switch the individual elements to all.
Also reduce the friction on these.
Then on the document level, because the objects are so small I reduced the collision margin…0.1 or less.
The scale was reduced to 10cm, rather than the default.
Steps per frame was boosted, to catch any of the fast moving almonds, when the discs start to push them. start at 30
Next, the iterations, these also needed to be bumped up, 60 work, but you may be able to get away with less.

Profile
 
 
Posted: 15 February 2013 08:22 PM   [ Ignore ]   [ # 4 ]  
Total Posts:  69
Joined  2006-06-20

Well…  its been about a week and thanks to your help I have reduced the jittering quite a bit (not completely), enough to get away with it while the discs are moving.

I do have a question…  I set an initial state a few seconds in so they have settled.  Then I rewind to frame 0 and bake the move on the almond clone.

When I go back to frame one, the almonds jump to their original clone state… then at frame 2 they jump to the initial state I set.

This really isn’t a big deal for what I am doing but I do find it odd.  Is this a bug?  Or is there a specific reason for this.

Thanks again for your help.

T

An additional thought.  My idea is to do one set of these almonds from the beginning of the spline to the end being pushed along through the tube and then clone them and offset the time.

As soon as I drop the Baked Cloner with the objects into another cloner, the Bake disappears and all the almonds return to their original state.

I want to avoid having to do actual almonds in between each set of discs. My file size will be enormous… I estimate at least 600mbs.

Even duplicating the clone loses its Bake info.

Is this a approach a pipe dream or is there a way to keep the baking inside another cloner?

 Signature 

“Nothing is Easy”
     ————Jethro Tull

Profile
 
 
Posted: 18 February 2013 11:20 AM   [ Ignore ]   [ # 5 ]  
Administrator
Avatar
Total Posts:  365
Joined  2006-05-17

If you would like to send an updated file I will happily take a look again.
You have asked too many questions with not enough detail.
A file is really the best way.
Make sure you strip it down to just what is important. :D

Profile