Smoke dissipation based on distance from a curve - SOLVED

   3759   4   0
User Avatar
Member
31 posts
Joined: 1月 2012
Offline
Hey everyone!

I'm working on a new project and as you can see by the .hip file, I'm trying to get the smoke to follow the spiral path. As the sim goes on, the smoke expands away from the curve and when I apply a gas_dissipate, the smoke disappears based on time/age. I'd like to have the gas dissipate based on the smoke's distance from the curve, that way the original sim can still climb up the spiral.
Edited by iwilson2 - 2016年6月25日 19:01:43

Attachments:
smoke_help.hipnc (1.1 MB)

User Avatar
Member
471 posts
Joined: 11月 2013
Offline
Hello.
As far as I know there isn't any node in order to do what you want.
However I created simple HIP file.
Not exactly what you are looking for but it's better than nothing.
Edited by Nima - 2016年6月20日 08:25:20

Attachments:
smoke_help_dissipate.hipnc (1.2 MB)

User Avatar
Member
31 posts
Joined: 1月 2012
Offline
Thanks so much Nima! That definitely helped out. I'm still very new to coding in Houdini, but I understand a bit of Python. Would you mind explaining what you did with the wrangle nodes?
User Avatar
Member
471 posts
Joined: 11月 2013
Offline
Nothing so fancy at all.
here is the code which is used in Wrangle:
1.if(@density != 0){

2. int result = pcfind(1, “P”, @P, detail(1, “radius”, 0), 1);
3. if(len(result) != 0 )
4. @density = 0;

}
At first line determine that if density attribute for each voxel is not equal to zero then VEX goes through if statement body for each none zero density voxel.
Second line VEX assume a sphere with its center on each voxel position and it looks for any curve point inside of itself.
Third line says that if a point exist inside of assuming sphere then VEX set density to zero for that specific voxel.
Two Wrangle nodes is the same as each other except third line.
hope this helps.

User Avatar
Member
31 posts
Joined: 1月 2012
Offline
Makes sense to me! thank you again for the help Nima!
  • Quick Links