Page 1 of 1

Dynamic light on 3D rounded model improper rendering

PostPosted: Sun Jul 01, 2018 9:13 am
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

Re: Dynamic light on 3D rounded model improper rendering

PostPosted: Sun Jul 01, 2018 9:59 am
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.

Re: Dynamic light on 3D rounded model improper rendering

PostPosted: Sun Jul 01, 2018 10:56 am
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).

Re: Dynamic light on 3D rounded model improper rendering

PostPosted: Sun Jul 01, 2018 11:24 am
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.

Re: Dynamic light on 3D rounded model improper rendering

PostPosted: Sun Jul 01, 2018 11:49 am
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.