Unwrap UVs for light baking

In order to store baked lighting for objects, Stingray needs to unfold each mesh using a UV set: a mapping of each vertex in the three-dimensional mesh into two-dimensional texture space. Since the first UV set assigned to a mesh (usually named uv0 in Maya, for example) is usually used for textures like color maps and normal maps, Stingray bakes lightmaps using a second UV set (e.g. uv1 in Maya).

It's best to create UV sets using 3D design tools like Maya or 3ds Max, and save them in the .fbx file that you use to import the asset into Stingray. These design apps give you tools to optimize the way the 3D mesh is represented in 2D space:

You can automatically generate a UV set for light baking as you import an FBX file. The Generate UVs for Light Baking is on by default in the Import FBX options. See Import an FBX file.

If you have a unit in Stingray that doesn't yet have UVs for a mesh, you can have Stingray auto-generate a UV set for you in the Unit Editor. This lets you bake lighting for any mesh, even if its UV set has not been optimized.

To generate UVs automatically in Stingray:

  1. Ensure that the second UV set on your object is empty.

  2. In the Asset Browser, double-click the unit to open the Unit Editor.

  3. In the Unit Editor, select the mesh you want to unwrap in the tree view on the left.

  4. In the Properties panel, check the Generate UV-unwrap option.

  5. Save the unit.

General lightmapping tips:

For best results when baking lightmaps, you'll want to learn a bit about what a good unwrapped layout for UVs looks like. Here are some general tips:

See the documentation for your modeling tool, like Maya, Maya LT or 3ds Max

View UV unwrapping in the Level Viewport

Poor UV unwrapping can cause artifacts when rendering your objects with their baked lightmaps. After you bake your lighting at least once, you can inspect the quality of unwrapping in the Level Viewport.

The Level Viewport switches to Lightmap Texels viewing mode, which displays a checker pattern on all objects to show you the UV unwrapping.

Inspect the checker pattern carefully to look for distortions that indicate seams, overlap, or other UV issues.