Forum

Animated static mesh

Discuss the construction of maps and the tools to create maps for 3D games.

Moderator: InsideQC Admins

Animated static mesh

Postby razvanab » Tue Jul 05, 2011 1:47 pm

it is possible to import an animated static mesh inside darkplaces ?
razvanab
 
Posts: 13
Joined: Wed May 14, 2008 5:12 pm

Postby thorn3001 » Tue Jul 05, 2011 3:04 pm

Good morning, I guess you mean the creation of maps. Quake 3 GtkRadiant, import models in. MD3. ASE. OBJ, be careful with textures.
DP supports a number of faces.

Blender has a plugin to export in Quake3. Map format
User avatar
thorn3001
 
Posts: 29
Joined: Tue Jun 28, 2011 6:09 am
Location: Bogotá, Col

Postby razvanab » Tue Jul 05, 2011 3:22 pm

i know that
but i was wondering if you can import an animated mesh

for example:

Image
razvanab
 
Posts: 13
Joined: Wed May 14, 2008 5:12 pm

Postby Spike » Tue Jul 05, 2011 3:59 pm

the only animated meshes you can import into a bsp are those using shader vertex modifiers.

that said, some mods do support a 'func_model' entity, which would allow you to place a model of some kind in the map. if it has a framegroup instead of descrete frames, it'll automatically animate.

but you do need more than the base id1 progs/qc.
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Postby Ranger366 » Tue Jul 05, 2011 4:17 pm

Spike wrote:'func_model' entity


Code: Select all
void() func_model =
{
   precache_model (self.model);
   setmodel (self, self.model);
};


Hmm, can be placed anywhere. misc.qc or whatever.
User avatar
Ranger366
 
Posts: 203
Joined: Thu Mar 18, 2010 5:51 pm

Postby razvanab » Tue Jul 05, 2011 5:18 pm

i don't know how correct this is but is working for me:

Code: Select all
/*QUAKED func_model (0 1 0) (-8 -8 -8) (8 8 8)
Animated sprite or model.
*/

void() model_think =
{
   self.nextthink = time + 0.1;
   self.frame = self.frame + 1;
   if (self.frame >= 10)
      self.frame = 0;
};

void() func_model =
{
   self.solid = SOLID_BSP;
   self.think = model_think;
   self.nextthink = time + 0.1;   
   precache_model (self.model);
   setmodel (self, self.model);
};
razvanab
 
Posts: 13
Joined: Wed May 14, 2008 5:12 pm

Postby razvanab » Tue Jul 05, 2011 5:59 pm

this works as well:

Code: Select all
/*QUAKED misc_static_model (0 1 0) (-8 -8 -8) (8 8 8)
Animated sprite or model.
*/
void() misc_static_model =
{
   if (!self.model)
   {
      remove (self);
      return;
   }
       
   precache_model (self.model);
   setmodel (self, self.model);
   
   self.movetype = MOVETYPE_NOCLIP;
   self.solid = SOLID_BSP;
};

/*QUAKED misc_animated_model (0 1 0) (-8 -8 -8) (8 8 8)
model.
*/

void() model_think =
{
   self.nextthink = time + 0.1;
   self.frame = self.frame + 1;
   if (self.frame >= 10)
      self.frame = 0;
};

void() misc_animated_model =
{
   self.solid = SOLID_BSP;
   self.think = model_think;
   self.nextthink = time + 0.1;   
   precache_model (self.model);
   setmodel (self, self.model);
};
razvanab
 
Posts: 13
Joined: Wed May 14, 2008 5:12 pm

Re: Animated static mesh

Postby Nahuel » Tue Jul 05, 2011 6:37 pm

you can use a *.zym! it´s great!
hi, I am nahuel, I love quake and qc.
User avatar
Nahuel
 
Posts: 492
Joined: Wed Jan 12, 2011 8:42 pm
Location: mar del plata

Re: Animated static mesh

Postby Madfox » Fri Nov 04, 2011 3:01 am

Make a model and turn it into a static entity.

Image
User avatar
Madfox
 
Posts: 106
Joined: Sat Jan 15, 2005 3:13 pm
Location: Holland

Re: Animated static mesh

Postby Chip » Fri Nov 04, 2011 11:06 am

^^^ Would love to see that in game :shock:
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays

Fear not the dark, but what the dark hides.
User avatar
Chip
 
Posts: 575
Joined: Wed Jan 21, 2009 9:12 am
Location: Dublin, Ireland

Re: Animated static mesh

Postby metlslime » Fri Nov 04, 2011 6:28 pm

probably want to use makestatic() if possible, to reduce edict count and packet size.
metlslime
 
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Re: Animated static mesh

Postby Madfox » Fri Nov 11, 2011 3:15 am

I would like to make it a makestatic() entity, but where should I count this in?
For now I used a simple "model.mdl" methode.

Code: Select all
$frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14

