#How do I do flipbook frame interpolation for a regular game object?

1 messages · Page 1 of 1 (latest)

onyx nexus
#

(for particles, there's a subgraph node)

plush peak
onyx nexus
#

This makes so much sense

onyx nexus
#

this scrolls the flipbook smoothly, but it doesn't jump frames and interpolate them

#

it just literally scrolls the texture back and forth

#

not quite sure what the problem is

onyx nexus
#

no, wait. Time still has to go in there

#

so isn't that the same

plush peak
#

I tried to edit on my phone, but spazi version is easier to read 🙂
(And I didn't invert the lerp inputs)

orchid mortar
#

This and more in importable "VisualEffectGraph Additions"

orchid mortar
onyx nexus
onyx nexus
plush peak
#

Frame n and n+1 need to be synced for the lerp to work properly

#

Ex : at n=2.6, the lerp will blend frame 2 with 60% of frame 3.

#

Then a bit later, at n=3.2, frames will be swapped and frame 3 will be lerped with 20% of frame 4

onyx nexus
#

the multipy after add still goes into the tile of the flipbook, right?

onyx nexus
plush peak
#

More readable maybe ?

onyx nexus
#

I had two multiplies for some reason, now it's one

orchid mortar
#

Yeah, we couldn't see were the inputs were coming from or what they were multiplied by

#

When they should've been coming from just one place without multiplication

onyx nexus
#

It was just a duplicate multiply, for some reason I made two for each flipbook, now I cleaned it up with one

plush peak
#

Switch A and B input of the lerp nose

#

A is frame n, B is n+1

onyx nexus
#

to clarify, my version without frame interpolation works just fine, so it shouldn't be the flipbooks that are wrong or something

plush peak
#

I don't see why it wouldn't work with the said modification ...
At that point maybe et would be simpler and more readable to use the working subgraph from VFX additions

onyx nexus
#

does the video indicate anything in particular?

plush peak
#

It make me think the UV is somehow connected to the frame number of the flip book 🤔

orchid mortar
#

Doesn't help that the images are a bit shrunk and compressed
I recommend fullscreening before snipping
Or showing all the nodes in a video

#

But prefer to troubleshoot just one part at a time

onyx nexus
orchid mortar
#

Can you make a shader with just the flipbook blending over time first

onyx nexus
orchid mortar
#

Subtle difference but the subgraph is using "sample flipbook"

#

The frac and lerp are meant to accomplish fading between two textures
But if you fade between two UVs it is a smooth scrolling motion

onyx nexus
#

oh

#

I'll fix right now

#

you know, I was wondering if that wasn't the issue

#

cause lerping flipbooks I'd expect to make a scrolling motion like this

#

but I thought I must be wrong as you guys hadn't noticed it lol

#

it was visible from the above screenshots

orchid mortar
#

Sample Flipbook is just this

#

Looks like we all rushed

onyx nexus
#

ok it works

#

but there's still something weird

#

also, I should have drawn them more centered but it's what it is

orchid mortar
#

I feel you really must test it without all the other effects

onyx nexus
#

it lerps while it's turning more and more white

#

and when it goes back to black, it skips

orchid mortar
#

I can't see what the flipbooking and fading are precisely doing behind all the distortion

#

And if you are demoing it after modifying you should show the nodes in the clip while at it

onyx nexus
#

you can see that the noise before the lerp is irrelevant, since the two texture samples are displayed correctly, right?

#

shit hits the fan with the fraction node

#

nvm I figured it out

orchid mortar
onyx nexus
#

I switched the lerp inputs again

orchid mortar
#

Either because of your UV distortion, or because of some other cause

onyx nexus
#

now everything is working fine, thanks

orchid mortar
#

I guarantee we would have figured out these issues three hours ago if you had followed an empirical troubleshooting process and eliminated unnecessary and vague variables from testing

onyx nexus
#

I am sorry

#

my methodology is to just get angry and smash my head against a problem

#

I like .1 efficiency I guess

orchid mortar
#

@onyx nexus when working with arrays or flipbooks I always start with placeholders because it's so easy to make false assumptions without precise visual feedback
Like these for example get repeated use

onyx nexus
#

the first one makes sense, yea

#

but tbh I never had problems before

#

for particles, there's the flipbook blending node or whatever it's called

#

but I prefer to learn manually, rather than using subgraphs

#

I like to understand the logic fully

#

unless it's something too complicated that I'm too stupid for

orchid mortar
# onyx nexus but I prefer to learn manually, rather than using subgraphs

It's a double edged thing
Being stuck is an opportunity for learning
But being stuck is not itself learning, especially if the hitch turns out to be just a brain fart rather than requiring some new piece of knowledge
So I think it's more efficient to start with an example that's known to work, even if you have to motivate yourself to study it in some external way

#

In both cases though you want to use methods that don't waste time and resources
Which means precise testing

onyx nexus
orchid mortar
#

If there's one thing I learned in my years is not to take those shortcuts ^^
And if I choose to take a shortcut, do it with precise understanding what assumptions I'm relying on

#

So I know what assumptions I need to question next when it still fails

#

It has the overlooked benefit that if your testing is not accurate and it works, there's the insidious chance it didn't work for the reasons you assume
So you walk away with more confidence but less real understanding which will bite you later

onyx nexus
#

yeah ok I guess I'll adapt with time

orchid mortar
#

There will be a sign, when you get tired of feeling frustrated and impatient in troubleshooting

#

At this point I can assume water is wet and then one day it's not and I'm like catup time to verify some assumptions

north fractal
onyx nexus
#

It's not for my game anyway

north fractal
#

Well, the basic logic is pretty simple. You get the frame number and use the number of columns and modulo to get the row, and then do the same for the frame+1. Then you blend between then over a specified slice of time.