MODELDEF question

Advanced OpenGL source port fork from ZDoom, picking up where ZDoomGL left off.
[Home] [Download] [Git builds (Win)] [Git builds (Mac)] [Wiki] [Repo] [Bugs&Suggestions]

Moderator: Graf Zahl

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

MODELDEF question

Post by Enjay »

Edit: Nevermind the original post (now spoilered). I solved my problem with an animated model. However, I would still like to know the answer to the question that I will post in the next post.

[spoiler]Just want to check that I am doing things right.
The following MODELDEF shows all 3 models when POSSA is being used.

Code: Select all

Model Tram2
{ 
   Path "Models" 
   Model 0 "tram2body.md3" 
   Skin 0 "tram2.png"
   
   Model 1 "tram2pass1.md3" 
   Skin 1 "tram2.png"
   
   Model 2 "tram2pass2.md3" 
   Skin 2 "tram2.png"
   
   Scale 0.8 0.8 0.8
   
   FrameIndex POSS A 0 0
}
My impression was that the correct syntax for such a situation should actually be:

Code: Select all

Model Tram2
{ 
   Path "Models" 
   Model 0 "tram2body.md3" 
   Skin 0 "tram2.png"
   
   Model 1 "tram2pass1.md3" 
   Skin 1 "tram2.png"
   
   Model 2 "tram2pass2.md3" 
   Skin 2 "tram2.png"
   
   Scale 0.8 0.8 0.8
   
   FrameIndex POSS A 0 0
   FrameIndex POSS A 1 0
   FrameIndex POSS A 2 0
}
So which is right?


What I actually want to do is have a MODELDEF that in one frame uses only one of the models but in another uses all three. However, with the first modeldef above using all 3 models even though only one is specified, I'm not sure how to achieve this, or if it is even possible.

What I tried was this:

Code: Select all

Model Tram2
{ 
   Path "Models" 
   Model 0 "tram2body.md3" 
   Skin 0 "tram2.png"
   
   Model 1 "tram2pass1.md3" 
   Skin 1 "tram2.png"
   
   Model 2 "tram2pass2.md3" 
   Skin 2 "tram2.png"
   
   Scale 0.8 0.8 0.8
   
   FrameIndex POSS A 0 0

   FrameIndex POSS B 0 0
   FrameIndex POSS B 1 0
   FrameIndex POSS B 2 0
}
but POSSA showed all three models.[/spoiler]
User avatar
Enjay
Developer
Developer
Posts: 4748
Joined: Tue Aug 30, 2005 23:19
Location: Scotland
Contact:

Re: MODELDEF question

Post by Enjay »

When defining a multi-part model, both of these show all 3 models but I am not convinced that the first one should. Can someone please confirm the correct syntax for me and whether the first one showing all 3 models is a bug or not. Thanks.

Code: Select all

Model Tram2
{ 
   Path "Models" 
   Model 0 "tram2body.md3" 
   Skin 0 "tram2.png"
   
   Model 1 "tram2pass1.md3" 
   Skin 1 "tram2.png"
   
   Model 2 "tram2pass2.md3" 
   Skin 2 "tram2.png"
   
   Scale 0.8 0.8 0.8
   
   FrameIndex POSS A 0 0
}

Code: Select all

Model Tram2
{ 
   Path "Models" 
   Model 0 "tram2body.md3" 
   Skin 0 "tram2.png"
   
   Model 1 "tram2pass1.md3" 
   Skin 1 "tram2.png"
   
   Model 2 "tram2pass2.md3" 
   Skin 2 "tram2.png"
   
   Scale 0.8 0.8 0.8
   
   FrameIndex POSS A 0 0
   FrameIndex POSS A 1 0
   FrameIndex POSS A 2 0
}
DoomKn1ght
Posts: 2
Joined: Mon Mar 15, 2010 2:07

Re: MODELDEF question

Post by DoomKn1ght »

Can I use this multipart model in order to make an animated model ? I tried this:

Code: Select all

