IQM implementation in Darkplaces
Moderator: InsideQC Admins
6 posts
• Page 1 of 1
IQM implementation in Darkplaces
How would one implement IQM in Darkplaces engine (taking into account the IQM files are .cpp?
I looked into its source and it's a bit complicated for me at this stage. I learned that Alien Arena has IQM completely implemented, so I'm downloading it now. I also found evidence
that Xonotic uses it, though not 100% documented or optimized. I'll check that, too.
It seems that I could duplicate the .dpm function or the .md3 one and add in the IQM info.
So, if no one cares to join the discussion, I'll come back with whatever I can find on this.
EDIT #1: Shouldn't be too hard. Xonotic implementation uses only 2 files for the engine side.
I looked into its source and it's a bit complicated for me at this stage. I learned that Alien Arena has IQM completely implemented, so I'm downloading it now. I also found evidence
It seems that I could duplicate the .dpm function or the .md3 one and add in the IQM info.
So, if no one cares to join the discussion, I'll come back with whatever I can find on this.
EDIT #1: Shouldn't be too hard. Xonotic implementation uses only 2 files for the engine side.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
-

Chip - Posts: 575
- Joined: Wed Jan 21, 2009 9:12 am
- Location: Dublin, Ireland
leileilol wrote:why aren't you using a newer DP build that already has it to begin with?
It seems that the build I'm using has the files, however they're hidden in the project view. Anyway, the .h files seem to be included, and I'll have to check a .QC example model.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
-

Chip - Posts: 575
- Joined: Wed Jan 21, 2009 9:12 am
- Location: Dublin, Ireland
After further reading this would be some kind of implementation:
Some of this code has been taken from Xonotic.
Is it enough to just replace an .md3 weapon model with an .iqm?
I'll need to find an .iqm model as I'm not familiar with Blender.
Would the .qc code for diferrent animations be like the one above?
From dpwiki:
However:
EDIT #2: Just replaced a weapon .md3 model with an .iqm one. Except for a console error regarding a missing texture, the .iqm model is not visible.
NOTE: The weapon appears correctly (with animations) in the demo.exe application from http://lee.fov120.com/iqm/.
- Code: Select all
setmodel(self, strcat("models/weapons/v_pistol.iqm"));
animfilename = strcat("models/weapons/v_pistol.iqm.animinfo"); // or is it .framegroups? // do I need a frames file anyway?
animfile = fopen(animfilename, FILE_READ);
self.anim_fire1 = '0 1 0.01';
self.anim_fire2 = '1 1 0.01';
self.anim_idle = '2 1 0.01';
self.anim_reload = '3 1 0.01';
Some of this code has been taken from Xonotic.
Is it enough to just replace an .md3 weapon model with an .iqm?
I'll need to find an .iqm model as I'm not familiar with Blender.
Would the .qc code for diferrent animations be like the one above?
From dpwiki:
All of these formats can use a .framegroups file (for example models/something/blah.dpm.framegroups) which contains lines such as:
1 20 30 1 // idle1
21 15 30 0 // jump
These lines contain: firstframe numframes framerate loopflag
However:
Formats which do not need a .framegroups file to get automated playback of animations (I.E. an animation sequence being set by quakec as a single .frame assignment): mdl (requires special configuration of frames in modeling program), zym, iqm.
EDIT #2: Just replaced a weapon .md3 model with an .iqm one. Except for a console error regarding a missing texture, the .iqm model is not visible.
NOTE: The weapon appears correctly (with animations) in the demo.exe application from http://lee.fov120.com/iqm/.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
-

Chip - Posts: 575
- Joined: Wed Jan 21, 2009 9:12 am
- Location: Dublin, Ireland
few quake mods even bother with framegroups. really the only thing its normally used for is torch models.
yes, it can be useful when you have user-selectable player models or csqc stuff like displacement-based animation speeds, but otherwise you can ignore them completely if your model doesn't already use them.
if you're making a regular quake mod, the different model formats are directly interchangable from a qc perspective.
as leileilol said, try a later build.
yes, it can be useful when you have user-selectable player models or csqc stuff like displacement-based animation speeds, but otherwise you can ignore them completely if your model doesn't already use them.
if you're making a regular quake mod, the different model formats are directly interchangable from a qc perspective.
as leileilol said, try a later build.
- Spike
- Posts: 2892
- Joined: Fri Nov 05, 2004 3:12 am
- Location: UK
Spike wrote:if you're making a regular quake mod, the different model formats are directly interchangable from a qc perspective.
as leileilol said, try a later build.
OK, won't bother with framegroups. I tried the latest build and the .iqm model (I used a simple weapon) did not show up. I'll dig more and look inside Xonotic, too, to see how the .iqm models are called inside QC.
QuakeWiki
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
getButterfly - WordPress Support Services
Roo Holidays
Fear not the dark, but what the dark hides.
-

Chip - Posts: 575
- Joined: Wed Jan 21, 2009 9:12 am
- Location: Dublin, Ireland
6 posts
• Page 1 of 1
Who is online
Users browsing this forum: No registered users and 1 guest