void() plug_stand1   =[  $1,   plug_stand2    ]{};
void() plug_stand2   =[  $2,   plug_stand3    ]{};
void() plug_stand3   =[  $3,   plug_stand4    ]{};
void() plug_stand4   =[  $4,   plug_stand5    ]{};
void() plug_stand5   =[  $5,   plug_stand6    ]{};
void() plug_stand6   =[  $6,   plug_stand7    ]{};
void() plug_stand7   =[  $7,   plug_stand8    ]{};
void() plug_stand8   =[  $8,   plug_stand9    ]{};
void() plug_stand9   =[  $9,   plug_stand10  ]{};
void() plug_stand10   =[  $10,   plug_stand11  ]{};
void() plug_stand11   =[  $11,   plug_stand12  ]{};
void() plug_stand12   =[  $12,   plug_stand13  ]{};
void() plug_stand13   =[  $13,   plug_stand14  ]{};
void() plug_stand14   =[  $14,   plug_stand1    ]{};

void() info_plug =
{
   precache_model ("progs/plug.mdl");
   self.solid = SOLID_BBOX;                               
   self.movetype = MOVETYPE_NONE;

   setmodel (self, "progs/plug.mdl");

   setsize (self, '16 16 16', '24 24 24');
   self.think = plug_stand1;
   self.nextthink = time + 0.1;
};


That gives an impression like this:
Image
but I have no idea what it uses on edict count and packet size.
Just glad I got it working although it is a bit large for a 480x480 skin size,
what is all I can get out of QMLE. It's still the only editor I can work with.
8)
Last edited by Madfox on Thu Dec 08, 2011 6:24 am, edited 2 times in total.
User avatar
Madfox
 
Posts: 106
Joined: Sat Jan 15, 2005 3:13 pm
Location: Holland

Re: Animated static mesh

Postby Spike » Fri Nov 11, 2011 12:46 pm

you can't change the .frame if its a static entity. you'd need to make a framegroup to get such an ent to animate (and not all engines that support interpolation interpolate between framegroup frames).
Spike
 
Posts: 2892
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Animated static mesh

Postby frag.machine » Sat Nov 12, 2011 12:46 am

Madfox wrote:I would like to make it a makestatic() entity, but where should I count this in?
For now I used a simple "model.mdl" methode.

Code: Select all
$frame 1 2 3 4 5 6 7 8 9 10 11 12 13 14

void() plug_stand1   =[  $1,   plug_stand2    ]{};
void() plug_stand2   =[  $2,   plug_stand3    ]{};
void() plug_stand3   =[  $3,   plug_stand4    ]{};
void() plug_stand4   =[  $4,   plug_stand5    ]{};
void() plug_stand5   =[  $5,   plug_stand6    ]{};
void() plug_stand6   =[  $6,   plug_stand7    ]{};
void() plug_stand7   =[  $7,   plug_stand8    ]{};
void() plug_stand8   =[  $8,   plug_stand9    ]{};
void() plug_stand9   =[  $9,   plug_stand10  ]{};
void() plug_stand10   =[  $10,   plug_stand11  ]{};
void() plug_stand11   =[  $11,   plug_stand12  ]{};
void() plug_stand12   =[  $12,   plug_stand13  ]{};
void() plug_stand13   =[  $13,   plug_stand14  ]{};
void() plug_stand14   =[  $14,   plug_stand1    ]{};

void() info_plug =
{
   precache_model ("progs/plug.mdl");
   self.solid = SOLID_BBOX;                               
   self.movetype = MOVETYPE_NONE;

   setmodel (self, "progs/plug.mdl");

   setsize (self, '16 16 16', '24 24 24');
   self.think = plug_stand1;
   self.nextthink = time + 0.1;
};


That gives an impression like this:

http://members.home.nl/gimli/plug.wmv

but I have no idea what it uses on edict count and packet size.
Just glad I got it working although it is a bit large for a 480x480 skin size,
what is all I can get out of QMLE. It's still the only editor I can work with.
8)



Open your model in QME 3.1, and add all individual frames into a single framegroup. Save it. Now Quake will animate the model automatically. That's how torches are animated.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Re: Animated static mesh

Postby mankrip » Sun Nov 13, 2011 2:23 pm

Spike wrote:you can't change the .frame if its a static entity. you'd need to make a framegroup to get such an ent to animate (and not all engines that support interpolation interpolate between framegroup frames).

Plus, not all engines that interpolate framegroups does it based on the time interval of the frames, and always interpolates everything at 0.1 seconds instead.
Ph'nglui mglw'nafh mankrip Hell's end wgah'nagl fhtagn.
==-=-=-=-=-=-=-=-=-=-==
Dev blog / Twitter / YouTube
User avatar
mankrip
 
Posts: 915
Joined: Fri Jul 04, 2008 3:02 am


Return to Mapping

Who is online

Users browsing this forum: No registered users and 1 guest