Novum / vkQuake

Vulkan Quake port based on QuakeSpasm
GNU General Public License v2.0
1.85k stars 224 forks source link

Broken bones(?) on certain custom MD5 models #718

Closed LOL-DUDE-64 closed 1 month ago

LOL-DUDE-64 commented 3 months ago

Description: These MD5 models (intended for rerelease) are all mangled. See screenshots, since I can't describe it ery well.

To Reproduce: Install the mod below, set -basedir "C:\Program Files (x86)\Steam\steamapps\common\Quake\rerelease", and enable enhanced models.

Expected behavior: For the models to, uh, not be mangled. Every other model in this mod looks correct, as well as the enhanced models from the rerelease.

Screenshots vkquake0001 vkquake0002

Desktop:

Mod: Half-Dead's Quake Right Handed Weapons. Map pictured is from Copper, though this problem happens independently of the selected -game.

Additional context: These same models worked fine in QuakeSpasm-Spiked, so I assumed that this is a problem on the end of this particular port, and not the mod itself.

vsonnier commented 3 months ago

Does it work with 1.30.1, or a dev build of Ironwail (which also supports MD5 after https://github.com/andrei-drexler/ironwail/commit/3ee179444487a11470c2e99ddc5665dc357ae746 ) ?

LOL-DUDE-64 commented 3 months ago

I tried 1.30.1 just now, and these don't work there, neither. I'm admittedly unsure how to install that build of IronWail, though. Found one more messed-up model, from hipnotic: vkquake0001

vsonnier commented 2 months ago

Noesis seems to load the models OK, and Ironwail seems (more) OK than vkQuake also, so maybe I could compare Ironwail MD5 handling and ours to see if there is something to improve or fix.

pbdot commented 1 month ago

One lead might be that these models have more than one mesh defined, the rerelease md5 all have one mesh, so might be a bug with multi-mesh support

MD5Version 10

numJoints 8
numMeshes 2
vsonnier commented 1 month ago

One lead might be that these models have more than one mesh defined, the rerelease md5 all have one mesh, so might be a bug with multi-mesh support

Many thanks @pbdot, that was it ! The rendering is now the same as in Ironwail. The shotgun is truncated on top in both, and the lasergun has some parts hidden, while evything is OK in QSS probably because the weapon model is placed a bit differently, but I don't want to import QSS code, regressions are too risky. If either QS or Ironwail fix this, I'll adopt the fix of course.

vsonnier commented 1 month ago

Right, this is not done yet. Ironwail now correcty displays the exemple models, following the commit https://github.com/andrei-drexler/ironwail/commit/98ac065bd58d0418edda475fe9978a941b199047.

Turns out it has nothing to do with model placement, but because only the first mesh was drawn.

I'll have to do something similar for vkQuake, which also draws the first mesh only with the existing code.

vsonnier commented 1 month ago

Done !

vkquake0000 vkquake0001 vkquake0002