View Full Version : Lagoa Unstable - video sample - help please
08 August 2012, 06:24 PM
I need some help, i'm trying to do some sand simulation, and i'm trying lagoa for that (i can't use bullet because dynamic colliders don't support concave objects).
Every time i try to get a stable simulation, i get a horribly boiling simulation, that's terrible.
Here you can see a viewport capture of the simulation:
Now, the settings of the simulation are:
For the Material:
It's based on Dirt Pile Material, the only difference is the Collision Offset, it's set at 0.2, but i get the same result with 0.0
Lagoa Simulate Node:
Substeps configured to 25
Inelastic Substeps configured at 4
Just "Enable Inelastics" active.
In "Boundary Interaction" i have "Enable Static Friction" active.
Help please, i've been able to achieve great fluid simulations with lagoa, but i'm trying a bit of sand or dirt, and it seems impossible to me.
Also in other test i did, when the inelastic particles are in the floor, the don't stop moving, they are like boiling or something like that.
Help please, i don't understand what's happening with that simulation.
08 August 2012, 06:48 PM
I'm not a Lagoa expert at all, but to me it looks like the animation of the collision object is causing particles to be inside at the start of the next frame, which in turn produces the "exploding" effect.
I know that it's usual to leave point clouds at the origin, but in this case, what happens if you parent the cloud to the collision object?
08 August 2012, 09:49 PM
That can't be the problem (the interpenetration) because i create the particles from a volume that is not interpenetrating with the animated object, also i leave 10 frames to the particles for settle, it's like i can't get any stable simulation for inelastic particles :P
I'll try the parenting thing, but i don't see how that can help at all :P
Cheers and thanks for the answer :)
08 August 2012, 04:30 PM
That can't be the problem (the interpenetration) because i create the particles from a volume that is not interpenetrating with the animated object, also i leave 10 frames to the particles for settle,
But after they've settled, you move the dustpan up and forward into the pile of dirt, so at the beginning of the next frame there's penetration. Parenting can help to scoop up the dirt because it makes the dirt particles move with the dustpan -- but it's not a complete solution because particles that fall out will still be affected if the dust pan keeps moving. Maybe keying constraints on/off would be better.
08 August 2012, 05:59 PM
Select the particles and open the Explorer for that selection.
You will see Simulation Settings. It defaults to simulation substeps of 1 (different from the substeps for the Lagoa or Inelastic).
Increase this number until it becomes more stable.
Hope that helps!
08 August 2012, 07:05 PM
Thanks both of you guys.
Actually i tried the substeps way with no luck, if i raises the substeps, the simulation gets more unstable :S
I don't understand what's happening.
08 August 2012, 09:23 PM
trying to reproduce this here, but cant get as unstable results even with low substeps... would you mind sharing the scene...
08 August 2012, 03:01 AM
I'll upload it tomorrow.
08 August 2012, 11:42 AM
Here you have the scene.
I tried scaling the scene to be smaller, it's scaled to a 0.2 factor and with freezed transform.
I don't know what happens at all :S
In the end what i need is to simulate a bunch of sand.
Cheers and million thanks for looking into this.
08 August 2012, 05:32 PM
Hello Cerberus, I think I got it...
Your simulation was mostly working nicely, there was only one wrong thing about it. You had set your substeps in both the Lagoa Simulation Node and on the PClouds simulation settings. That is very confusing, since they multiply themselves and you lose control of how many substeps you actually have.
So I started investigating on your scene with various simulation substeps and with different solvers on and off. Something that got my attention was the fact that the motion inbetween particles seemed very stable, while the collisions were massivily wrong. If you have no inelastics, but still have collision you will see that as you up the substeps things seem to get even worse (!!!).
So, if we think about how this may be working internally... (and this is just a whiled guess) Lagoa is probably iterating the simulation X times at each frame, but the position of the colliders is only evaluated once at the full frame. So it is probably acting like it was stepped and not linear motion inbetween frames, thats why the popping happends.
So my first thought was, ok Ill not use substeps in the Lagoa node. I probably have to use the substeps in the PCloud's simulation settings. For some weird reason the collider acts like it is offsetting its position as time passes... really weird, no idea why that happends. But even so, things look more stable.
My last attempt was admitedly VERY hacky, but it works! And you know what they say about computer graphics... whatever works! I created clips from your animations and scaled their time by 0.2 (5 times slower), made the forces in the simulation 5 times weaker. Therefore efectively increasing the substeps by hand. I think Im missing something else that should be scaled (as the forces dont seem to match), I am doing this out of intuition. But, as I said, it works, it seems very stable, and here is proof of it :D
As I play with the simulation my feeling is that you only need this hack to avoid problems with colliders that have great velocity. If you then want to increase your resolution, and further increase your substeps, you can do that through the Lagoa Solver Node.
Ill report this to AD and try to reach Thiago (probably not that easy). I guess it is a limitation on how ICE works and how it gets data from scene, might not be an easy fix...
08 August 2012, 06:24 PM
I'll try to do your solution ASAP and i'll report back here :)
Thanks a lot for your insight on this :)
08 August 2012, 12:34 PM
On a seccond thought about this, it is much simpler to just increase the framerate instead of what I previously suggested (stretching animation and turning forces down)...
08 August 2012, 12:34 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.