Tuesday, December 27, 2011

UDK's inverted normal maps, and how to fix them

I have been modelling for UDK

For a little while now and I came across a hitch. The normal maps on my models were apparently inverted. This was odd because they looked fine in blender. As you can see in the picture, it looks like my bricks are concave, rather than convex.

The bricks are accepting light opposite to the direction from which it is being cast.

A short jaunt in google brought me to this thread. A bit of fiddling and I have found a workaround. The short version: invert the green channel of your normal map. The long version? Read on...

Inverting a channel in GIMP

GIMP doesn't automatically show you the channels dialogue. Some of you may have it tabbed in your layers window, but for those who don't, here's how to get it on screen:

Windows > Dockable Dialogues > Channels

Once you have your channels window up, you'll notice they are all highlighted. Click them to toggle them off so you only have the green channel active:

Then invert it via the usual method:

Colours > Invert

You'll see the normal map change, and then you can go ahead and re-import your texture to UDK:

The bricks are now accepting light correctly

Don't mention it ;)

1 comment: