Wednesday, 6 April 2011

SunBurn Snippets #3 - Troubleshooting overly bright models in the editor

Following on again after the last snippet on Light maps, here’s another common issue you can sometimes face, usually with simpler models but also with any model setup incorrectly for lighting.

Some models when imported into blender take on a glowing type effect where they are not casting shadows, all faces or most faces are just bright as if lit from all angles, this is actually not far from the truth.

What the engine needs is a lightmap (Second UV Channel) to be completely UNIQUELY mapped, meaning each and every face must have it’s own area on the lightmap texture channel.

For a cube this is the difference between:

image image
A single faces UV texture that would map to all faces
and This
A uniquely mapped UV texture with each face having it’s own area

If you have your UV channel setup like the view on the left, then when SunBurn calculates the lighting for each face of the model it will multiply this data solely on this one area for each face ad for each light.  OVERBURN Winking smile

So simply re-project your UV map in your tool of choice and off you go.

Right that’s the last of the snippets I have for now, if you are having any problems or issue you are facing, then drop in to the SunBurn forums, I'll be keeping an eye in there and do another snippet for troublesome issues with getting models working.

Alternatively, drop a comment here and i’ll see what I can do.

Now it’s time to add a little more Flux to my Generator, gotta get back.

1 comment:

  1. You have been busy this morning. This is a problem I noticed myself with a purchased model. It used a reflected UV map. One half of the model was an exact mirror of the other. This meant that normal mapping did not work and you have just confirmed that lightmapping would also probably produced very odd results!

    It did not occur to me until your article that I could simply add a second UV map containing just the lightmap data.

    Thanks again.