First Person weapon model is messed up in Hardware Renderers

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.
User avatar
Ford Focus
Posts: 7
Joined: Fri Jun 24, 2022 9:48 am
Discord: 8960
Location: The Highway To Hell

First Person weapon model is messed up in Hardware Renderers

Post by Ford Focus »

I have flipped the normals and gone through every assets and tutorial page related to models, I know this is not a bug because there are other mods that display the models correctly but I could find no differences in the decorate or modeldefs that made those models work and mine not, The only explanation is that gzdoom processes first person model Textures differently than blender, noesis, or maverick model 3d. The textures only display correctly in the softpoly renderer, but that is not viable due to the renderer being laggy for me
Screenshots:
Open GL:

SoftPoly:

Maverick Model:


Blender:


Texture:

.
ModelDef:

Code: Select all

Model CraftHeavyCannon
{
	Path "HellcrafterModels"
	SurfaceSkin 0 0 "HeavyCannon"
	MODEL 0 "HeavyCannon.md3" 

	INTERPOLATEDOUBLEDFRAMES
	SCALEWEAPONFOV

	Scale 0.25 0.25 0.25
	offset 0.0 -2.0 -0.75
	AngleOffset -90
	RollOffset 100

	FrameIndex HEAV A 0 0
	FrameIndex HEAV B 0 10
	FrameIndex HEAV C 0 10
	FrameIndex HEAV D 0 0
	FrameIndex HEAV E 0 0
	FrameIndex HEAV F 0 0
	FrameIndex HEAV G 0 0
	FrameIndex HEAV H 0 0
	FrameIndex HEAV I 0 0
	FrameIndex HEAV J 0 0
	FrameIndex HEAV K 0 14
}

Model CraftHeavyCannon
{ 
	Skin 0 "HellcrafterModels/HeavyCannon"
	MODEL 0 "HellcrafterModels/HeavyCannon.md3" 

	ROTATING

	Scale 8.0 8.0 8.0
	offset 0.0 0.0 20.0
	AngleOffset -90
	RollOffset 90

	//Unhide
	FrameIndex HVCN A 0 0
}

Decorate:

Code: Select all

ACTOR CraftHeavyCannon : DoomWeapon
{
   Weapon.AmmoUse1 1
   Weapon.AmmoUse2 1
   Weapon.AmmoGive1 20
   Weapon.AmmoGive2 400
   Weapon.AmmoType1 "Clip"
   Weapon.AmmoType2 "HeavyCannonDurability"
   Weapon.SlotNumber 4
   Weapon.SelectionOrder 700
   Inventory.PickupMessage "You got the Heavy Cannon"
   Obituary "%o was mowed down by %k's Heavy Cannon"
   +WEAPON.PRIMARY_USES_BOTH
   +WEAPON.ALT_USES_BOTH
   Decal BulletChip

   States
   {
   Ready:
     HEAV A 1 A_WeaponReady
     Loop
   Deselect:
     HEAV A 1 A_Lower
     Loop
   Select:
     HEAV A 1 A_Raise
     Loop
   Fire:
     MISL B 0 A_Quake(1,4,0,1)
     HEAV BCDEFG 1
     TNT1 A 0 A_FireCGun
     TNT1 A 0 A_ReFire
     Goto Ready
   AltFire:
     HEAV HI 2
     TNT1 A 0 A_TakeInventory("Clip", 5)
     TNT1 A 0 A_TakeInventory("HeavyCannonDurability", 5)
     HEAV J 2 A_ZoomFactor(2)
     Goto Zoomed
   Zoomed:
     HEAV K 1
	 TNT1 A 0 A_ReFire("Zoomed")
     Goto Railgun
   Railgun:
	 TNT1 A 0 A_RailAttack(20, 0, 1, red)
     TNT1 JIH 2 A_ZoomFactor(1)
     Goto Ready
   Flash:
     HEAV ABCDEF 5 Bright A_Light1
     Goto LightDone
     HEAV BCDEFG 5 Bright A_Light1
     Goto LightDone
   Spawn:
     HVCN A -1
     Stop
   }
}

ACTOR HeavyCannonDurability : Ammo
{
  Inventory.PickupMessage "Heavy Cannon Durability" // "Picked up a clip."
  Inventory.Amount 10
  Inventory.MaxAmount 200
  Ammo.BackpackAmount 10
  Ammo.BackpackMaxAmount 400
  Inventory.Icon "CLIPA0"
  States
  {
  Spawn:
    CLIP A -1
    Stop
  }
}
User avatar
alekksandar
Posts: 14
Joined: Wed Jan 16, 2019 5:42 pm

Re: First Person weapon model is messed up in Hardware Rende

Post by alekksandar »

You have to triangulate your model in blender before you export it to .md3. I think that's causing the issue, but I may be wrong. Make backups.
EDIT: You do this by pressing CTRL+T in edit mode after selecting all faces, or pressing Face -> Triangulate Faces
User avatar
Ford Focus
Posts: 7
Joined: Fri Jun 24, 2022 9:48 am
Discord: 8960
Location: The Highway To Hell

Re: First Person weapon model is messed up in Hardware Rende

Post by Ford Focus »

alekksandar wrote:You have to triangulate your model in blender before you export it to .md3. I think that's causing the issue, but I may be wrong. Make backups.
EDIT: You do this by pressing CTRL+T in edit mode after selecting all faces, or pressing Face -> Triangulate Faces
Thank you But this didn't work :(
User avatar
giwake
Posts: 19
Joined: Sat Feb 09, 2019 6:44 am
Discord: giwake#6337

Re: First Person weapon model is messed up in Hardware Rende

Post by giwake »

It might also be that the model is too small or too large, try scaling it up or down and see how that affects it.

Return to “Assets (and other stuff)”