Game Development Community

Two sided material lighting problems DTS

by Clint S. Brewer · in Torque Game Engine · 01/26/2006 (11:34 am) · 1 replies

Has anyone fixed this problem yet?

I searched arround and found a few people talking about it but no fixes.

problem:
if you use a two sided material, it will not pick up any of the dynamic lighting (you can try this in the show tool by moving the light around) Notice that the lighting doesn't change. We are making a palm tree right now and noticed the problem where the trunk was lit just fine, but the leaves were not.

I believe the problem is in the max2dts exporter somewhere, probably in computeNormals, but just starting to look into it.

I do know the hacks to get around this problem (ambient light, manual creation of 2sides etc) but I would like to fix the real problem.


If you have fixed it, I'd love to hear about it, thanks



-clint

#1
01/26/2006 (12:35 pm)
After looking into it a bit more here's my guess:

The normals for both sides get averaged together, and cancel each other out. So you end up with a bunch of very small / non existing normals in the model.

To do make this work correctly, the exporter needs to not just duplicate faces but actually create new vertices so that they can have unique normals that point in the correct dir.

I don't know what other implications this would have with skin in the exporter, and other things that reference verts.

I think the duplicate and flip normals manually will work for us now but in case somebody want's to fix the exporter I hope this points you in the right direction.