Issue with HUD model normals?
Moderators: GZDoom Developers, Raze Developers
Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
- den killen
- Posts: 11
- Joined: Mon Aug 15, 2022 6:06 pm
- Graphics Processor: nVidia with Vulkan support
Issue with HUD model normals?
So I've finally figured out how to get a HUD weapon model working, but I can't seem to fix this issue:
Here's how the model looks in-game:
Here's how the model looks in Blender:
I used Noesis to convert it to MD3 and it looks much the same there as it does in Blender. This only appears to affect HUD models.
I also tested this on a working model from another mod by converting it from MD2 to MD3, and the issue occurred again. Something is happening with Noesis's conversion process or something.
What exactly is happening? It looks like a problem with the normals but I can't tell and inverting them changes nothing.
Here's how the model looks in-game:
Here's how the model looks in Blender:
I used Noesis to convert it to MD3 and it looks much the same there as it does in Blender. This only appears to affect HUD models.
I also tested this on a working model from another mod by converting it from MD2 to MD3, and the issue occurred again. Something is happening with Noesis's conversion process or something.
What exactly is happening? It looks like a problem with the normals but I can't tell and inverting them changes nothing.
- ramon.dexter
- Posts: 1529
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: Issue with HUD model normals?
You need npherno's md3 compiler. Blender cannot export normals to md3 correctly, it has to be recalculated once converted to md3. Also, format conversion screws up normals.
- den killen
- Posts: 11
- Joined: Mon Aug 15, 2022 6:06 pm
- Graphics Processor: nVidia with Vulkan support
Re: Issue with HUD model normals?
Nope, looks no different than before. If format conversion screws up the normals, how can I rebuild them in npherno's compiler without first converting to MD3?
Re: Issue with HUD model normals?
You could try exporting to FBX, then using Noesis to convert to MD3.
- den killen
- Posts: 11
- Joined: Mon Aug 15, 2022 6:06 pm
- Graphics Processor: nVidia with Vulkan support
Re: Issue with HUD model normals?
That's what I had been doing, unless there are specific parameters in the conversion process that I missed.
- den killen
- Posts: 11
- Joined: Mon Aug 15, 2022 6:06 pm
- Graphics Processor: nVidia with Vulkan support
Re: Issue with HUD model normals?
Still haven't found a solution for this and I've noticed it happen to a few others. Anyone able to share their process for making and using models?
- ramon.dexter
- Posts: 1529
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: Issue with HUD model normals?
Have you tried using the md3 compiler?
My process is following: model in blender, export it directly to md3, then rebuild normals using the compiler and done. Normals look good.
Because the md3 exporter works with only specific older version of blender, I always install this older version.
Also, the screenshot model looks like it has flipped normals.
My process is following: model in blender, export it directly to md3, then rebuild normals using the compiler and done. Normals look good.
Because the md3 exporter works with only specific older version of blender, I always install this older version.
Also, the screenshot model looks like it has flipped normals.
Re: Issue with HUD model normals?
False. :D I shipped an entire game on Steam whose MD3 assets are 100% exported directly from Blender to MD3. No conversion, no tricks. Normals, smoothing groups, angles and everything else are 100% accurate upon export. The meshes come out clean as fuck. I spent several years perfecting my exporter because I use it heavily in my years of GZDoom modding.
Also false. :D My exporter works for the latest Blender, while the 2.79b version has been demoted to a separate branch.ramon.dexter wrote: ↑Thu Feb 02, 2023 9:49 amBecause the md3 exporter works with only specific older version of blender
Both branches are actively maintained. I am still using it to this day (although less now, ever since IQM support came about in GZDoom and I am slowly transitioning my workflow to IQM)
Re: Issue with HUD model normals?
Try to scale your model up by a lot. When MD3s are exported too small, the exporter freaks out. This is not a problem with the exporter but by the MD3 format itself. If you want a guideline on how to size and position your gun model, check out my IQM template. Yes, it says IQM but you can still use the Blender scene as a reference and export it to MD3. The Blender file I included has a perfectly-placed gun model that "just works".den killen wrote: ↑Sun Dec 04, 2022 12:06 am So I've finally figured out how to get a HUD weapon model working, but I can't seem to fix this issue:
Here's how the model looks in-game:
Here's how the model looks in Blender:
I used Noesis to convert it to MD3 and it looks much the same there as it does in Blender. This only appears to affect HUD models.
I also tested this on a working model from another mod by converting it from MD2 to MD3, and the issue occurred again. Something is happening with Noesis's conversion process or something.
What exactly is happening? It looks like a problem with the normals but I can't tell and inverting them changes nothing.
- ramon.dexter
- Posts: 1529
- Joined: Tue Oct 20, 2015 12:50 pm
- Graphics Processor: nVidia with Vulkan support
- Location: Kozolupy, Bohemia
Re: Issue with HUD model normals?
Thanks for pointing this out. Google search fails horribly when searching for md3 exporter for blender. Also good to know there is support for last version, many thanks as alwaysNash wrote: ↑Thu Feb 02, 2023 1:02 pmFalse. I shipped an entire game on Steam whose MD3 assets are 100% exported directly from Blender to MD3. No conversion, no tricks. Normals, smoothing groups, angles and everything else are 100% accurate upon export. The meshes come out clean as fuck. I spent several years perfecting my exporter because I use it heavily in my years of GZDoom modding.
Also false. My exporter works for the latest Blender, while the 2.79b version has been demoted to a separate branch.ramon.dexter wrote: ↑Thu Feb 02, 2023 9:49 amBecause the md3 exporter works with only specific older version of blender
Both branches are actively maintained. I am still using it to this day (although less now, ever since IQM support came about in GZDoom and I am slowly transitioning my workflow to IQM)
EDIT:
Even better, zscript and modeldef generation, just wonderful. Great work, as always, Nash!
- den killen
- Posts: 11
- Joined: Mon Aug 15, 2022 6:06 pm
- Graphics Processor: nVidia with Vulkan support
Re: Issue with HUD model normals?
Nash wrote: ↑Thu Feb 02, 2023 1:02 pm False. I shipped an entire game on Steam whose MD3 assets are 100% exported directly from Blender to MD3. No conversion, no tricks. Normals, smoothing groups, angles and everything else are 100% accurate upon export. The meshes come out clean as fuck. I spent several years perfecting my exporter because I use it heavily in my years of GZDoom modding.
It finally worked! Thanks a million, Nash. You save the day yet again.Nash wrote: ↑Thu Feb 02, 2023 1:05 pm Try to scale your model up by a lot. When MD3s are exported too small, the exporter freaks out. This is not a problem with the exporter but by the MD3 format itself. If you want a guideline on how to size and position your gun model, check out my IQM template. Yes, it says IQM but you can still use the Blender scene as a reference and export it to MD3. The Blender file I included has a perfectly-placed gun model that "just works".