Search Issue Tracker
By Design
Votes
0
Found in
2021.3.29f1
2022.3.7f1
2023.1.9f1
2023.2.0b5
Issue ID
UUM-45997
Regression
No
Material becomes transparent when it's away from a light source
Reproduction steps:
1. Open the attached "repro_IN-48188.zip" project
2. Enter the Play Mode
3. Pick up the candle on the ground to see your environment better
4. Go forward until there's an entrance to your right, then wait for both skeletons (one at the end of the path, the other one in the room) to chase you
5. Go back a few steps so you’re away from the floor torch
Expected result: Both skeletons appear normal
Actual result: Skeleton from the room (GameObject "Enemy (2)") appears transparent/black
Reproduced with: 2021.3.29f1, 2022.3.7f1, 2023.1.9f1, 2023.2.0b5
Reproducible on: Windows 10, Windows 11 (user’s)
Not reproducible on: No other environment tested
Note:
* Reproducible in Player
* Only the wall torches and floor torches are relevant for the reproduction of this issue, as candlelight doesn’t seem to have any effect
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- VFX Graph Memory leak when calling the ClearPropertyBinders and AddRemoveVFXProperty
- Entering "Configure Avatar" inside the Inspector locks it
- [Render Graph Viewer] Resource list icons cropped and in inconsistent positions
- Scene View with Debug Draw Mode enabled is gray when GPU Resident Drawer is enabled
- The UI is not visible when resizing out of focus built Player window with Application.runInBackground set to false
Resolution Note:
We took a look at the attached project and we were able to reproduce the issue.
The problem turned out to be that the skeletons are marked as static (more precisely, Occlusion Static). This tells Unity's occlusion system that these object will not move. But in fact, they do move, so this contract is violated and this is what is causing unexpected results.
We removed all static flags from the skeletons and cleared the occlusion data (see Window > Rendering > Occlusion Culling) and the issue went away. Once you have marked up all skeletons correctly, you may want to rebake occlusion data in Window > Rendering > Occlusion Culling for optimal performance.
So we believe the system is working as designed.
A general advice: You are using the Forward renderer in a scene with many lights. Generally, Forward doesn't handle many lights well, so you may want to switch to Deferred renderer instead. This should improve your overall frame-rate.