Render Particle Motion Vector

   3568   4   1
User Avatar
Member
12 posts
Joined: May 2014
Offline
Hey,

I'm unsure if I'm even trying to do the correct thing. I thought I'd ask anyway!

I have a fluid sim, which contains a tank, an emitter and some collision geometry.
I want to be able to take the particle movement, at a given frame, and render it's direction/vector to a texture.
If possible, my end result would be a texture where if the particle was moving positive X, nothing on the Y, it would create a pixel with the value of 1.0,0.5. (The Z channel, would just write 0 to blue).

Any help / direction would be hugely appreciated.

Thank you!
Kieran
User Avatar
Member
387 posts
Joined: Nov. 2008
Offline
https://vimeo.com/104212383 [vimeo.com]
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Exporting any attributes such as velocity or any custom attribute is so simple.

Just export it in the shader with same name , then use this name for Extra Image Plane in the Mantra node , In this case you can see your custom attribute's data as image in the different layers of your rendered image :idea:

Check attached project :wink:

Attachments:
JKVOut.hip (393.5 KB)

https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
User Avatar
Member
12 posts
Joined: May 2014
Offline
Thank you both, massively, for your help.

Joker386, the example is fantastic, thanks.

These both give me a huge amount of information I can work with!
User Avatar
Member
1391 posts
Joined: Dec. 2010
Offline
Kieran Belkus
Thank you both, massively, for your help.

Joker386, the example is fantastic, thanks.

These both give me a huge amount of information I can work with!

:wink:
https://www.youtube.com/c/sadjadrabiee [www.youtube.com]
Rabiee.Sadjad@Gmail.Com
  • Quick Links