[Not a bug] Dynamic light on 3D rounded model improper rendering

Bugs that have been investigated and resolved somehow.

Moderator: GZDoom Developers

Dynamic light on 3D rounded model improper rendering

Postby Zan » Sun Jul 01, 2018 10:13 am

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
Zan
 
Joined: 22 Oct 2016
Location: The depths of Hedon.
Discord: Zan#0149

Re: Dynamic light on 3D rounded model improper rendering

Postby Nash » Sun Jul 01, 2018 10:59 am

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
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Dynamic light on 3D rounded model improper rendering

Postby Zan » Sun Jul 01, 2018 11:56 am

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
Zan
 
Joined: 22 Oct 2016
Location: The depths of Hedon.
Discord: Zan#0149

Re: Dynamic light on 3D rounded model improper rendering

Postby Nash » Sun Jul 01, 2018 12:24 pm



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 19 times
User avatar
Nash
 
 
 
Joined: 27 Oct 2003
Location: Kuala Lumpur, Malaysia
Github ID: nashmuhandes

Re: Dynamic light on 3D rounded model improper rendering

Postby Zan » Sun Jul 01, 2018 12:49 pm

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.
User avatar
Zan
 
Joined: 22 Oct 2016
Location: The depths of Hedon.
Discord: Zan#0149


Return to Closed Bugs

Who is online

Users browsing this forum: Ahrefs [Bot], Awario [RSS], yura_111 and 1 guest