Game Development Community

Lightmapped objects turn black.

by Sorin Daraban · in Torque 3D Professional · 10/14/2009 (1:15 am) · 9 replies

Is there a reason why LightMapped objects turn black once I add a LightMap into the Tone Map or Overlay Map or Light Map slot? I export the objects as COLLADA with the 2nd UV texture being the LightMap for the entire object.

I have an ATI 4650 HD with up to date drivers.
Could it be a Driver Bug or a bug with T3D?

#1
10/14/2009 (10:46 am)
I occaisionally get "issues" when flicking between Basic/Advanced Lighting and when using EnableAdvancedLightMapping, one of these is that lights stop casting light.

Switch to BL and see if it shows correctly there. Then in Advanced Lighting, disable ALS (under LevelInfo) and see if that helps.
#2
10/14/2009 (12:03 pm)
I've tried every setting possible, but nothing works. It only works if I RGB Multiply the 2 textures in another program, then export it. Then it works.
I've asked GarrageGames about this issue before (in the Beta stages) but no reply from any of the employees. I thought the problem was going to get rectified by 1.0, but it doesn't look like it.

Thanks for trying Steve.
#3
10/14/2009 (2:02 pm)
Quote:It only works if I RGB Multiply the 2 textures
Weird ...
Maybe an exporting issue? What modeling app are you using? (not that I know much about that though)
#4
10/14/2009 (2:09 pm)
I'm using 3D MAX 10.
#5
10/14/2009 (2:43 pm)
I take it that Burg - with it's pureLight lightmaps displays correctly? If so I'd have to think it's an issue with exporting.

grasping at straws here but -

What are your texture types? Maybe try png or tga. And are they in the same directory as the model?

You did sort out the UVtexture coordinates for UV2 didn't you?

Try using the overlay material and see if that works - it should use UV2 as well.
#6
10/14/2009 (4:56 pm)
"You did sort out the UVtexture coordinates for UV2 didn't you?"

What do you mean? In Max it says that the LM texture is in the Map 2 slot.
So, I'm assuming that Max is exporting it as a UV2 texture. I don't know where to look and see if the 2nd UV texture is set in the *.dae file.

The LightMap is PNG.

Overlay does not work either.
#7
10/14/2009 (6:15 pm)
"You did sort out the UVtexture coordinates for UV2 didn't you?"

As in, you have the lightmapped unwrapped, just like you would a regular texture, and not just "as it comes" which is every face sharing the same space.

Also, as I don't know Max, Should diffuse be UV0 and lightmap UV1? Does it start numbering the UV layers at 0 or 1?

If you open up the dae file in a text edit - it's all in text thankfully - but then I aren't sure what to look for.

edit:
Having said all of this, I can't get a working on a straight "no hierarcy setup" export from Blender either.
#8
10/15/2009 (4:33 am)
Hopefully there's someone out there that can help us here.

Thanks again for trying Steve.
#9
11/11/2009 (1:42 am)
Found the problem.
It looks like the COLLADA exporter that comes with 3DMax was not exporting the mesh properly.

I downloaded the OpenCollada exporter from here, http://www.opencollada.org/download.html, and everything worked just fine!