Game Development Community

Bug: Object is fully shadowed unless rotated

by Patrick Shaw · in Torque 3D Professional · 05/06/2009 (3:26 am) · 8 replies

I have built a large section of a city wall in Blender and exported it using Collada. Regardless of where I place the object in the scene, it is darkened as if it was fully in shadow. If I rotate it 180 degrees, the wall is lit and shadowed correctly. Other scene objects which share the same material are working normally.

#1
05/06/2009 (11:46 am)
Some screenshots would help alot to see if i can spot the issue.
#2
05/07/2009 (3:25 am)
Tom,
Here are the images for the issue I described.

sites.google.com/site/alternaterealityproject/Home/screen-shots/bugs/shadow_0.jpg
This first image shows two exported meshes that form different blocks within a city. Mesh A in the lower left corner appears to be lit and shadowed correctly. Mesh B (in the upper right) is very dark as if it was in shadow.

sites.google.com/site/alternaterealityproject/Home/screen-shots/bugs/shadow_180.jpg
This second image shows Mesh B still in the upper right corner, only rotated 180 degrees. The lighting on Mesh A and B now match.
#3
05/07/2009 (12:20 pm)
Go into the Sun settings and increase all 4 of the 'overDark' parameters. I think that just may be a bad case of shadow acne.
#4
05/08/2009 (2:59 am)
Tom,
Adjusting all four of the 'overdark' parameters even by a factor of 10 does not change the shadow problem.
#5
05/08/2009 (6:39 am)
Patrick - try turning on shownormals at the bottom of the objects values. Also check your normals in Blender.

Are you using double sided planes?

Whilst your at it, export it as a straight DTS from Blender without using Collada and see what happens. I've a large model exported (haven't even touched Collada yet) and everything seems to work fine.
#6
05/11/2009 (5:03 am)
Steve,
Good catch. All of the normals in the exported model were facing a single direction. I re-exported the model again as Collada and the normals were magically fixed.
#7
05/11/2009 (5:16 am)
Huzzar!

The amount of times I've been caught out by those pesky normals or the fact that by default Blender sets everything to double-sided ...

The addition inside the T3D editor of the "show normals" function on DTS objects is quite funky, and I can see it being useful for spotting problems.
#8
05/11/2009 (12:08 pm)
Hah... good catch Steve!