paint smoke based on its velocity

   2616   4   1
User Avatar
Member
230 posts
Joined: Oct. 2009
Offline
hello, I want to paint a smoke fluid based on its velocity and use this in Nuke. I cant get the attributes to work with, so what I did is scatter points inside the volume and then use a trail SOP to compute velocity, then paint points based on the velocity using a Point SOP and at the end, I am using a attribute transfer to transfer the Cd attribute from the points back to the volume. It gives some interesting results but does not work to produce motion blur. Is there any other way to do that? In order to create the paint, I am using $VX,$VY,$VZ in the RGB values, is there any way to use the vel.x - vel.y and vel.z which are given with the smoke?

cheers
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
You should be able to use volumesample in the color parameters of a primitive sop.


http://www.sidefx.com/docs/houdini12.0/expressions/volumesample [sidefx.com]
.
User Avatar
Member
230 posts
Joined: Oct. 2009
Offline
zdimaria
You should be able to use volumesample in the color parameters of a primitive sop.


http://www.sidefx.com/docs/houdini12.0/expressions/volumesample [sidefx.com]

thanks for the reply, but the volumesample takes x,y,z how I should use this to specify the x in R and y in G and the z in B of the color parameter in the primitive sop?
User Avatar
Member
1 posts
Joined: May 2012
Offline
zdimaria
You should be able to use volumesample in the color parameters of a primitive sop.


http://www.sidefx.com/docs/houdini12.0/expressions/volumesample [sidefx.com]
Such a very amazing link!
Watch What to Expect When You’re Expecting Online Free [freemoviewatch.org]
User Avatar
Member
390 posts
Joined: Jan. 2012
Offline
thanks for the reply, but the volumesample takes x,y,z how I should use this to specify the x in R and y in G and the z in B of the color parameter in the primitive sop?

I was suggesting using something like
diffr = volumesample(“../OUT_volume”, 1, $TX, $TY, $TZ)
diffg = volumesample(“../OUT_volume”, 2, $TX, $TY, $TZ)
diffb = volumesample(“../OUT_volume”, 3, $TX, $TY, $TZ)

But I just tried that and it doesn't work because tx ty tz return the position of the prim and not the position in the volume. Sorry about that.

Now that I have h in front of me, why not just separate each field out and color each one with a primitive sop and then merge them back together?
.
  • Quick Links