Hey, I have downloaded a shader, that requires a “LightMap 0”, LightMap 1", and LightMap 2" textures. Anybody know how to make these type of textures or am I missing out on something? Would be great if someone could clarify this for me. Thank you in advance!
A Lightmap is actually a texture file which will be processed with the diffuse pixels.Lightmaps works on the second UV mapping channel.
You can create light maps either in Unity itself or using any 3rd party 3D applications.
If Using Unity
- Place some geometry,say a cube and a sphere on top of a plane
- Create a directional light(turn on shadows and set quality to High)
- Go to Window>LightMapping. In that popup window,under ‘Objects’ section choose your plane,cube,sphere and tick ‘LightMap Static’
- Now click the ‘Bake Scene’ button (you can change the bake settings under ‘Bake’ section before you bake)
In other 3D softwares (Maya/Max/Blender/C4D)
-
Model and Texture your asset.(use UVW channel 1 for diffuse texturing)
-
Make an unwrapping in UVW channel 2,make sure there are no overlapping faces and UVs are not going out of boundary(Tip - You can use Automatic unwrapping or Load UVW channel 1 to UVW channel 2)
-
Setup lighting and render (bake) lightmap to texture file.
-
Bring the model to unity and use materrial as 'Legacy Shaders>LightMapped>Diffuse or VertexLit (as a start).Choose your diffuse texture in first slot and your baked light map texture file in second slot.