Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Variable frame times #1

Open
Fnugz opened this issue Oct 2, 2020 · 4 comments
Open

Variable frame times #1

Fnugz opened this issue Oct 2, 2020 · 4 comments

Comments

@Fnugz
Copy link

Fnugz commented Oct 2, 2020

Add a way for the user to set the time it takes to move between two keyframes.
For each individual node or just globally would be nice.

@samisalreadytaken
Copy link
Owner

Interpolation resolution determines that time. The function to set it already exists, but it wasn't listed in the command list. I just renamed it and added it to the list: script kf_res( value )

value range is [0.001, 0.5]. 0.01 is the default value. Lower the value, higher the resolution, longer it takes to travel between keyframes.

I think having individual settings for each section would be unnecessary, and requires time that I don't currently have. That is better fitted for video editing. You can always use host_timescale too if you don't mind world elements (animated props, particles and textures) also changing speed.

@djmattyg007
Copy link

Being able to script each individual keyframe like this would be a godsend to be honest. It would help produce the most natural-looking playback in the final product.

@samisalreadytaken
Copy link
Owner

My initial thought was that it would be jarring because of sudden speed changes without some custom smoothing.

Implementing this may require fundamental changes as the logic wasn't written accounting for such thing, and the keyframe handling code is unideal. I may look into it if I find time to rework some things.

@samisalreadytaken samisalreadytaken changed the title Time between keys Variable frame rate Jun 6, 2021
@samisalreadytaken samisalreadytaken changed the title Variable frame rate Variable frame times Jun 26, 2021
@samisalreadytaken
Copy link
Owner

v1.2.9 adds the option to set interpolation sampling rate on individual key frames using script kf_frametime(time) or script kf_samplecount(amt). This is WIP, and only the first step; I will need to revise the sampling algorithm to be able to make the transitions between key frames with different rates smooth.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants