Jump to content

How to render/store velocity vectors in EXR?


Recommended Posts

Hi,

I have a moving geometry that stores velocity vector on each point (keyframed animation + trail node). I want to do motion blur in post, so I need to store velocity vector as EXR layer, however I don't see any VEX variable for that (i.e. mantra->images->extra image planes have no parameter for velocity, I just find point, depth, color but no reference to velocity)???  

Also, if I want to Houdini to store this velocity vector for all objects in the scene, then what's the right way to do that? Should I go in each object and append trail node? What if some objects are not moving...

Thanks,

Edited by catchyid
Link to comment
Share on other sites

Hi,

https://www.sidefx.com/forum/topic/34339/?page=1#post-158971

In addition to my original question, an user on the above post says it's better to use Mantra built-in motion blur than using velocity vectors + post? Is this correct? I am not expert but I "think" that exporting velocity vectors and using them in post for motion blur will be way faster than computing extra samples in render time to create motion blur? Anyways, I still cannot export velocity vectors :(

 

  • Like 1
Link to comment
Share on other sites

modify the shader to take v@v and export it to v@vel, then in mantra add extra image reading v@vel and you'd have 3D vectors.

if you want 2D vectors the link you posted should work, but I think  you have to enable mblur in mantra and disable image mblur.

regarding the speed... you can try it yourself. mantra's mblur is quite fast.

 

 

edit: here is an example scene, hope it helps

vectorsForPostMBlur.hip

Edited by sasho78
  • Like 3
Link to comment
Share on other sites

Thanks Alexander...I am looking at your file and I am not sure exactly how the vel2d and vel3d get calculated! There is no shader assigned to your mesh yet in the rendering node you export vel2d and vel3d and it does work!!! The only thing I see is trail node which computes velocity. Could you please elaborate more on how this "magic" is done :) 

Link to comment
Share on other sites

sure, you just have to dive into the squab geometry, there is a shop network and finally there is the shader in question SquabSkin. Inside you can see the nodes I added in red.

little inception game there is :)

 

edit: oh, and you can assign shaders with material SOP, as you can see in this case.

Edited by sasho78
  • Like 1
Link to comment
Share on other sites

Thanks for explaining the workflow Alexander. I had to try it out for myself. Other packages just offer velocity as preset pass but in Houdini you have to use a shader. I did not expect that.

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...