[RELEASED]LightMapToVertexColor(A lightmap alternative to a certain extent)

Hey! Dear developers, we are very pleased to introduce a new tool to you - LightMapToVertColor (LTVC).

As its name indicates, LTVC has unique functions. It can decode the lightmaps that you have carefully baked for the model and then cleverly transfer this information to the vertex color channels of the mesh. It is worth mentioning that this entire process is completed within the editor. This means that you only need to use the vertex colors in the shader to achieve global illumination with an effect close to that of the lightmaps, and completely get rid of the memory and loading issues brought by the lightmaps!

However, we have to be honest with you that everything has two sides. Due to the lack of precision in vertex colors themselves and the limitation of the number of vertices, in scenes where there are insufficient vertices and extremely rich lighting information, the lighting effect brought by vertex colors cannot be compared with that of the lightmaps. But, in certain specific situations (when you bake indirect lighting information, your mesh has a relatively high number of vertices and an even wiring layout), the effect it presents is almost the same as that of using the lightmaps!

Now, LTVC is already available on the Asset Store! Get it now to enjoy a 10% discount in the first week!

Advantages:

  1. Compared with lightmaps, vertex colors occupy less memory.

  2. Vertex colors can be directly read in the shader, which means you will have the performance advantage of not needing to load lightmaps.

  3. Vertex colors are absolutely bound to the mesh, allowing you to load prefabs in the scene without losing lighting information. (Unity prefabs don’t have lightmap information by default, and creating prefabs directly instead of loading the whole scene will result in the loss of lightmaps.)

  4. LTVC supports directly writing vertex colors into the source FBX file of your mesh (this will provide permanent preservation).
    Drawbacks:

  5. The data precision of vertex colors themselves is relatively low, and they are also limited by the number of vertices. (If the lighting information changes drastically and you don’t have enough vertices, the results will be far from satisfactory.)

  6. Vertex colors are absolutely bound to the mesh. If you use the same mesh for multiple objects in the scene, it’s advisable that you only choose one of them to receive vertex colors as illumination.

  7. The most suitable baking method for this solution is to bake indirect light. Because indirect lighting is low-frequency information, even if the number of vertices isn’t very high, you can still obtain relatively good results!

LTVC Limitations:

  1. Directional lightmaps are not supported for the time being.
  2. Lightmap UVs using any UV channels other than UV2 for transfer are not supported temporarily.

Depend:

LTVC relies on the Unity FBX Exporter package!

If you have any questions about LTVC or are seeking after-sales support, please join my Discord community. (I live in the UTC+8 timezone, so I might be sleeping during certain hours. But once I start working, I will reply to your messages immediately.)

Using baked vertex colors as a global illumination source requires some experience in developing shaders! But don’t worry. LTVC already has built-in support for shaders from Unity 2020 to Unity 6 (both URP and BIRP), which are ready to use out of the box! Additionally, LTVC actually supports HDRP, but it doesn’t include shaders for HDRP. This is because HDRP lighting is more complex compared to URP, and HDRP itself aims to achieve higher fidelity images. Therefore, using vertex colors as global illumination isn’t a very wise choice for HDRP projects. That’s why LTVC doesn’t currently provide shaders that support HDRP! If you have any ideas or need after-sales assistance, you’re welcome to join my Discord for help.

1 Like

Halfway through the first week’s offer!

Hey! I’ve uploaded online documentation so you can see how to use LTVC and how it can be restricted! LTVC - Google Docs