How to get motion blur to work in UE4 on flip from Labs VAT?

   7070   8   2
User Avatar
Member
9 posts
Joined: 12月 2013
Offline
Hello,

I have successfully managed to get animated flip mesh export to UE4 using VAT. Could anyone tell me though, how to get motion blur to work on the mesh?

Cheers,
Beny
User Avatar
Member
394 posts
Joined: 5月 2017
Offline
I think you'd have to grab the previous frame position value, subtract that from the current frame and then feed than into the shader.
User Avatar
Member
9 posts
Joined: 12月 2013
Offline
The mesh has changing point count, so won't work this way, right?

I would imagine I need to have velocities read from Houdini, write them into some channel (I used color), and then apply them in UE4 using “Previous Frame Switch”. This setup works if instead of a Color brought from the “VAT Material Function” node I use color constant - eg. I use vector 0,0,10 which blurs very nicely my points upwards.


But whenever I use the exported Color being my velocities from Houdini nothing happens. Even when I crank up the values 1000x still the blur is none.


I must be missing some step.
Edited by beny - 2020年5月28日 15:26:15

Attachments:
notWorking.jpg (281.1 KB)
working.jpg (278.9 KB)

User Avatar
Member
9 posts
Joined: 12月 2013
Offline
Hey Mike, I still cannot get motion blur to work the way I'm doing it. Could you please point me in the right direction? Should it work and I missed something or I'm doing it completely wrong?
User Avatar
Member
394 posts
Joined: 5月 2017
Offline
Hey Beny,

I'm looking into this now. Just to confirm a couple things.
Is your mesh set to movable?
Have you enabled “Output velocities during base pass” and “Output velocities due to vertex deformation” in your project settings?
Which version of Unreal are you running?
User Avatar
Member
394 posts
Joined: 5月 2017
Offline
Okay. I think I have something working, but I suspect the resolution of the motion vector field in UE4 is still causing issues.
I've copied v into Cd, but remember to swap the Y and Z channels.


And then in the material function add your changes. The color needs to be sampled in the vertex shader and if you do it outside the material function it gets confused with the fragment shader in this case.

Attachments:
fluid_velocity_v_to_Cd.png (6.9 KB)
fluid_velocity_material_function.png (235.4 KB)

User Avatar
Member
9 posts
Joined: 12月 2013
Offline
WOHO! Works! Thank you Mike! You rock!!

Attachments:
Main.0031.jpg (959.8 KB)

User Avatar
Member
31 posts
Joined: 6月 2017
Offline
mikelyndon-sesi
Okay. I think I have something working, but I suspect the resolution of the motion vector field in UE4 is still causing issues.
I've copied v into Cd, but remember to swap the Y and Z channels.
Image Not Found


And then in the material function add your changes. The color needs to be sampled in the vertex shader and if you do it outside the material function it gets confused with the fragment shader in this case.
Image Not Found

Thanks for this;

where do you put the wrangle thats throwing the vectors into the Cd?
User Avatar
Member
10 posts
Joined: 3月 2016
Offline
Hi, I'm using Unreal 5 and I'm not quite sure where to plug my velocity texture into the material. The only way to have motion that I found was to use this setup but I have weird horizontal lines of motion blur. Does somebody know how to have clean motion blur with my velocity texture?




https://streamable.com/0z9lah [streamable.com]
https://imgur.com/a/6ksx3uf [imgur.com]
Edited by tutumannyaque - 2022年8月3日 17:22:58
  • Quick Links