Beast - UV 2 issues.

Hey all,

So I created a custom UV2 unwrap in max because the way unity unwraps is…well, not good at best. My understanding is that you can do this and just check on the “lock atlas” button in the editor.

Problem is when i do this i get this error “Lock Atlas is enabled and lightmap indices on objects in the scene don’t index into existing lightmap slots. Make sure the indices are correct and that the lightmaps array is big enough.” Ive created a lightmap diffuse shader, (with an empty light map spot. because i have no lightmap yet) turned static on, generate lightmaps on and nothing.

I really dont want to rely on the terrible unwrap that is provided from beast/unity and was hoping somebody could help.

thanks,
me

The UV set for lightmapping and the atlas layout are two separate things.

If you have provided a custom unwrap in an external DCC tool, then it will unwrap it and generate a mapping for all the faces of an object in a [0, 1] space for you for the given object(s). This has to do with how well the lighting information for a given object is mapped as evenly and free of distortion as possible across the faces.

The FBX importer in Unity can create a set of lightmapping texture coordinates for you which are in my experience not bad and can be tweaked in the “Advanced” generation options.

At bake time, the lightmapper will calculate the illumination and create one or more textures. Each of the objects that has a set of lightmapping coordinates gets an offset and a scale into a particular lightmap texture. This is the “atlas” part. So it maps each set of [0,1] lightmap UV coordinates into a subrectangle of the lightmap texture. You can see this atlas mapping information in the “Object” tab of the lightmap window. Many objects each with different UV unwrapped regions can share a given lightmap texture.

Your error is telling you you haven’t created/loaded a lightmap and you don’t have an atlas mapping. So the upshot here is that you HAVE to create an atlas at least once or it does not have a layout of where to place your unwrapped objects into the lightmap texture. Recapping - how the faces are unwrapped within the object are either mapped in your 3D tool or performed by the FBX importer of Unity but as far as I know, you cannot control how the lightmapper lays out where objects are placed within the lightmap. If you are actually objecting to how those objects are packed into the lightmap, then that might be a question for the people who wrote Beast :slight_smile: