From 57966332b8dbd163cd1bb825eb227efba5e66398 Mon Sep 17 00:00:00 2001 From: LegendaryGuard Date: Sun, 17 Apr 2022 21:58:43 +0000 Subject: [PATCH] Complete exporting new methodology, old methodology not completely explained yet --- Exporting-a-weapon-for-Xonotic.md | 48 ++++++++++++++++++++++++------- 1 file changed, 37 insertions(+), 11 deletions(-) diff --git a/Exporting-a-weapon-for-Xonotic.md b/Exporting-a-weapon-for-Xonotic.md index 09b9bf6..5b2cefd 100644 --- a/Exporting-a-weapon-for-Xonotic.md +++ b/Exporting-a-weapon-for-Xonotic.md @@ -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` -
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: +
blenderSMDexport1
+Repeat the process:
blenderSMDexport2

+blenderSMDexport3

+blenderSMDexport4 +

-Rename extension to MD3: `v_myweapon.iqm` to `v_myweapon.md3` +- For `g_*` and `v_*`: +Just select the mesh: +
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=
+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

+There's a post from InsideQC Forums explaining about IQM: + For `h_*.iqm`, you will need to do this: There is a simple way: -- 2.39.2