Model InvulnerabilitySphere2
{
   Path "MD3\powerups\invulnerabilitysphere"
   Model 0 "invsphere.md3"
   Skin 0 "mapinvsphereA.png"
   Model 1 "invsphere.md3"
   Skin 1 "mapinvsphereB.png"
   Model 2 "invsphere.md3"
   Skin 2 "mapinvsphereC.png"
   Model 3 "invsphere.md3"
   Skin 3 "mapinvsphereD.png"
   Scale 0.5 0.5 0.5

   FrameIndex PINV A 0 0
   FrameIndex PINV B 1 0
   FrameIndex PINV C 2 0
   FrameIndex PINV D 3 0
}
But all models are spawned together. While reading the wiki, I guessed it was possible.

Code: Select all

   Frame FRAM A 0 0 // All four models are drawn when you call frame "FRAM A"
   Frame FRAM A 1 0
   Frame FRAM A 2 0
   Frame FRAM A 3 0
I supposed that when you call frame B models from frame A should be removed.
dark-slayer-201
Posts: 149
Joined: Thu Jul 16, 2009 14:31

Re: MODELDEF question

Post by dark-slayer-201 »

This is a non-common or even unknown method.

Code: Select all

Model InvulnerabilitySphere2
{
   Path "MD3\powerups\invulnerabilitysphere"
   Model 0 "invsphere.md3"
   Skin 0 "mapinvsphereA.png"
   Scale 0.5 0.5 0.5

   FrameIndex PINV A 0 0
}
Model InvulnerabilitySphere2
{
   Path "MD3\powerups\invulnerabilitysphere"
   Model 0 "invsphere.md3"
   Skin 0 "mapinvsphereB.png"
   Scale 0.5 0.5 0.5

   FrameIndex PINV B 0 0
}
Model InvulnerabilitySphere2
{
   Path "MD3\powerups\invulnerabilitysphere"
   Model 0 "invsphere.md3"
   Skin 0 "mapinvsphereC.png"
   Scale 0.5 0.5 0.5

   FrameIndex PINV C 0 0
}
Model InvulnerabilitySphere2
{
   Path "MD3\powerups\invulnerabilitysphere"
   Model 0 "invsphere.md3"
   Skin 0 "mapinvsphereD.png"
   Scale 0.5 0.5 0.5

   FrameIndex PINV D 0 0
}
@Enjay, All the models are drawn at 1st frame if not defined. I don't believe that it is a bug. Tt has become useful and time saving without writing extra modeldef for models or actors that do not animate.
Just_Jim
Posts: 11
Joined: Tue Sep 21, 2010 15:39

Re: MODELDEF question

Post by Just_Jim »

Here are three files that look good in Heretic using the gzDoom engine
heretic-gui.pk3 21-Sep-2010 09:42 12M
heretic-models.pk3 09-Oct-2010 17:08 9.3M
heretic-textures.pk3 21-Sep-2010 10:16 34M

http://www-personal.umich.edu/~jimw/Cla ... gzHeretic/

the gui and textures are complete - I have found some more models and will update them when I have time.

EDIT: fixed the link
Last edited by Just_Jim on Tue Oct 12, 2010 15:19, edited 1 time in total.
User avatar
Gez
Developer
Developer
Posts: 1399
Joined: Mon Oct 22, 2007 16:47

Re: MODELDEF question

Post by Gez »

That link doesn't work. It seems you copy/pasted a forum post from elsewhere, after the forum software shortened the displayed link text.
Just_Jim
Posts: 11
Joined: Tue Sep 21, 2010 15:39

Re: MODELDEF question

Post by Just_Jim »

Link to Heretuc textures abd models -

http://www-personal.umich.edu/~jimw/Cla ... gzHeretic/
dark-slayer-201
Posts: 149
Joined: Thu Jul 16, 2009 14:31

Re: MODELDEF question

Post by dark-slayer-201 »

Maybe it is best if you start your own thread about it, than in a help topic.
Just_Jim
Posts: 11
Joined: Tue Sep 21, 2010 15:39

Re: MODELDEF question

Post by Just_Jim »

Good idea. I will start a Heretic/Hexen thread when I finish MODELDEFs for the Heretic Models that need to be defined.
Locked

Return to “GZDoom”