UE5 Niagara Fluids - Baking out flow / velocity map

Hello there, I see that there’s an option in the niagara baker for baking various attributes, though I haven’t the foggiest of how to do so, they’re all mostly blank. How would I go about baking out a flow, velocity, or any other attribute?

Thank you

I don’t really have any solution because I’ve never attempted to bake motion vector from Niagara Fluid. (It is horrendously electricity intensive.) Rather after a quick check I kinda have some idea why you can’t see anything from the Velocity Buffer.

AFAIC, the velocity buffer only gives you the mesh (as well as individual particle) velocity change of each pixel. As the fluid domain itself is “static”, it would not write anything into the velocity buffer. Another issue is that all Fluid materials read scene depth from the buffer which prevents itself from writing anything into the buffer.

In all Gas 2D examples, you can kinda get something from the “DataInterface - Velocity” in the baker source, but it is not normalized from [-1,1] to [0,1] range, and the color is so saturated which doesn’t seem to be useful for motion vector.

1 Like

Hi there, you can try TFlow for baking flow maps.

You can give it any flipbook and it will output a flow map flipbook, pretty fast, and it’s not electricity intensive :smile:

1 Like

I’ll look into this, thanks for the information on how the fluids are actually rendered, very informative! My heart goes out to your electricity bill.

1 Like

I’ll definitely check this out, it seems like a really useful tool, pricey, but if it works as well as it says then I’ll get a lot of use out of it.

1 Like

Klemen Lozar's Online Portfolio - Tutorial to creating the effect in Unreal Engine
https://www.facedownfx.com/ - Link to Slate editor for creating optical flow maps

So diving a bit more into the topic of Optical Flow maps, I found a few resources which have helped me setup a good system for them for my needs and for free. Slate editor allows you to create the motion vectors that drive blending between SubUV frames, and the tutorial linked will show how to set up the effect for use in game.

TFlow looks like a really great alternative if you want something fast and high quality, but it seems like you can get the same result for free without too much hassle.

Might not solve the inital question, but hopefully this helps anyone else looking into the issue.