]> git.xonotic.org Git - xonotic/xonotic.wiki.git/commitdiff
Add IQM exporting info and .iqm.framegroups explanation info
authorLegendaryGuard <rootuser999@gmail.com>
Fri, 8 Apr 2022 18:04:47 +0000 (18:04 +0000)
committerLegendaryGuard <rootuser999@gmail.com>
Fri, 8 Apr 2022 18:04:47 +0000 (18:04 +0000)
Exporting-a-weapon-for-Xonotic.md

index ea6a91b8bb09898714e227087b7a3310ef746e6d..a63a891502adc9db16f4800c3f750c7172934d91 100644 (file)
@@ -9,13 +9,14 @@ Requires these following tools (addons) for Blender:
 - [IQM exporter](https://gitlab.com/xonotic/iqm) to export IQM files.
 - [MD3 importer/exporter](https://github.com/neumond/blender-md3) to import/export MD3 files.
 
-***IMPORTANT NOTE**: if you want to contribute, it's strongly important use 2.79b version for compatibility cases, they need to open from this version. Share the .blend file saved from 2.79b, make sure to work properly for this version!*
+***IMPORTANT NOTE**: if you want to contribute, it's strongly important use 2.79b version for compatibility cases, they need to open from this version. Share the .blend file using 2.79b or earlier , make sure to work properly from this version!*<br/>
+*If the version of a file is later than 2.79b, we may to make some tweaks and become tedious.*
 
 # Introduction to export a weapon
 **Keep in mind about weapon systems:**
 
 - `g_*.md3`: model mesh for item pickup spawn and third person.
-- `h_*.iqm`: for first person animations; the skeleton and the bones (the rigging and animation part). Keep in mind, you would need `*.iqm.framegroups` (more info: [Framegroups](https://gitlab.com/xonotic/xonotic/-/wikis/framegroups), you can look `*.iqm.framegroups` opening a notepad to see what animations contain and the keyframes where these are set)
+- `h_*.iqm`: for first person animations; the skeleton and the bones (the rigging and animation part). Keep in mind, you would need `*.iqm.framegroups` (more info: [Framegroups](framegroups), you can look `*.iqm.framegroups` opening a notepad to see what animations contain and the keyframes where these are set)
 - `v_*.md3`: model mesh for first person and a glue of `h_*`; if `h_*.iqm` doesn't match with the animations needed of `v_*.md3`, it will generate spamming errors and bad pivot position.
 
 More info: [Weapon modeling system](Weaponsystem)
@@ -67,6 +68,56 @@ Before to export, you need to select all objects and bones in the scene. (Pressi
 
 <img src="uploads/7df860d73a6fae27408c8f0c024122c7/exporttutorialIQM.jpg" alt="exporttutorialIQM" />
 
+<br/>
+<br/>
+For `h_*.iqm`, you will need to do this:
+
+There is a simple way:
+
+You just can use an iqm model like a regular mdl file, you only need to use each frame as a framegroup.
+
+For example, if you have an iqm called "rocketlauncher.iqm" with 20 frames you need to create a framegroup file with notepad like this:
+
+```
+1 1 1 0  
+2 1 1 0  
+3 1 1 0  
+4 1 1 0  
+5 1 1 0  
+6 1 1 0  
+7 1 1 0  
+8 1 1 0  
+9 1 1 0  
+10 1 1 0  
+11 1 1 0  
+12 1 1 0  
+13 1 1 0  
+14 1 1 0  
+15 1 1 0  
+16 1 1 0  
+17 1 1 0  
+18 1 1 0  
+19 1 1 0  
+20 1 1 0  
+```
+So you will save it with the name.
+
+"rocketlauncher.iqm.framegroups" and place it in the same directory where "rocketlauncher.iqm" is located.
+
+About the framegroups file (explained on [Framegroups](framegroups)):
+
+The first number represents the start frame of the animation (.framegroups files always start at frame 0, some modeling software starts at 1, so you might have to subtract 1 for the start frame).
+
+The second number represents how many frames is in that specific frame group.
+
+The third number is the frame rate at which the sequence plays. This is independent from what the monsters "think" rate is, which I have set at 10 frames-per-second.
+
+The fourth number is whether the frame sequence loops. 1 for true, 0 for false. The only frame groups that should loop are the standing, walking and running animations.
+
+It becomes very tedious to make framegroups for models with really many frames, you can use this sample generated for the darkplaces model compiler. It will work in every iqm model (if you wan you only need to cut the specific number of frames in the framegroups file, but it will work anyway)
+
+Reference: [IQM animation framegroups (InsideQC Forums)](https://forums.insideqc.com/viewtopic.php?p=55949&sid=952cd347938ae5f2bb8bde276b5a35cd#p55949)
+
 
 Sometimes, renaming formats can be useful to save effort. Note: it's a kind of weird way to do stuff, the issue of model resources was found here: https://gitlab.com/xonotic/xonotic-data.pk3dir/-/issues/2629#note_686988936