Weapon viewmodel being "cut off" / not rendered properly

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
P1NKAC1D
Posts: 8
Joined: Sun Oct 04, 2020 6:51 am
Graphics Processor: nVidia (Modern GZDoom)

Weapon viewmodel being "cut off" / not rendered properly

Post by P1NKAC1D »

I've done a pistol with Blockbench, a low poly editor originally for Minecraft, but you can export models as .obj files that can be used in GZDoom.

It seems to work, but in first person, parts of the weapon are being "cut off" or rendered not properly when they are too close to the player's camera. Here are two screenshots, in the first you can see how it has rendering errors and you can see the insides of the model. Offset in MODELDEF is Offset 1 -4 0. In the second screenshot I set the Offset to 1 -7 0, so the pistol is farther away from the player and the problem seems to disappear. But this can't be the solution, I don't want to have weapons floating in front of me of course...

Screenshot 1: http://chainworm.de/mawis01.png
Screenshot 2: http://chainworm.de/mawis02.png

Is this a GZDoom problem or something related to the model itself? I went through the wiki and tried to search here and on Google but I didn't find anything that matched my problem.

I uploaded a test .pk3 with the basic MODELDEF and everything here (no animations etc., just a testfile): http://www.chainworm.de/mawistest.pk3

Any help about this would be really appreciated :cry:
User avatar
axredneck
Posts: 397
Joined: Mon Dec 11, 2017 2:09 pm
Preferred Pronouns: He/Him
Operating System Version (Optional): Arch
Graphics Processor: nVidia with Vulkan support
Location: Russia

Re: Weapon viewmodel being "cut off" / not rendered properly

Post by axredneck »

Try to make the model larger.
(Looks like your model is too close to camera)
User avatar
P1NKAC1D
Posts: 8
Joined: Sun Oct 04, 2020 6:51 am
Graphics Processor: nVidia (Modern GZDoom)

Re: Weapon viewmodel being "cut off" / not rendered properly

Post by P1NKAC1D »

Hmm okay, so I guess best thing I can try is different sizes and offsets?

[edit] Yep, seems to do the trick. Thanks for the hint!
http://chainworm.de/mawis03.png

Return to “Assets (and other stuff)”