Dynamic light on 3D rounded model improper rendering

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Post Reply
User avatar
Zan
Posts: 338
Joined: Sat Oct 22, 2016 12:43 pm
Location: The depths of Hedon.
Contact:

Dynamic light on 3D rounded model improper rendering

Post by Zan »

As you can see, the face of this 3D barrel is lit on the very opposite side that should be. I tried moving the barrel or changing the actor angle, same result.
The lantern is where the dynamic light is placed, and the crate is lit properly.
https://postimg.cc/image/fjtyitcsh/


P.S. I hope this is the proper subforum to report this
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Dynamic light on 3D rounded model improper rendering

Post by Nash »

Looks like the model has broken normals. Care to post just the MD3 (no need textures) so I could take a look?

Also what's your toolchain? Could be that the exporter is messing up the normals. Or it could be a problem with the model itself; looks like all of the faces are inverted. Should be easy to fix by just flipping the normals.
User avatar
Zan
Posts: 338
Joined: Sat Oct 22, 2016 12:43 pm
Location: The depths of Hedon.
Contact:

Re: Dynamic light on 3D rounded model improper rendering

Post by Zan »

Here's the md3 - https://we.tl/ZVDsfXN6Aw
I make it in Blender, and use the GZDoom .md3 export plug-in. Although I'm not sure if I had the plug-in when I made this particular model (I most likely didn't have it back then, and imported/exported from Milkshape 3D to get the md3 format).
User avatar
Nash
 
 
Posts: 17434
Joined: Mon Oct 27, 2003 12:07 am
Location: Kuala Lumpur, Malaysia
Contact:

Re: Dynamic light on 3D rounded model improper rendering

Post by Nash »



As suspected, the normals are inversed. In Blender, this is easily fixable by going into Edit Mode, selecting everything and then doing Mesh -> Normals -> Flip Normals.

Also, you have too many frames in the model when the model is obviously a static object with no animation. I would delete all the keyframes and set the end frame to 1. This reduces the file size significantly.

Which Blender exporter are you using? My MD3 exporter exports normals perfectly, even correctly taking into account any custom smoothing groups you've defined on the mesh.

Speaking of smoothing groups, this is more of a subjective and artistic opinion, but personally I'd shade the a barrel this way:



Add an edge split modifier and mark the edges sharp as I've illustrated. My MD3 exporter script fully respects this and it will be shaded that way 1:1 in GZDoom.
Attachments
IDBarrel1.zip
(6.86 KiB) Downloaded 43 times
User avatar
Zan
Posts: 338
Joined: Sat Oct 22, 2016 12:43 pm
Location: The depths of Hedon.
Contact:

Re: Dynamic light on 3D rounded model improper rendering

Post by Zan »

Oh, okay, thanks. I've next to no idea how to use Blender personally, pretty much all the models I've made are like... super crude.
I'm going to go check the few other models too, I'm pretty sure it's not related to your exporter (which I'm indeed using). It has to be related to the time where I had to use like Milkshape and another little program to get to export an md3.

Well, false alarm then, but at least we've sorted one thing out for the future.
Post Reply

Return to “Closed Bugs [GZDoom]”