Inside3D!
     

Programming question regarding MDLs...

 
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Modeling
View previous topic :: View next topic  
Author Message
Willem



Joined: 23 Jan 2008
Posts: 73

PostPosted: Fri Jan 16, 2009 2:25 pm    Post subject: Programming question regarding MDLs... Reply with quote

OK, so inside the MDL file format there is support for simple frames and group frames. I'm trying to get it straight in my head which is good for what.

It looks like things like the walltorch use group frames. Is this so the engine can start animating them on a random frame? I don't see anything in the QuakeC that uses this information so it must be engine side.

Am I thinking about this the right way? Do group frames have other uses?
_________________
www.wantonhubris.com
Back to top
View user's profile Send private message Visit poster's website
Spike



Joined: 05 Nov 2004
Posts: 944
Location: UK

PostPosted: Fri Jan 16, 2009 3:34 pm    Post subject: Reply with quote

framegroups autoanimate. this saves network bandwidth, and is required for animated 'static' items like walltorches.

for the most part, you don't know which actual frame will be shown at any given time, so its use is somewhat limited to basic stuff, like static items.
interestingly there are skingroups too.

framegroups can be controlled in csqc using frame1time/frame2time as the linear progression through the sequence. server-side qc has no control of framegroups other than to use one instead of a static frame.

logically you could implement your stand/run/walk animation as a framegroup. I'm not sure how many engines actually implement 4-way interpolation though. so mneh.
_________________
What's a signature?
Back to top
View user's profile Send private message Visit poster's website
MeTcHsteekle



Joined: 15 May 2008
Posts: 397
Location: its a secret

PostPosted: Fri Jan 16, 2009 6:16 pm    Post subject: Reply with quote

Spike wrote:
logically you could implement your stand/run/walk animation as a framegroup. I'm not sure how many engines actually implement 4-way interpolation though. so mneh.


i was thinking about that a few months ago, would save time eh?
_________________
bah
Back to top
View user's profile Send private message AIM Address
frag.machine



Joined: 25 Nov 2006
Posts: 728

PostPosted: Sat Jan 17, 2009 1:05 am    Post subject: Reply with quote

The .mdl format support random or synchronized animations, so you can indeed create looping animation groups for walking, standing and others. IIRC I saw a few models for Prydon Gate NPC's using this technique. The main advantage would be not having to write boring QuakeC stuff.
_________________
frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/
Back to top
View user's profile Send private message Visit poster's website
Urre



Joined: 05 Nov 2004
Posts: 1073
Location: Sweden

PostPosted: Sat Jan 17, 2009 12:15 pm    Post subject: Reply with quote

frag: Not only that, but also reduces network load a lot, because frame updates don't need to be sent at all. Perfect for all kinds of static animations, like trees blowing in the wind and whatnot.
_________________
Look out for Twigboy
Back to top
View user's profile Send private message Visit poster's website
frag.machine



Joined: 25 Nov 2006
Posts: 728

PostPosted: Sat Jan 17, 2009 1:55 pm    Post subject: Reply with quote

Urre: yeah, but only if you're talking about static entities. Dynamic entities still receiving update messages with the same frame number over and over.
_________________
frag.machine - Q2K4 Project
http://fragmachine.quakedev.com/
Back to top
View user's profile Send private message Visit poster's website
MeTcHsteekle



Joined: 15 May 2008
Posts: 397
Location: its a secret

PostPosted: Tue Jan 20, 2009 1:50 pm    Post subject: Reply with quote

ya, so i like, grouped the stand/run/walk frames, but when i code it do i have to code them out like :
Code:
$frame stand1 stand2 stand3 etc.
or can i just do
Code:
$frame stand1
??


also i am wondering with the bars of frame code would it ok like:
Code:
void() gug_stand1   =[   $stand1,   gug_stand1   ] {ai_stand();if (random() > 0.8)
   sound (self, CHAN_VOICE, "folder/sound.wav", 1, ATTN_IDLE);};
??
_________________
bah
Back to top
View user's profile Send private message AIM Address
Display posts from previous:   
Post new topic   Reply to topic    Inside3d Forums Forum Index -> Modeling All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2004 phpBB Group