evanrudefx Posted April 15, 2019 Share Posted April 15, 2019 (edited) Hello, Could anyone explain exactly how pyro collisions work? In some cases, it doesn't seem like collisions with the smoke solver are "real" when using moving colliders. It seems like 2 things happen when using an animated static object: 1. Takes the velocity from the collider and advects the smoke with it 2. Delete any density that goes inside collision object (can be disabled) Look at my gif. If I disable velocity from the collision nothings happens. The density just gets deleted. In the example I turned off correct collisions for better visualization. If the collisions were "real", I would expect the density to move when the collider moves, then stop once the collider stops since no velocity from the collider is being applied. Any ideas? smoke_collision_test.hip Edited April 15, 2019 by ejr32123 Quote Link to comment Share on other sites More sharing options...
isah_voodoo Posted April 16, 2019 Share Posted April 16, 2019 I would also like to know this Quote Link to comment Share on other sites More sharing options...
tortele Posted April 16, 2019 Share Posted April 16, 2019 Quote Link to comment Share on other sites More sharing options...
evanrudefx Posted April 16, 2019 Author Share Posted April 16, 2019 (edited) It did talk about collisions for a paragraph or two, but its not clear to me. It does seem to indicate what I am thinking is true. Edited April 16, 2019 by ejr32123 Quote Link to comment Share on other sites More sharing options...
Atom Posted April 16, 2019 Share Posted April 16, 2019 I guess I don't get what the problem is? You could add drag. Your example shows the default, smoke existing in the vacuum of space. Why would you expect it to slow down in a frictionless environment? Quote Link to comment Share on other sites More sharing options...
evanrudefx Posted April 16, 2019 Author Share Posted April 16, 2019 (edited) There really isn't a "problem" it is more so trying to understand how collisions work. I am not trying to achieve a look or do some effect. I am just wondering how collisions work. Just trying to see if what I think is correct about collisions: 1. Takes the velocity from the collider and advects the smoke with it 2. Delete any density that goes inside collision object Edited April 16, 2019 by ejr32123 Quote Link to comment Share on other sites More sharing options...
ikoon Posted April 17, 2019 Share Posted April 17, 2019 Hi Evan, Here is what I think: 1. Afaik, you are right. Important field here is the collisionvel. In the second example, in SOPs, you set the collider's velocity to 0 ... so although in SOPs, the object is "moving", DOP sees its velocity as 0. So the "collisionvel" field is not affected by SOPs. 2. You are also right. If you keep the default "Correct collisions" on, then the "unaffected" density gets erased inside the collider. I created this script "Find all parms referencing this parm" to dig deeper into DOPs. If you have any questions, I will gladly explain how to work with the tool. The blog post is rather minimal: http://lex.ikoon.cz/find-all-parms-referencing-this-parm/ The script found the "collisionvel" here inside the Pyro Solver: NODE: gasenforceboundary1 // PARM: Collsion Value // RAW: collisionvel NODE: buildcollisionmask // PARM: Collision Velocity Field // RAW: collisionvel NODE: clean_collisionvel // PARM: Dest Field // RAW: collisionvel NODE: clean_collisionvel // PARM: Source Field // RAW: collisionvel The "Correct Collision" is referenced by these: NODE: smokesolver_build2 // PARM: Correct Collisions // RAW: ch("../correctcollision") NODE: enable_correct_collisions // PARM: Default Switch Value // RAW: ch("../correctcollision") NODE: clamp_inside // PARM: Field // RAW: `chs("../correctcollisionfields")` NODE: color_correct_collisions // PARM: Enable Solvers // RAW: ch("../correctcollision") And the "Velocity Scale" (collisionsource1) is referenced just by this node (Trail SOP) NODE: compute_velocity // PARM: Velocity Scale // RAW: ch("../velscale") 2 Quote Link to comment Share on other sites More sharing options...
ikoon Posted April 17, 2019 Share Posted April 17, 2019 Btw you can also add Visualiser to the "collisionvel" field (it is not visualized by default) - unlock the /obj/smoke_no_vel/dopnet1/pyro/smokeconfigureobject2 - find the "collision_velocity" node - add a "Vector Field Visualization" node Connect and set it, something like this: 2 2 Quote Link to comment Share on other sites More sharing options...
evanrudefx Posted April 17, 2019 Author Share Posted April 17, 2019 @ikoon Thanks for the detailed answer- very helpful 1 Quote Link to comment Share on other sites More sharing options...
ikoon Posted April 17, 2019 Share Posted April 17, 2019 (edited) Hth, few more notices: - now I found this great answer: https://www.sidefx.com/forum/topic/55015/#post-246795 - collision field is just a scalar field - btw have you seen this great explanation? At 29:00 Jeff talks about divergence https://vimeo.com/42988999 The "make_divergence_free" part of smoke solver is three steps ( 2.A or 2.B or 2.C, depends on the method you choose) 1. Gas Enforce Boundary http://www.sidefx.com/docs/houdini/nodes/dop/gasenforceboundary.html 2.A Gas Project Non Divergent https://www.sidefx.com/docs/houdini/nodes/dop/gasprojectnondivergent.html 2.B or 2.C Gas Project Non Divergent Multigrid (or its OpenCL version enabled) https://www.sidefx.com/docs/houdini/nodes/dop/gasprojectnondivergentmultigrid.html 3. Gas Feedback http://www.sidefx.com/docs/houdini/nodes/dop/gasfeedback.html Edited April 17, 2019 by ikoon 3 Quote Link to comment Share on other sites More sharing options...
ikoon Posted April 17, 2019 Share Posted April 17, 2019 So, one more notice about the creation of the collitionvel field: Inside the Smoke Solver, there is the Gas Build Collision Mask node. From the docs: The Gas Build Collision Mask DOP builds a collision field that represents where affector objects overlap with the fluid field. It generates a signed distance field which is negative inside colliding objects and positive outside. It also generates a collision velocity field that stores the velocity of the affector object closest to each point. http://www.sidefx.com/docs/houdini/nodes/dop/gasbuildcollisionmask.html 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.