Issue with HUD model normals?

Ask about editing graphics, sounds, models, music, etc here!
Shaders (GLSL) and SNDINFO questions also go here!

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.
Post Reply
User avatar
den killen
Posts: 11
Joined: Mon Aug 15, 2022 6:06 pm
Graphics Processor: nVidia with Vulkan support

Issue with HUD model normals?

Post by den killen »

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.
User avatar
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?

Post by ramon.dexter »

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.
User avatar
den killen
Posts: 11
Joined: Mon Aug 15, 2022 6:06 pm
Graphics Processor: nVidia with Vulkan support

Re: Issue with HUD model normals?

Post by den killen »

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?
User avatar
Cherno
Posts: 1311
Joined: Tue Dec 06, 2016 11:25 am

Re: Issue with HUD model normals?

Post by Cherno »

You could try exporting to FBX, then using Noesis to convert to MD3.
User avatar
den killen
Posts: 11
Joined: Mon Aug 15, 2022 6:06 pm
Graphics Processor: nVidia with Vulkan support

Re: Issue with HUD model normals?

Post by den killen »

That's what I had been doing, unless there are specific parameters in the conversion process that I missed.
User avatar
den killen
Posts: 11
Joined: Mon Aug 15, 2022 6:06 pm
Graphics Processor: nVidia with Vulkan support

Re: Issue with HUD model normals?

Post by den killen »

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?
User avatar
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?

Post by ramon.dexter »

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.
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Issue with HUD model normals?

Post by Nash »

ramon.dexter wrote: Sun Dec 04, 2022 2:23 amBlender cannot export normals to md3 correctly
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.
ramon.dexter wrote: Thu Feb 02, 2023 9:49 amBecause the md3 exporter works with only specific older version of blender
Also false. :D My exporter works for the latest Blender, while the 2.79b version has been demoted to a separate branch.

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)
User avatar
Nash
 
 
Posts: 17439
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Issue with HUD model normals?

Post by Nash »

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.
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".
User avatar
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?

Post by ramon.dexter »

Nash wrote: Thu Feb 02, 2023 1:02 pm
ramon.dexter wrote: Sun Dec 04, 2022 2:23 amBlender cannot export normals to md3 correctly
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.
ramon.dexter wrote: Thu Feb 02, 2023 9:49 amBecause the md3 exporter works with only specific older version of blender
Also false. :D My exporter works for the latest Blender, while the 2.79b version has been demoted to a separate branch.

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)
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 always ;)

EDIT:
Even better, zscript and modeldef generation, just wonderful. Great work, as always, Nash! :shock:
User avatar
den killen
Posts: 11
Joined: Mon Aug 15, 2022 6:06 pm
Graphics Processor: nVidia with Vulkan support

Re: Issue with HUD model normals?

Post by den killen »

Nash wrote: Thu Feb 02, 2023 1:02 pm 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.
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".
It finally worked! Thanks a million, Nash. You save the day yet again.
Post Reply

Return to “Assets (and other stuff)”