Interpolation between states for models

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

Moderators: GZDoom Developers, Raze Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Post Reply
JunkerKun
Posts: 38
Joined: Wed Aug 05, 2015 7:44 pm

Interpolation between states for models

Post by JunkerKun »

Hey there!

Is there a way to enable unterpolation between states for models? Like when actor changes state then frames will change smoothly, not instantly.
Or do I need to use nasty ckutches for that?
Diode
Posts: 53
Joined: Mon Feb 29, 2016 2:34 pm

Re: Interpolation between states for models

Post by Diode »

Aren't they interpolated already?
JunkerKun
Posts: 38
Joined: Wed Aug 05, 2015 7:44 pm

Re: Interpolation between states for models

Post by JunkerKun »

Diode wrote:Aren't they interpolated already?
No. When you change states the animation will be changed instantly.
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Interpolation between states for models

Post by Apeirogon »

If you use something like "the hand is down in first frame - hand is up un next frame" of course it will be twitching. Especialy if you use 1 ticks delay between them.
Use intermediate frames fro this, the more frames you make the smoother animation will be between this frames.

Or, probably, you use NOINTERPOLATION flag, which, obivious, completely disable interpolation.
JunkerKun
Posts: 38
Joined: Wed Aug 05, 2015 7:44 pm

Re: Interpolation between states for models

Post by JunkerKun »

Apeirogon wrote:If you use something like "the hand is down in first frame - hand is up un next frame" of course it will be twitching. Especialy if you use 1 ticks delay between them.
Use intermediate frames fro this, the more frames you make the smoother animation will be between this frames.

Or, probably, you use NOINTERPOLATION flag, which, obivious, completely disable interpolation.
No, that's not it. What I'm talking about is the transition between _states_, not frames. As soon as you change _state_ the current frame is set to the first one in the new state. I kind of understand why it does that but is there a way to enable the interpolation so the state wouldn't change immediately and have model frames change smoothly?
User avatar
Apeirogon
Posts: 1605
Joined: Mon Jun 12, 2017 12:57 am

Re: Interpolation between states for models

Post by Apeirogon »

Can you please share video or wad/pack with this problem? Because Im not sure what you mean.
User avatar
R4L
Global Moderator
Posts: 400
Joined: Fri Mar 03, 2017 9:53 am
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11 Pro
Graphics Processor: nVidia (Modern GZDoom)
Contact:

Re: Interpolation between states for models

Post by R4L »

Apeirogon wrote:Can you please share video or wad/pack with this problem? Because Im not sure what you mean.
He means the jerkiness of switching states. For example, an Imp walking around then suddenly facing the player to throw a fireball instead of turning through its rotations first or doing a "winding up" animation of some sort.
JunkerKun
Posts: 38
Joined: Wed Aug 05, 2015 7:44 pm

Re: Interpolation between states for models

Post by JunkerKun »

R4L wrote:
Apeirogon wrote:Can you please share video or wad/pack with this problem? Because Im not sure what you mean.
He means the jerkiness of switching states. For example, an Imp walking around then suddenly facing the player to throw a fireball instead of turning through its rotations first or doing a "winding up" animation of some sort.
No, not this. I'll try to explain it a little better, since I don't really have a wad to show this, nor can I record a video at the moment.
Imaine you have two states: Idle and Run. Idle has 5 frames and Run has 5 frames. Now when an actor is in state Idle all frames are interpolated - they change each other smoothly. But as soon as state is changed to Run actor immediately shows the first frame from state Run and then begins to interpolate between them. So there is no interframes between frame in Idle and a frame in Run.
User avatar
Hellser
Global Moderator
Posts: 2705
Joined: Sun Jun 25, 2006 4:43 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Windows 11
Graphics Processor: ATI/AMD with Vulkan/Metal Support
Location: Citadel Station

Re: Interpolation between states for models

Post by Hellser »

I get what he's trying to say. Interpolation between states. Take for an example the Cyberdemon's firing pose and his normal walking pose. If it was a model, it would 'snap' to the firing pose. With interpolation, he'll move into the firing pose without the model maker or coder having to create additional frames.
User avatar
Jaxxoon R
Posts: 772
Joined: Sun May 04, 2014 7:22 pm

Re: Interpolation between states for models

Post by Jaxxoon R »

I've always tended to work around this by starting every state with a couple frame long

Code: Select all

"----" A
so that it transitions more smoothly
Post Reply

Return to “Assets (and other stuff)”