MORE ON GENERATING LIGHT MAPS...
Q: What does the "generate light map uv" option do?
A: The "Generate Lightmap UVs" option in Unity is used to automatically generate a second set of UV coordinates for a mesh, specifically for lightmapping purposes. Lightmapping is the process of pre-calculating the brightness of surfaces in a scene and storing the result in a texture called a lightmap. This texture is later used for rendering the lighting on static objects in the scene :citation[2].
When you enable the "Generate Lightmap UVs" option in the Mesh import settings, Unity generates lightmap UVs for the mesh that follow specific rules, such as being within the [0,1] x [0,1] UV space, having a wide enough margin between individual charts, not having any overlapping faces, and maintaining a low difference between angles and relative scale of triangles in the UV and the original geometry :citation[3].
You can also create your own lightmap UVs in your preferred content creation software and provide them to Unity. For baked lightmaps, place UVs in Mesh.uv2 (also called "UV1"), and for real-time lightmaps, use Mesh.uv2 or Mesh.uv3 (also called "UV2") depending on whether you want to use the same UVs or provide different ones :citation[3].
Remember to ensure that any mesh you want to apply a lightmap to has proper UVs for lightmapping, either by enabling the "Generate Lightmap UVs" option or providing your own
Q: how does this relate to reflection probes and/or global illumination?
A: Reflection probes are used to capture the surrounding environment and provide information for real-time reflections on objects in the scene. They sample the visual environment at strategic points, allowing for more convincing reflections with an acceptable processing overhead :citation[1].
Global illumination is a lighting technique that simulates the way light bounces and interacts with surfaces in the real world, creating more realistic lighting in a scene :citation[5]. Lightmaps are used in conjunction with global illumination to store pre-calculated lighting information for static objects in a scene :citation[2].
When you enable the "Generate Lightmap UVs" option, Unity generates a second set of UV coordinates for a mesh that are specifically used for lightmapping purposes :citation[3]. This is important for both global illumination and reflection probes.
Reflection probes can also be used to capture information for real-time global illumination, allowing for more accurate lighting in dynamic scenes :citation[1]. By default, Unity generates lightmap UVs for reflection probes, but you can also provide your own UVs for more control over the lighting in your scene :citation[6].
In summary, the "Generate Lightmap UVs" option is related to reflection probes and global illumination in that it helps ensure proper UV coordinates for lightmapping, which is crucial for accurate lighting and reflections in your Unity scene.
Q: So, you have to have uv's generated. And these uv's can either be user created, or generated via the "generate light map uv" option?
A: Yes, that's correct! In order to use lightmapping in Unity, you need to have UV coordinates generated for your meshes. You can either create your own UVs in your preferred content creation software and provide them to Unity, or you can use the "Generate Lightmap UVs" option in the Mesh import settings to automatically generate UVs for lightmapping purposes.
The "Generate Lightmap UVs" option is a convenient way to quickly generate UVs for lightmapping, but the resulting UVs may not always be optimal for your specific mesh and scene :citation:citation[3]. If you need more control over the UVs for your mesh, it's recommended to create your own UVs in your content creation software and import them into Unity :citation:citation[7].
Regardless of how you generate your UVs, having proper UVs is crucial for accurate lighting and reflections in your Unity scene, especially when using global illumination and reflection probes :citation:citation[8].
















