Download

Motion blur on changing topology alembic cache

Hi!
I’m struggling with a technique for giving motion blur to an alembic cache that I am importing into the engine.
I’m following the kind of technique used between Houdini and Maya, in which I give Maya the velocity vectors per vertex via vertex color. But I’m having issues with the fact that Unreal only reads the vertex colors in a value range of 0-1, which is highly insufficient.
What I’m trying is to bring this info baked into UV sets, using U and V(inverted) from the first set as the X and Y components of the vector, and U from the second set as the Z component, and then giving these vectors as the second input for the PreviousFrameSwitch node. But it still doesn´t seem to work as I expected, and I don’t know why. It definitely builds some motion blur, but is kind of noisy and it doesn´t seem to match the direction of the movement very well.

Do any of you guys know of a good procedure to give this kind of geometries Motion Blur in Unreal? It would be very much appreciated to know how everyone has managed to achieve this effect.

Thanks in advance, have a nice day.

Unfortunately I don’t have a perfect solution to this either – the closest thing I’ve found is an engine change which allowed materials to write to the velocity buffer directly. There’s a video tutorial on this, but I noticed that the video has become unlisted on youtube, so I don’t think posting it publicly is really appropriate. I’ll message it to you directly if you’re interested.

As far as the previous frame switch node, it seems like you’ve gotten farther than I ever managed. I’ve seen examples that appear to work, but only as long as some data is passed into the material as a parameter. I haven’t been able to make it do anything at all in a “self-contained” material even with “Accurate velocities from Vertex Deformation” turned on. Any chance you could share your node setup?

I’ve gotten something that “sort of” works by applying a rapidly oscillating WPO along motion vectors, but it’s still definitely not a great substitute.

This thread explains how it works i believe. You pass a variable for previous frame time, and a variable for current frame time. So when you run the animation, pass the time of the animation and the time - 1 frame and use those as two inputs.

https://answers.unrealengine.com/questions/593581/how-to-use-the-previous-frame-switch-node.html

Thanks both of you :wink:
I found that, when importing the alembic as a Geometry Cache, it doesn´t bring a second UV set, so my Z component was the same as the X component, and that wasn´t correct…
I finally got it working remaping my values to a 0-1 range and storing the “remap multiplier factor” en the alpha channel, so I can feed the PreviousFrameSwitch correctly. All this as Vertex Colours.

And, as said, works! :slight_smile:

@amoser : I’d be interested in this video tutorial as well, if it’s still online. Feel free to PM me if you can.

I’m having issues with alembic geometry caches and motion blur too.
The thing is that disabling motion blur (in Project settings) fixes most of the bug, but there are still small artifacts whenever the player starts moving. I’m quite at a loss, so I’m now thinking of writing directly to the velocity buffer as it seems the issue is velocity-induced. I have no idea about how to do it in Unreal Engine though. :frowning: