Page 1 of 1

MODELDEF question

Posted: Fri Mar 05, 2010 23:59
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]

Re: MODELDEF question

Posted: Sat Mar 06, 2010 1:58
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
}

Re: MODELDEF question

Posted: Thu Mar 18, 2010 2:39
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.

Re: MODELDEF question

Posted: Thu Mar 18, 2010 8:18
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.

Re: MODELDEF question

Posted: Sun Oct 10, 2010 0:33
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

Re: MODELDEF question

Posted: Tue Oct 12, 2010 12:28
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.

Re: MODELDEF question

Posted: Tue Oct 12, 2010 15:20
by Just_Jim
Link to Heretuc textures abd models -

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

Re: MODELDEF question

Posted: Thu Oct 14, 2010 7:59
by dark-slayer-201
Maybe it is best if you start your own thread about it, than in a help topic.

Re: MODELDEF question

Posted: Thu Oct 14, 2010 19:19
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.