When I bake a lightmap in Unity, I have a cube that has a brown material on it however whenever it bakes, half of it is brown, but the other half is a weird shade of green (I think it is bleeding over from a nearby wall.) I am not entirely sure what the issue is as I am fairly new to Unity so I don’t really know what to look for. Also, the cube was just made using the Unity shape features. I did not use Blender or another 3D modeling software for anything in here. It is hard to show, but I added an image here, Unity doesn’t support video uploads.
Thank you for your help!
It’s bit hard to tell what is going on here. Could you post a screenshot with more of the scene in view? Or share the scene. You can also use the lightmap preview window to debug stuff like this
Here are some other photos. Basically, whenever I bake the lightmap, half of a cube is the color it should be, brown, and the other half is a different color that it should not be, a shade of green. I am also kind of new to all of this, so I might be getting some words mixed up etc. Thank you for your help!
Here is another image since it does not let me send two in one message.
The entire ramp should look like this. This is just the bottom side of it.
The green in the background is presumably your skybox? I think what you are seeing is lightmap contribution from the environment.
If you want to disable environment lighting entirely, you can do the following:
- Open the lighting window (Window > Rendering > Lighting), navigate the Environment tab.
- Set the Environment Lighting Source to Color, set the color to fully black.
- Set the Environment Reflections Source to Custom, but don’t assign a cubemap
Try rebaking with no environment and see how the result looks
The green in the background is not my skybox, and instead is just the walls of a room that this part of my game in. Sorry for the confusion. I currently have no skybox.
Where is the light source? Is it that red object beneath the cube? It might be bouncing off your green walls - are they marked as GI contributors?
My hunch is still that this is an authoring issue. If you send the problematic scene (you can export it as a unitypackage for example) I can take a look.
After checking, the green walls were marked as GI contributors. After turning it off, everything started working!
Thank you so much for your help! 