1.0.29 Model Interpolation - is this working as expected?

Bugs that have been resolved.

Moderator: Graf Zahl

Locked
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

1.0.29 Model Interpolation - is this working as expected?

Post by Enjay »

I'm not entirely sure this is a bug but, if not a bug as such, perhaps it is an area where interpolation could be improved, or perhaps it will be something that is best left sorted out by the new "don't interpolate" flag.

Anyway, load up the linked pk3 in Doom (or any other game I guess) and summon zpoisonshroom. If you have model interpolation on, it will look very screwy (the mushroom turns itself inside out as it goes through its cycle of briefly swelling and making the squeeze noise). Switch interpolation off and it will work properly. I know the poison mushroom is a little odd (I had a look at the source code and saw that it had extra stuff in there that I didn't understand) but is there a way of improving on this?

The model is in fact a fire extinguisher from Wim Sitters that I messed around with. :P

http://www.zen64060.zen.co.uk/shroomtest.pk3
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

Looks like a serious bug in the interpolation code.
User avatar
ChupaReaper
Posts: 202
Joined: Fri Jun 15, 2007 16:35
Location: England
Contact:

Post by ChupaReaper »

When using multiple models or skins, the interpolation causes the whole model to disappear and reappear whist switching from 'model 0' to 'model 1', etc.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

That's not something I've had a problem with and I have some models that change skins, some that change models and some that change both.

I have been wondering why there is a limit of only 4 models per actor though. If an actor has some form of animation (the ones I've been using are all 4 frames) and you want a different skin or appearance for the actor's corpse, you quickly run out of models. 4 seems very low given the usual high numbers of options in (G)Zdoom.
User avatar
Nash
Developer
Developer
Posts: 1226
Joined: Sun Sep 25, 2005 1:49
Location: Kuala Lumpur, Malaysia
Contact:

Post by Nash »

To be honest, I never understood how or what is modelindex supposed to achieve.

To me, it seems like a huge hack and what Graf has provided us was merely jDoom code copy and pasted into GZDoom without much thought in the design of the system.

Observe this MODELDEF:

Code: Select all

Model DoomPlayer_
	{ 
	Path "models/player"

	Model 0 "player.md2"
	Skin 0 "green.pcx"

	Model 1 "weapon.md2"
	Skin 1 "weapon.pcx"

	Scale 1.2 1.2 1.2

	// Standing
	Frame NULA A 0 "stand01"
	Frame NULA A 1 "stand01"
	
	// Running
	Frame NULC A 0 "run1"
	Frame NULC A 1 "run1"
	 
	Frame NULC B 0 "run2"
	Frame NULC B 1 "run2"
	
	Frame NULC C 0 "run3"
	Frame NULC C 1 "run3"
	
	Frame NULC D 0 "run4"
	Frame NULC D 1 "run4"
	
	Frame NULC E 0 "run5"
	Frame NULC E 1 "run5"
	
	Frame NULC F 0 "run6"
	Frame NULC F 1 "run6"
	
	// Attacking
	Frame NULD A 0 "attack1"
	Frame NULD A 1 "attack1"
	
	Frame NULD B 0 "attack2"
	Frame NULD B 1 "attack2"
	
	Frame NULD C 0 "attack3"
	Frame NULD C 1 "attack3"
	
	Frame NULD D 0 "attack4"
	Frame NULD D 1 "attack4"
	
	Frame NULD E 0 "attack5"
	Frame NULD E 1 "attack5"

	Frame NULD F 0 "attack6"
	Frame NULD F 1 "attack6"
	
	Frame NULD G 0 "attack7"
	Frame NULD G 1 "attack7"
	
	Frame NULD H 0 "attack8"
	Frame NULD H 1 "attack8"
	
	// Pain
	Frame NULE A 0 "pain101"
	Frame NULE A 1 "pain101"
	
	Frame NULE B 0 "pain102"
	Frame NULE B 1 "pain102"
	
	Frame NULE C 0 "pain103"
	Frame NULE C 1 "pain103"
	
	Frame NULE D 0 "pain104"
	Frame NULE D 1 "pain104"
	
	
	// Death
	Frame NULF A 0 "death301"
	Frame NULF A 1 "death"

	Frame NULF B 0 "death302"
	Frame NULF B 1 "death"

	Frame NULF C 0 "death303"
	Frame NULF C 1 "death"

	Frame NULF D 0 "death304"
	Frame NULF D 1 "death"

	Frame NULF E 0 "death305"
	Frame NULF E 1 "death"

	Frame NULF F 0 "death306"
	Frame NULF F 1 "death"

	Frame NULF G 0 "death307"
	Frame NULF G 1 "death"

	Frame NULF H 0 "death308"
	Frame NULF H 1 "death"
	
	}
This is what it takes to properly attach the gun model to the player; defining it any other way will cause the models to flicker back and forth.
User avatar
ChupaReaper
Posts: 202
Joined: Fri Jun 15, 2007 16:35
Location: England
Contact:

Post by ChupaReaper »

Not all my models are effected by this disapearing and reaprearing bug, just some at random, my arachnotron completely vanishes when firing, and the spider mastermind flashes off and on again when chaging into the corpse skin, yet some others work fine. Normally, I'm doing something wrong, but here I just can't find out what's really causing this.
There needs to be a new way to change skins alone, and none sticky models would be nice; as if I change from model 0 to model 1, I have to set model 0 to frame 999 or something so that it isn't flying around on top of model 1, I then have to set model 1 to frame 999 so that it'll leave model 0 alone when switching back again; each model should only be visible on frames that they're called to. If one can make any sense of that!
DaniJ
Posts: 130
Joined: Sat Oct 08, 2005 19:22

Post by DaniJ »

The modelindex does indeed have a purpose in Doomsday (I can't pretend to know what it does in GZDoom though). It isn't a hack at all and is an itegral part of the model renderer which has been exposed to resource authors to allow extended functionality.

Thats what you get for copyn'pasting code :P
User avatar
Torr Samaho
Developer
Developer
Posts: 160
Joined: Fri Apr 13, 2007 8:26
Location: Germany
Contact:

Post by Torr Samaho »

Enjay wrote:I have been wondering why there is a limit of only 4 models per actor though.
There is a limit of four models per frame, not per actor, but you have to write the definition in a different manner, see here.

EDIT: There was a bug in the interpolation code affecting ZPoisonShroom. Just fixed it.
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Post by Enjay »

Just flagging up that this bug no longer presents itself (presumably due to Torr's fix) and the thread should probably be moved.
Locked

Return to “Closed Bugs”