in my case it would be ideal to split my grain sim by group rather than slice, since i have layers of grains with different properties stacked on top of each other.
is this possible? any tips on how to achieve it?
on a related note, is it possible to simulate a lower layer, then load it as an alembic or sim file, and sim another layer on top, and have it behave well?
it would allow me to bump up my particle count significantly within ram limits i think..
distributing grain simulation by group
2400 4 0- robinlawrie
- Member
- 57 posts
- Joined: Feb. 2014
- Offline
- jlait
- Staff
- 6205 posts
- Joined: July 2005
- Offline
If you want to simulate by layer, it suggests you want one-way interaction between layers. In this case you don't want/need a full-scale distributed simulation.
If you want two way interaction between the grains it is best to go with spatial division perpendicular to the ground. To keep bandwidth & latency down, distribution usually only exchanges every substep, not every iteration of the PBD solver. This is only acceptable if the forces transmitted along the boundary are weak enough. Not only does gravity itself pose a strong and constant force, but we by default have a the mas-scaling to amplify convergence along that axis.
Running multiple layers on top of each other is definitely possible. My recommendations:
1) Use a .bgeo.sc sequence
1a) Delete the neighbours attribute before saving, this is a lot of data & relatively expensive time wise to save & load
2) Change the POP Solver substesps to 1 and the DOP substeps to 10. You need to save out all the substep frames, not just the integer frames, or your lower layer will be teleporting around and adding way too much energy.
Now, for the first layer, save out the .bgeo.sc sequence for every substep.
For the second layer, create all the grains for the two layers. If no grains are created/destroyed during your sim, you can simply make sure the new layer are all the new points. Make a group for the net-new points and old points.
Change the POP Grain to only act on the new points. It will still collide with your old points, but not try to simulate them.
Add a POP Wrangle before the POP Grain that copies the @P and @v of all the old points from your file sequence SOP.
If DOP substep is 10, change your playbar to not have integer frames and step by 0.1 This lets you verify your wrangle is correctly loading in the substeps.
This should then work. It is similar to how sleeping particles deactivate.
If you want two way interaction between the grains it is best to go with spatial division perpendicular to the ground. To keep bandwidth & latency down, distribution usually only exchanges every substep, not every iteration of the PBD solver. This is only acceptable if the forces transmitted along the boundary are weak enough. Not only does gravity itself pose a strong and constant force, but we by default have a the mas-scaling to amplify convergence along that axis.
Running multiple layers on top of each other is definitely possible. My recommendations:
1) Use a .bgeo.sc sequence
1a) Delete the neighbours attribute before saving, this is a lot of data & relatively expensive time wise to save & load
2) Change the POP Solver substesps to 1 and the DOP substeps to 10. You need to save out all the substep frames, not just the integer frames, or your lower layer will be teleporting around and adding way too much energy.
Now, for the first layer, save out the .bgeo.sc sequence for every substep.
For the second layer, create all the grains for the two layers. If no grains are created/destroyed during your sim, you can simply make sure the new layer are all the new points. Make a group for the net-new points and old points.
Change the POP Grain to only act on the new points. It will still collide with your old points, but not try to simulate them.
Add a POP Wrangle before the POP Grain that copies the @P and @v of all the old points from your file sequence SOP.
If DOP substep is 10, change your playbar to not have integer frames and step by 0.1 This lets you verify your wrangle is correctly loading in the substeps.
This should then work. It is similar to how sleeping particles deactivate.
- robinlawrie
- Member
- 57 posts
- Joined: Feb. 2014
- Offline
Thank you very much for your help! this sounds very promising.
i do not need 2 way interaction at all. in fact 1 way would be much more controllable as i can get the first layer looking right then add layers as i go.
i understand the workflow you propose, and the first part is no problem, although the second part has left me a bit confused (im not an expert in this stuff.. never used a wrangle before, amongst a million other things)
any chance of a simple example scene for the setup to add a second layer? ? there are no particles created after first frame, and only particles deleted outside the dopnet, post sim.
many many thanks.
i do not need 2 way interaction at all. in fact 1 way would be much more controllable as i can get the first layer looking right then add layers as i go.
i understand the workflow you propose, and the first part is no problem, although the second part has left me a bit confused (im not an expert in this stuff.. never used a wrangle before, amongst a million other things)
any chance of a simple example scene for the setup to add a second layer? ? there are no particles created after first frame, and only particles deleted outside the dopnet, post sim.
many many thanks.
- robinlawrie
- Member
- 57 posts
- Joined: Feb. 2014
- Offline
- robinlawrie
- Member
- 57 posts
- Joined: Feb. 2014
- Offline
-
- Quick Links