3 UV set doesn't work when baking Lightmaps?
Posted: Sun Oct 08, 2017 2:07 am
Hey all,
I hope someone here can help me. So I've been trying to utilize 3 UV maps on objects in my scene (Amplify shader editor seems to allow us to use up to 4 channels). This is the techniques I'm trying to utilize:
1. I'm using UV CH0 for tiling textures in my materials.
2. I'm leaving UV CH1 for lightmapping, as this the channel Unity will go to by default.
3. I'm trying to use UV CH2 for specific normal map trimmed details. I've UV'ing specific polygons on the mesh to utilize different parts of a sheet of normal map details. And I'm blending that over the tiled normal maps which are mapped using UV CH0.
Problem? When I work in my 3D program (modo) and add some trim sheet UVs on UV CH2, leaving UV CH1 and CH0 alone, then exporting the model to Unity, it all seems to work. My amplify shader settings are made so that my tiling textures are on UV set 1 (which is technically 0) and my normal map trim sheet details are set to 3 (technically 2).
And this appears to work as expected.
But then when I generate my lightmaps, this is when it all goes to hell.
If I'm using a Texture Coordinates node to apply UV CH3 (again, technically 2) then my shader actually goes pink and has an error. So if I remove the Texture Coordinates node and instead use the Texture Sample for the Normal map and set it to CH3 instead of using a Texture Coordinate node, this corrects the shader error. But now the UV channel I made specifically for the trim sheet doesn't seem to be functioning correctly.
This is very baffling to me. My guess at what is happening is that when Unity bakes out the lightmapping, it annihilates any UV Channel that is on the model after UV CH2 (technically CH1). As in, when I bake my lightmaps in Unity onto UV CH1, it does SOMETHING to UV channels 2 and 3.
Does anyone have any ideas of how to help me on this? I would greatly appreciate it!!
I hope someone here can help me. So I've been trying to utilize 3 UV maps on objects in my scene (Amplify shader editor seems to allow us to use up to 4 channels). This is the techniques I'm trying to utilize:
1. I'm using UV CH0 for tiling textures in my materials.
2. I'm leaving UV CH1 for lightmapping, as this the channel Unity will go to by default.
3. I'm trying to use UV CH2 for specific normal map trimmed details. I've UV'ing specific polygons on the mesh to utilize different parts of a sheet of normal map details. And I'm blending that over the tiled normal maps which are mapped using UV CH0.
Problem? When I work in my 3D program (modo) and add some trim sheet UVs on UV CH2, leaving UV CH1 and CH0 alone, then exporting the model to Unity, it all seems to work. My amplify shader settings are made so that my tiling textures are on UV set 1 (which is technically 0) and my normal map trim sheet details are set to 3 (technically 2).
And this appears to work as expected.
But then when I generate my lightmaps, this is when it all goes to hell.
If I'm using a Texture Coordinates node to apply UV CH3 (again, technically 2) then my shader actually goes pink and has an error. So if I remove the Texture Coordinates node and instead use the Texture Sample for the Normal map and set it to CH3 instead of using a Texture Coordinate node, this corrects the shader error. But now the UV channel I made specifically for the trim sheet doesn't seem to be functioning correctly.
This is very baffling to me. My guess at what is happening is that when Unity bakes out the lightmapping, it annihilates any UV Channel that is on the model after UV CH2 (technically CH1). As in, when I bake my lightmaps in Unity onto UV CH1, it does SOMETHING to UV channels 2 and 3.
Does anyone have any ideas of how to help me on this? I would greatly appreciate it!!