#How do I do flipbook frame interpolation for a regular game object?
1 messages · Page 1 of 1 (latest)
You'll have to do it manually in a shader.
Use two flipbook node, one on frame n and one on frame n+1, and lerp them by the fraction of the frame index.
Excellent. I know I had to do it manually and I knew I had to learp frames manually, I was just too stupid to figure out how exactly
This makes so much sense
So I wasn't quite able to make it. Right now I have this
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
ahhh I'm stupid. I was adding +1 to time
no, wait. Time still has to go in there
so isn't that the same
I tried to edit on my phone, but spazi version is easier to read 🙂
(And I didn't invert the lerp inputs)
This and more in importable "VisualEffectGraph Additions"
You increment Frame by time, or by whichever
The flipbook or blending parts don't need to be concerned with that
I don't get this. Why does it need to be the same speed?
but don't I already do that in my graph?
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
that makes sense, but it still doesn't work for me
the multipy after add still goes into the tile of the flipbook, right?
it seems to me like I'm already doing this
More readable maybe ?
yeah sorry, I got rid of the redundant multiply
I had two multiplies for some reason, now it's one
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
It was just a duplicate multiply, for some reason I made two for each flipbook, now I cleaned it up with one
that makes sense, yet it still doesn't work
to clarify, my version without frame interpolation works just fine, so it shouldn't be the flipbooks that are wrong or something
here is the comparison
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
does the video indicate anything in particular?
It make me think the UV is somehow connected to the frame number of the flip book 🤔
A lot of moving parts and variables there so it's hard to say if the problem is with this node group particular or somewhere else
And crucially not all of it is visible
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
Yeah I may have to clip a video here
Can you make a shader with just the flipbook blending over time first
Here's the video first
Ah, you're lerping the flipbook UV's, not the flipbook UV sampled textures
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
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
ok it works
but there's still something weird
there is lerping but there is still some frame jumping
also, I should have drawn them more centered but it's what it is
I feel you really must test it without all the other effects
hmm I notice in the graph preview that happens when the fraction node resets to black
it lerps while it's turning more and more white
and when it goes back to black, it skips
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
here
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
Sorry, I cannot say that precisely with the distortion in the way
I would like to identify which specific frame of the ghost is being faded in/out and if that happens at correct rate, and actually correlates to the ghost that's being swapped to
It also looks like the UVs are being zoomed in because the ghosts at the corners of the flipbook texture seem to be the ones getting offset
I switched the lerp inputs again
Either because of your UV distortion, or because of some other cause
now everything is working fine, thanks
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

I am sorry
my methodology is to just get angry and smash my head against a problem
I like .1 efficiency I guess
@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
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
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
that's 100% correct but the problem is I always think I'm just about to get it, so it makes no sense to go the lounger route and remake it lol
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
yeah ok I guess I'll adapt with time
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
time to verify some assumptions
While that is admirable, at some point you need to make the decision about whether you are there to learn the logic or to make a game... 😄 You could drill down all the way to the unity sourcecode and not understand the logic behind some of the decisions that were made.
In this case, I rly wanted to learn
It's not for my game anyway
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.