Page 1 of 1

Models jump when sprite name changes

Posted: Thu Nov 01, 2007 21:03
by Enjay
Only happens when model frame interpolation is on.

I was testing out a model from Quake2 - the satellite dish. It has 39 frames of animation - it rises, wiggles a bit and then rotates. To show all those frames in one smooth movement requires 39 sprite frames to be allocated to different model frames. As you know, Doom sprites can't have 39 frames, being limited to the alphabet plus [ ] \ (or is it / ?). So, I used 2 sprite sets (POSS and SPOSS). The animation works almost as intended, but when the decorate actor switches from one set of sprites to the next, there is a brief, but very noticeable jump back to the first frame in the model.

The attached file has 3 actors defined. Test43 does the up/down animation smoothly. Test43a does the side to side. Test43b has the whole animation using 2 sets of sprites and you can see the jerk effect when the sprite name changes.

http://www.zen64060.zen.co.uk/sattest.zip

Posted: Thu Nov 01, 2007 21:30
by Nash
Probably has something to do with this.

It's a pity Graf is pretty much not interested in improving the 3-d features of GZDoom in favour of DoomScript...

(That's not a bad thing though, I'd rather have DoomScript first)

I guess I'll have to pester someone to fix the model stuff (like Torr :P).

BTW: do you notice how the model wobbles as it moves? That's the reason why I hate the MD2 format (you might recall me just ranting a lot about how I don't like MD2 and prefer MD3s... well that's why). Just some random information for you. :P

Posted: Thu Nov 01, 2007 22:09
by Graf Zahl
I'm sorry but the 3D stuff isn't really my thing. I may have to ask for outside help to improve it. I'm more interested with the game logic itself.

Posted: Thu Nov 01, 2007 23:30
by Torr Samaho
Fixed. Just replace

Code: Select all

			if ( inter != 0.0 )
				smfNext = gl_FindModelFrame(RUNTIME_TYPE(spr->actor), spr->actor->sprite, nextState->Frame);
with

Code: Select all

			if ( inter != 0.0 )
				smfNext = gl_FindModelFrame(RUNTIME_TYPE(spr->actor), nextState->sprite.index, nextState->Frame);
in gl_models.cpp.
Nash wrote:Probably has something to do with this.
That's a different problem, but also should be easy fixable.