]> git.xonotic.org Git - xonotic/xonotic.wiki.git/commitdiff
Complete exporting new methodology, old methodology not completely explained yet
authorLegendaryGuard <rootuser999@gmail.com>
Sun, 17 Apr 2022 21:58:43 +0000 (21:58 +0000)
committerLegendaryGuard <rootuser999@gmail.com>
Sun, 17 Apr 2022 21:58:43 +0000 (21:58 +0000)
Exporting-a-weapon-for-Xonotic.md

index 09b9bf6e1efe824396cd3092ed5d99059edef669..5b2cefddd9194ff134c9e134822e7b4edc383c50 100644 (file)
@@ -1,4 +1,4 @@
-## :rotating_light: :warning: WARNING: This tutorial is under construction! :warning: :rotating_light: 
+# This article looks complete, [old methodology](#old-methodology) isn't a very complete section due to  the obsolescence
 
 # Modeling requirements
 ### To follow this, you need knowledge about modeling using Blender
@@ -22,8 +22,8 @@ Optional:
 **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](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.
+- `h_*.iqm`: for first person animations (if this step used [old methodology](#old-methodology) is a glue of `v_*`); 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 third person; 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)
 
@@ -70,28 +70,52 @@ Moreover, watch out about position and rotation. `h_*.iqm` alterates the positio
 
 `g_*` and `v_*` MUST contain one bone. The animations can't be included. It isn't like `h_*`.
 
+The animations are `fire`, `fire2`, `idle` and `reload`.
+
+# New methodology
+
+You can make optional customized animations adding bones for the animations.
+
 ## SMD (includes IQM converter and dpmodel guide)
 
-Use Source Tools to export the model. Selecting the mesh and 1 animation, ............ (Guide WIP)
+Use Source Tools addon in Blender to export the model and animations. 
 
-Use iqm.exe from [IQM exporter](https://gitlab.com/xonotic/iqm), in Windows, in CMD execute: `iqm v_myweapon.iqm v_mesh.smd`
-<br/>Linux: `./iqm.exe v_myweapon.iqm v_mesh.smd`
+- For `h_*`:
+Select the mesh and 1 animation and click Export, you need to export all animations one per one: 
+<br/><img src="uploads/3775545047aa58d6e4fcb37df4f500a1/blenderSMDexport1.jpg" alt="blenderSMDexport1" width=700 /><br/>
+Repeat the process:<br/><img src="uploads/b7c8b250fc1af6b30c999506e7143930/blenderSMDexport2.jpg" alt="blenderSMDexport2" width=700 /><br/><br/>
+<img src="uploads/9e9efa19232d1c47fd982ad0da2eb1df/blenderSMDexport3.jpg" alt="blenderSMDexport3" width=700 /><br/><br/>
+<img src="uploads/2c929b6993d5e370c1d5498a03cb4ba8/blenderSMDexport4.jpg" alt="blenderSMDexport4" width=700 />
+<br/><br/>
 
-Rename extension to MD3: `v_myweapon.iqm` to `v_myweapon.md3`
+- For `g_*` and `v_*`:
+Just select the mesh:
+<br/><img src="uploads/ec37639792378bb6ef9684b19d45a056/blenderSMDexport5.jpg" alt="blenderSMDexport5 width=700 /><br/>
 
-Use dpmodel tool to generate `h_myweapon.dpm` and `h_myweapon.dpm.framegroups`.
-<br/>Rename extension to IQM: `h_myweapon.dpm` to `h_myweapon.iqm` and `h_myweapon.dpm.framegroups` to `h_myweapon.iqm.framegroups`.
+Use `iqm.exe` from [IQM exporter](https://gitlab.com/xonotic/iqm), in Windows, in CMD execute for convert SMD to IQM for `v_*` and `g_*`: <br/>`iqm v_myweapon.iqm v_mesh.smd`
+<br/>`iqm g_myweapon.iqm g_mesh.smd`
+<br/><br/>Linux: `./iqm.exe g_myweapon.iqm g_mesh.smd`
+<br/>`./iqm.exe v_myweapon.iqm v_mesh.smd`
 
-More info about dpmodel tool: [dpmodel](dpmodel)
+Rename extension to MD3: <br/>`g_myweapon.iqm` to `g_myweapon.md3`<br/>and `v_myweapon.iqm` to `v_myweapon.md3`
 
+Use dpmodel tool to generate `h_myweapon.dpm` and `h_myweapon.dpm.framegroups`, in command line execute: `dpmodel yourconfig.txt`
+<br/>More info explained about dpmodel tool: [dpmodel](dpmodel)
+<br/>Rename extension to IQM: `h_myweapon.dpm` to `h_myweapon.iqm` and `h_myweapon.dpm.framegroups` to `h_myweapon.iqm.framegroups`.
+
+Save those compiled model files into `models/weapons/` folder where they belong.
 
 **Conclusion**: 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
 
+If you received spamming errors like that:<br/>
+<img src="uploads/1f769ede89975be78d88eaad1b062a3d/spammingerrorstagweapon.jpg" alt="spammingerrorstagweapon" width=600 /><br/>
+It's because you didn't do correctly the steps after exporting the models. Remember, `g_*` and `v_*` MUST contain one bone. 
+
 # Old methodology
 
 **IMPORTANT**: In this methodology, you can't make cool animations with separated objects, because `h_*.iqm` here is a plane mesh with bones.
 
-Note: the model should be rotated as YXZ, instead being XYZ. Because the pit of the weapon is Y, horizontally is X.
+Note: the model should be rotated as YXZ, instead being XYZ. Because the tip of the weapon is Y, horizontally is X.
 
 `tag_weapon` is a MUST bone for this methodology.
 
@@ -109,6 +133,8 @@ Before to export, you need to select all objects and bones in the scene. (Pressi
 
 <br/>
 <br/>
+There's a post from InsideQC Forums explaining about IQM:
+
 For `h_*.iqm`, you will need to do this:
 
 There is a simple way: