I’ve made my searches and peoples told me to bake from the 3D modeling software, problem is that the boat model is a bought asset and I’m very bad with 3D modeling software. I’ve tried baking ambient occlusion in Blender but the results were completely incoherent, not to mention problems at import. So I’m trying with the Unity alternative with the baked global illumination.
Here is the result with Unity baked Ambient Occlusion :
The models has a much better lighting, but the trouble now is that the cockpit is too dark. I guess this is because the transparent surface of the windows are not so transparent for the ray casting of the ambient occlusion computing. Since the window are part of the model I can’t exclude them from the baking. I’ve tried tweaking values in the lightmapping settings (indirect contribution) but nothings seemed to change the result.
What can I do ?
I’m using Unity 2021.3 LTS with URP render pipeline without post process effect (post processed AO are too expansive for my application)
The windows weren’t on their own sub-mesh and couldn’t be discarded form the Global Illumination baking, hence the issue.
But I managed to separate the them using Probuilder that I find much more easy to use than Blender, to I could exclude the windows from the AO baking. Also I had to turn Indirect contribution to 0 to reduce over dark region, and now I have a decent result !
The windows are made with the standard transparent shader. I guess AO baking doesn’t take account this transparency, even the seller of the 3D model send me baked AO with a pitch black cockpit !
But now this issue is solved, if someone face the same issue try excluding the windows form GI baking.
Are you sure they aren’t on their own submesh? If you are able to assign a custom material to just the windows, then they are on their own submesh - a submesh isn’t the same thing as a mesh.
Anyways, baking should respect transparency, the shader just needs to be set up to support it. Which shader were you using on the windows? And did the material have double-sided GI enabled?
Hmm… This setup should work as the URP Lit shader supports transparency with baked GI. If you can be bothered, a bug report would be much appreciated. I couldn’t reproduce your issue locally in a little test scene