Index | FAQ | Search | Memberlist | Usergroups | Profile | Log in to check your private messages | Log in | Register

Half-life.MDL support

| Inside3d Forums Forum Index -> Engine Programming

View previous topic :: View next topic
Author | Message
--- | ---
ceriux Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA |

Posted: Thu Jan 08, 2009 9:16 am Post subject: Half-life.MDL support |

No... sorry i havnt written a tutorial on how to implement it.... but id like to see it done... because i was informed it wasnt in DP... that being said i was also told that LH didnt have any of the specs required to know how to do it and also him and his team arnt working on dp atm. so before i herd that last part i went through and did a little research on where to get the specs for it.
so far i found ....
the source for the original half-life mdl viewer (which im sure everything needed could be found there)
http://chumbalum.swissquake.ch/files/hlmv125.zip
and a really good mdl viewer for hl i found and used (jeds hlmdl viewer) i couldnt find a source for his program but he is contactable on his website if his email is still valid.
which the info and his website is here:
http://www.wunderboy.org/apps/jhlmv.php
the reason i bring this up is id like to see a tutorial on how to do it, so i can maybe try and attempt to implement it.
if this is done we should (afaik) be able to include sub-models which would help alot of things! (3rd person viewable weapon models and save on free edicts- i think the word was.)
anyways this is my little begging session for a tutorial on how to implement the format into glquake. thanks for your time and reading my thread. try not to flame me too bad if its a stupid request.
_________________
QuakeDB - Quake ModDB Group

Back to top |

leileilol Joined: 15 Oct 2004 Posts: 1321 |

Posted: Thu Jan 08, 2009 10:22 am Post subject: |

FTEQW has support for HL mdl, and it doesn't involve the non-Free sources you posted.

Back to top |

ceriux Joined: 06 Sep 2008 Posts: 969 Location: Florida, USA |

Posted: Thu Jan 08, 2009 11:16 am Post subject: |

what do you mean non free? you dont have to pay for those... _________________ QuakeDB - Quake ModDB Group

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Thu Jan 08, 2009 12:09 pm Post subject: |

ceriux wrote:
what do you mean non free? you dont have to pay for those...

Non-free means -- among other things -- the license agreement with the source code.

Back to top |

MauveBib Joined: 04 Nov 2004 Posts: 602 |

Posted: Thu Jan 08, 2009 12:19 pm Post subject: |

Free as in speech, not free as in beer. _________________ Apathy Now!

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Thu Jan 08, 2009 11:58 pm Post subject: |

FTEQW's gl_hlmdl.c: I wonder how the QuakeC looks and how the QuakeC would control all of this ...

Code:
#include "quakedef.h" #ifdef HALFLIFEMODELS #include "glquake.h" /* +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Half-Life Model Renderer (Experimental) Copyright (C) 2001 James 'Ender' Brown [ender@quakesrc.org] This program is
free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as
published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied
warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
details. You should have received a copy of the GNU General Public License along with this program; if not, write
to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. fromquake.h -
render.c - apart from calculations (mostly range checking or value conversion code is a mix of standard Quake 1
meshing, and vertex deforms. The rendering loop uses standard Quake 1 drawing, after SetupBones deforms the vertex.
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Also, please note that it won't do all hl models....
Nor will it work 100%
*/
#include "model_hl.h"
void QuaternionGLMatrix(float x, float y, float z, float w, vec4_t *GLM)
{
GLM[0][0] = 1 - 2 * y * y - 2 * z * z;
GLM[1][0] = 2 * x * y + 2 * w * z;
GLM[2][0] = 2 * x * z - 2 * w * y;
GLM[0][1] = 2 * x * y - 2 * w * z;
GLM[1][1] = 1 - 2 * x * x - 2 * z * z;
GLM[2][1] = 2 * y * z + 2 * w * x;
GLM[0][2] = 2 * x * z + 2 * w * y;
GLM[1][2] = 2 * y * z - 2 * w * x;
GLM[2][2] = 1 - 2 * x * x - 2 * y * y;
}
/*
=======================================================================================================================
QuaternionGLAngle - Convert a GL angle to a quaternion matrix
=======================================================================================================================
*/
void QuaternionGLAngle(const vec3_t angles, vec4_t quaternion)
{
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
float yaw = angles[2] * 0.5;
float pitch = angles[1] * 0.5;
float roll = angles[0] * 0.5;
float siny = sin(yaw);
float cosy = cos(yaw);
float sinp = sin(pitch);
float cosp = cos(pitch);
float sinr = sin(roll);
float cosr = cos(roll);
/*~~~~~~~~~~~~~~~~~~~~~~~~~~~~*/
quaternion[0] = sinr * cosp * cosy - cosr * sinp * siny;
quaternion[1] = cosr * sinp * cosy + sinr * cosp * siny;
quaternion[2] = cosr * cosp * siny - sinr * sinp * cosy;
quaternion[3] = cosr * cosp * cosy + sinr * sinp * siny;
}
#define MAX_BONES 128
...

Back to top |

Downsider Joined: 16 Sep 2008 Posts: 478 |

Posted: Mon Jan 12, 2009 5:44 pm Post subject: |

Interesting; how would all that be controlled? Would you just load your models like a regular model?

Back to top |

Baker Joined: 14 Mar 2006 Posts: 1538 |

Posted: Mon Jan 12, 2009 8:47 pm Post subject: |

Downsider wrote:
Interesting; how would all that be controlled? Would you just load your models like a regular model?

I don't know. Yet.
It'll have to invest time on researching it.
Or examine DarkPlaces and look at dpmodel and see how that works.

Back to top |

Spike Joined: 05 Nov 2004 Posts: 944 Location: UK |

Posted: Wed Jan 14, 2009 5:35 pm Post subject: |

The quakec is horrible, only csqc has full control over it. regular qc subframe blends are locked at 50%, as are bone controlers. thus you loose all the usefulness of the format. csqc has extra fields to blend stuff properly. I never did bother making a csqc mod animate it fully, although I think the engine is capable of all the animation stuff barring drawing subsections of models (different scientists have different details on them but are the same model). don't think it supports the chrome stuff either.
fte's hl model code is based on the source that ender released on quakesrc ages ago.
_________________
What's a signature?

Back to top |

Zylyx_ Joined: 05 Dec 2007 Posts: 111 Location: scotland, uk |

Posted: Sat Jan 17, 2009 2:42 pm Post subject: |

This might perhaps sound stupid, but why dont you just convert the HL MDL's into the DP .dpm file foprmat, and rename the extension back to .mdl and there you go. Or maybe you want something more... _________________ ....noodle...

Back to top |

Display posts from previous:

| Inside3d Forums Forum Index -> Engine Programming | 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