Hello, I’ve just recently started experimenting with QuakeC, and for that I’m using my Quake flavor of choice: Darkplaces.
I’ve read an online QuakeC tutorial explaining how to turn a weapon into a makeshift plasma gun with existing models, and it worked fine. My second experiment was to replace the weapon firing sound by loading a different .wav file from QuakeC, and it also worked fine. Finally, I’ve attempted to replace the default weapon model with a new .md3 model, and that’s where the problem is. The model itself is loaded fine, but its textures are not, so the model appears white.
As you can see from https://imgur.com/a/MXWq6G9, the game attempts to load the texture with various extensions (its real extension is .png) and complains of “nasty filename rejected”.
The path where it allegedly cannot find the texture is the actual path where I have placed it.
I have uploaded my experiment https://mega.nz/#!hf5RUaQC!cg3dZ1N_e_3_y7OObeoaoTCvJqkk8ZbKYvmSrtVujZg. Please, tell me what I’m doing wrong because I don’t understand.
To test it, unzip it into a “mymod” subdirectory of your Darkplaces folder, and then launch the game with the command:
darkplaces -game mymod
Get all weapons with “impulse 9”, and see the untextured weapon with “4”.
So you are trying to convert the Duke 3D chaingun into Quake
Yes, your filename is really nasty. But not the name itself, its the path which is nasty.
You should not enter a full path like this: C:\Giochi\Quake\mymod\progs\texturename.png
If you want to place the texture of your MD3 model directly in the same folder where your MD3 model is placed,
you do not need to enter a path at all. Just add the texture name.
If you want to place the texture of your MD3 model into a DIFFERENT folder, you have to do this:
Example, you want your texture to be inside a folder called “devil_master” inside of your mod folder, you have to write:
You do not even need to put the file extension into the path. The engine will load any supported texture format.
Pay attention: Use: / not:
Depending on your MD3 software editing tool you have to do it per texture. MD3 supports multiple textures as you know.
I uploaded a working model + texture for you.
It uses the texture inside the “progs” folder. I renamed the texture to simple “changun”. Without the numbers.
The texture does not need to be called exactly as the MD3 is. Once you use more than 1 texture in your MD3 you have to do it anyways
Replace these files with yours:
[quote]If you want to place the texture of your MD3 model directly in the same folder where your MD3 model is placed,
you do not need to enter a path at all. Just add the texture name.[/quote]
Wait, how am I supposed to not enter a path? What I did was use GMax to resize and rotate the original model from the Duke3D HRP (originally too big and with the wrong orientation), load the appropriate texture as a material, apply it to the model, and export the result as an MD3 model. I did not choose to enter an absolute path, GMax did, and I don’t know how not to include the path into the file.
Right before posting this message, I even tried to hex-edit the model, replacing the full path with the texture filename only, and replacing all the subsequent characters with the hex value 0x00. I don’t get the “nasty filename” errors anymore, but I still get an error that says “could not load texture 2536_chaingun”, despite the texture being right there where the MD3 model is.
Thank you for providing me with a working model, but I don’t merely want to “put the Duke3D chaingun in Quake”, I want to actually understand the right way to use MD3 models with Darkplaces.
First of all, not only Darkplaces has this issue. Also other .md3 supporting Quake engines like FTEQW cannot load your model + texture. They all show the same failure message: Your texture path
You have 2 options here.
1.) Keep your tool work flow and use .skin files to correct the texture pathing in your borked GMax MD3 models.
2.) Use a different tool chain to create MD3 models and assign textures the way it is meant to be.
To follow option 1) you should download this file and learn how to use .skin files. I added a .skin file that works with your original files:
Just put the included file into the same folder where your MD3 model is. Ignore my fixed model + texture files from previous post. This .skin file alone will do the trick. Use similar .skin files for all the MD3 models that you create with GMax to fix them for Quake engines.
To follow option 2) you should follow this tutorial. It shows you some tools to handle + edit MD3 files to make them work with Quake engines:
This tutorial also speaks about .skin files. So read it even when you go for option 1 to learn more about them.
Have a happy easter
Reading the tutorial now.
EDIT: okay, I’ve read the tutorial, with the decision to go for option #2 because it’s the cleanest. But the tutorial only says to use that tool to know the names of the various meshes in an MD3 file (something I can already do with the tools I use). I don’t see an option to assign skins to meshes.
The rest of the tutorial is about .skin files… which I have now learned how to use, and they actually make the MD3 files work correctly, as per option #1. So it looks like for now, option #1 is the only way I can proceed, unless I’m missing something about the MD3 compiler.