eidosmontreal / unreal-vdb

This repo is a non-official Unreal plugin that can read OpenVDB and NanoVDB files in Unreal.
Apache License 2.0
686 stars 108 forks source link

VDB sequence frames mismatch in animation sequencer #80

Closed Andrej730 closed 1 year ago

Andrej730 commented 1 year ago

Found a bug when vdb added as a track in animation sequence has different amount of frames than it actually have.

Example. I've made simple VDB to demonstrate it (exported from Embergen), it has 120 frames (you can download it here - https://drive.google.com/file/d/1jADoSUYNgkTDlhVvTrxChDRKAph8i2Py/view?usp=share_link). You can see in VDB asset details that it indeed has 120 frames. When I add it as a track it has 96 frames (frames 0-95). I can tweak it by decreasing playrate but I guess this value should match with the frames from VDB asset.

PS I'm using VdbToVolumeTexture

https://user-images.githubusercontent.com/9417531/233590204-75c00f45-1062-4755-a8a8-eb09f3ecd462.mp4

thilamb commented 1 year ago

Hello, thanks for the detailed description.

Your sequencer FPS is most likely at 24fps instead of 30fps which explains the different number of frames.

The animation is imported at 30fps so we assume it's meant to play for X seconds (in your example 120 frames / 30fps = 4 seconds), whether your sequencer is playing at 24fps, 30 fps or any other fps. You can see the result by changing the display for Time instead of Frames. Your animations playing speed should not (and do not) depend on your display frame rate.

Let me know if that makes sense to you. Thanks

Andrej730 commented 1 year ago

Yes, it does. Is there reasons behind plugin forcing 30 fps besides historical ones? It would be nice to be able to set the fps it at import then, it would allow to work with good play rate values.

thilamb commented 1 year ago

Yes, changing import fps has been on my todo list for more than a year now, but I still haven't done it, sorry.

I will do it soon on my personal github (I'm now only fixing issues here since I left the company).

Andrej730 commented 1 year ago

@thilamb you mean for the new features it's worth also keeping track for https://github.com/thilamb/unreal-vdb or they will be released elsewhere?

thilamb commented 1 year ago

Yes, all new features will be released on https://github.com/thilamb/unreal-vdb only.