Wednesday, September 24, 2014

UVW Unwrap for Unreal Engine 4

Users of Epic's Unreal Engine 4 will know that you need a UVW layout with no overlapping faces for static mesh shadow computations. By default this is UVW channel 2 but you can change it to whatever channel you want inside UE4, especially if you have some complex mapping using several channels already. It couldn't be easier to setup in Max. First, just apply a new UVW Unwrap Modifier to your object and change the Map Channel to the last unused number. Then open the UVW Editor and under the "Mapping" menu item choose "Flatten Mapping..." Typically you can accept the default settings and your done! Below is the result with a Standard Max Teapot Primitive:

If you're not happy with the results you can try "Unfold Mapping..." and/or the "Pack UV's.." option from the "Tools" menu. The integrity of the layout doesn't really matter since it's just being used for shadow casting. It's not really important that these UV's be packed efficiently. The only critical issue is that none of the UV's can overlap or the shadow casting algorithm will fail, you'll get a warning from Unreal and there will be no shadows computed for that mesh.

No comments:

Post a Comment