Way to stop FEM simulation inter-penetrating?

   3411   7   1
User Avatar
Member
271 posts
Joined: 3月 2012
Offline
Hi all,
I've mixed a SOP solver with an FEM solver. I have four spheres and the SOP solver moves them towards a certain point, but I want the FEM solver to make them squish up against each other when they do, but currently, they just pop inside of each other.

I've tried upping the dopnetwork's sub-steps, but it doesn't seem to help for some reason

The ‘force’ with which the SOP solver will try to move the spheres towards the point is controlled by a parameter called ‘amp’ located in:
AutoDopNetwork > sopsolver1 >foreach > calcs
The target point is defined in there too.

Attachments:
simple_cell_test2.zip (22.9 KB)

User Avatar
Member
8555 posts
Joined: 7月 2007
Offline
that's because you are moving the points in SOP solver directly
what you need to do inside of your SOP Solver is just introduce vector attribute named: force
and let FEM solver to move the points accordingly
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
271 posts
Joined: 3月 2012
Offline
Ok that pretty interesting, thank you tamte.
So if I apply a force attribute to points, it will be read by any solver?
Is there a reason why applying a transform in the SOP solver doesn't work? The reason I tried it is because I have a tutorial series from Digital Tutors
http://www.digitaltutors.com/tutorial/535-Combining-Procedural-Animation-and-Rigid-Body-Dynamics-in-Houdini [digitaltutors.com]
..and this is the method used in there.
User Avatar
Member
8555 posts
Joined: 7月 2007
Offline
yes, force is pretty unified in H13 so it works for particles, FLIP, wires, cloth, FEM, RBD
in earlier versions you could add some value to v for FLIP or use fexternal for cloth, VOP Force for RBDs… to control your sim besides the DOP Forces

transforming points directly is usually a bad idea since solver then needs to solve interpenetrations that you may cause that way which may be much more trickier(and many times too late) than letting the solver prevent interpenetration in the first place by solving the positions internally by integrating forces and velocities
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
271 posts
Joined: 3月 2012
Offline
That's very useful to know, thanks.
Also, while you're here, I keep having issues with visualizing attributes. I want to know what the force is on each of my spheres. I open up the display options, add a custom variable with
Name: force
Label: force
Attribute: FORCE

I activate it and it doesn't show up. I've always had issues with getting Houdini to show attributes in the viewport, but now it never, ever works.
User Avatar
Member
8555 posts
Joined: 7月 2007
Offline
when you specify the name of the attribute it should be lowercase force, it needs to match the geometry attribute name exactly. which is lowercase
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Member
271 posts
Joined: 3月 2012
Offline
Ah, that got it. Though I swear I've tried using lower case in the past. Very strange. So the all caps syntax is for using the attribute value in expressions or something? I've never really been clear on this
Sorry if it's a daft question.
User Avatar
Member
4516 posts
Joined: 2月 2012
Offline
No all caps would only work if the attribute name was in all caps. You have to use the same casing as your attribute name. By convention, all caps are reserved for variable names.
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
  • Quick Links