Activate gravity if temperature is higher than 0?

   5332   8   0
User Avatar
Member
6 posts
Joined: Aug. 2016
Offline
New to Houdini here.

I'm melting a cube that is floating in the air as a sphere used as a temperature source passes through it, but when the simulation starts the cube falls down due to gravity. I want it to stay in the air, except for the parts that are melting. So I was thinking I would set gravity's Activate property to 1 if a particle's temperature is higher than 0, and then check if then for those particles clamp the activation to 1 so it stays affected by gravity even if it was to cool down afterwards.

This way I should have a floating cube, and the parts that melt fall as they melt.

Except I have really no idea how to go about the expression. I have looked at some tutorials on expression, but it's still rather unclear to me

Thanks
User Avatar
Member
2535 posts
Joined: June 2008
Offline
The gravity force can affect a group so you may want to take that approach. Migrate particles to the gravity group based upon temperature. Sorry I don't have an exact expression or setup for you.

Check out the example files under the help card of the PopObject. There are quite a few examples that show how to manipulate popstreams (stream essentially are groups).
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
6 posts
Joined: Aug. 2016
Offline
Thanks Enivob, Grouping sounds like a good idea. I'll be going through the example files.
User Avatar
Member
280 posts
Joined:
Offline
if you send me a scene file i can modify it to make it work..
User Avatar
Member
6 posts
Joined: Aug. 2016
Offline
Hello Patar,

I added the scene, hopefully you can open it.

I tried groups, since streams don't work with flipfluid object, but it didn't workout. I'm not able to figure out where to put the group (after the solver I assume?) nor how to write the expression properly to get the resulting group desired, etc. I tried putting @temperature >0 in the group expression, but it always returns 0 since I presume it only checks for the temperature at the start, not every frame.
Edited by prapra - Aug. 29, 2016 16:41:03

Attachments:
melt_heat.hiplc (684.7 KB)

User Avatar
Member
2535 posts
Joined: June 2008
Offline
Here is my attempt at trying to solve this. I used a PopWrangle to add particles to the group “hot” when the temperature is over 0.38, however, even though the group is created, the Gravity node can not detect that the group exists?

When I specify the hot group manually in the gravity node nothing moves.

Maybe someone at SideFX can look into this. I thought this was supposed to work…?
Edited by Enivob - Aug. 29, 2016 21:58:25

Attachments:
Untitled-1.jpg (196.1 KB)
ap_melt_heat.hiplc (686.5 KB)

Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
280 posts
Joined:
Offline
Hi this is the fix
the first couple of frame the unaffected by gravity is also going downward this is due to cohesion with the affected particles if you dont want this you can use ballistic attribute to ignore it theres a switch1 built in
play with it…
hopes it helps

Best regards
Patar

Attachments:
melt_heat_mod.hiplc (701.9 KB)

User Avatar
Member
2535 posts
Joined: June 2008
Offline
Thanks for posting that fix. This is a nice example file on the technique.
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
User Avatar
Member
6 posts
Joined: Aug. 2016
Offline
Thank you Patar, it works nice!
  • Quick Links