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.
Smoke dissipation based on distance from a curve - SOLVED
3759 4 0- iwilson2
- Member
- 31 posts
- Joined: 1月 2012
- Offline
- Nima
- Member
- 471 posts
- Joined: 11月 2013
- Offline
- iwilson2
- Member
- 31 posts
- Joined: 1月 2012
- Offline
- Nima
- 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.
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.
- iwilson2
- Member
- 31 posts
- Joined: 1月 2012
- Offline
-
- Quick Links