Rotating pyro and smoke source

   2376   6   2
User Avatar
Member
63 posts
Joined: Sept. 2014
Offline
For some reason no matter how I translate this it doesn't work correctly.
So if I want a smoke or fire source that has velocity in a specific direction. I added a v attribute with velocity in the Y axis only. It works as expected but if I rotate the pyro source the velocity stays in the Y direction and does not rotate with the object. What is the correct way to do this?


Edited by eschwab - April 13, 2020 13:21:56

Attachments:
Capture1.JPG (14.8 KB)
Capture.JPG (18.1 KB)

User Avatar
Member
30 posts
Joined: April 2019
Offline
Something like this?

Attachments:
SMOKE_SIM.hipnc (805.3 KB)

User Avatar
Member
63 posts
Joined: Sept. 2014
Offline
reuben94
Something like this?

Yes that works! I'll have to go through and see what's different between yours and mine. One thing I noticed was I was doing
v@v = {0,1,0};
and you were doing
v@v = set(0,1,0);

Is one way more correct?
User Avatar
Member
30 posts
Joined: April 2019
Offline
I always use ‘set’ whenever i'm defining a vector. It's not always necessary, but I do it regardless. I don't fully understand it myself, but using a set was necessary because I was multiplying by a channel float ‘mult’. Without ‘set’ my ‘v’ values default to 0.

I don't think the ‘set’ function was your problem. I'm guessing your problem had to do with global and object space. I'm assuming the pyro source node is creating values that stick to global space. In your case, you want them to stick to object space. That's what i've done in my example, by defining ‘v’ before my transform node.

It's like the tube is a canvas and the ‘v’ attribute is a painting of an arrow pointing upwards. The transform is just some guy rotating the canvas 90 degrees. The arrow is still pointing up in object space, but just rotated in global space.

I'm not a professional on this topic, so that might not have made much sense.
User Avatar
Member
63 posts
Joined: Sept. 2014
Offline
Ok I found out what was happening. I was having a hard time getting my @v into the volume so I was using the velocity parameter in the Pyro Source. The reason why it wasn't working was because it doesn't transfer the @v if your Pyro Source uses volume. Your example used surface. To use the volume you have to put in an Attribute Transfer node in to add the @v to the volume that is created.

Attachments:
Capture.JPG (20.9 KB)

User Avatar
Member
30 posts
Joined: April 2019
Offline
I see. You can also use a vdbfrompolygons if you just want to use the whole tube as a volume. You just need to create a fogvdb and source ‘point.v’ in ‘surface attributes’. Either way works.

Attachments:
vdb.png (61.5 KB)

User Avatar
Member
63 posts
Joined: Sept. 2014
Offline
Thank you for all the help. I actually tried that first and for some reason it wasn't working for me. I just redid a test real quick and it worked though.
I also learned another trick at the end of your nodes CONVERTVDB to save some memory.
  • Quick Links