Search Issue Tracker
By Design
By Design in 2023.2.X
Votes
0
Found in
2020.3.45f1
2021.3.18f1
2022.2.6f1
2023.1.0b3
2023.2.0a1
Issue ID
UUM-26465
Regression
No
Rectangle Shape Area Light generates a circle around the rectangle shape
Reproduction steps:
1. Open the attached “ProjectY.zip“ project
2. Open “Rectangle_Area_Light_Is_A_Circle” scene
3. Observe the Scene window
Expected result: Rectangle Shape Area Light appears as a rectangle in the Scene window
Actual result: Rectangle Shape Area Light appears as a rectangle inside a bigger circle in the Scene window
Reproducible with: 2020.3.45f1, 2021.3.18f1, 2022.2.6f1, 2023.1.0b3, 2023.2.0a1
Reproduced on: macOS Monterey 12.6 (Intel)
Note: Also reproducible in Build
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
- Out-of-bounds memory access with multiple CanvasRenderers under a Canvas when using Mesh API
- Inspector tries to access file after it was deleted when the file was locked in Inspector window
- Changing Transform values in Search window Inspector loses focus while dragging and stopping mouse without releasing dragging action
- Saving changes on the dirty VFX Graph during the Play mode throws "The referenced script (Unknown) on this Behaviour is missing!" warnings
- VFX Graph Debug Info overlaps the "Initialize" block debug info by default
Resolution Note:
There are multiple issues at play here.
Area lights are subjected to a range in order to optimize for baking them. In reality they have infinite range. But at some point the contribution of an area light becomes infinitessimal when you are far enough away from it. For such areas we will disregard the light for the GI calculation. So you need to set the range of the light big enough that it is not cut off too early. The range is spherical hence the apparent cutoff will be circular when projected to a surface. HDRP fades out near to the light range rather than having an abrupt cut-off.
Second the area light emits light in all directions in a hemisphere oriented above the light surface. This means that the shape of the light will only be pronounced when close to the surface. This is because the solid angle to the light is inversely proportional to the distance to the light. When the distance to the light is high, the intensity of the light is proportional to the solid angle and when the distance to the light is high, points on the surface will receive similar intensity. Only when the light is close to the surface will there be a significant difference in solid angle between adjacent points on the surface. Hence the light will appear more circular when further from the surface. See https://imgur.com/Ll1HrLj.gif
If you want a box like light then use the Box or Pyramid spot light in HDRP. See https://imgur.com/6dX7T2b.gif
I can't say for sure but I expect that the light in Bakery in your screenshot (https://jira.unity3d.com/secure/attachment/680342/image%20%28e6624f82-084b-4fc1-857b-540aaff7d0dd%29.png) is a box spot light. Either that or the light computed by Bakery is incorrect.
Resolution Note (2023.2.X):
There are multiple issues at play here.
Area lights are subjected to a range in order to optimize for baking them. In reality they have infinite range. But at some point the contribution of an area light becomes infinitessimal when you are far enough away from it. For such areas we will disregard the light for the GI calculation. So you need to set the range of the light big enough that it is not cut off too early. The range is spherical hence the apparent cutoff will be circular when projected to a surface. HDRP fades out near to the light range rather than having an abrupt cut-off.
Second the area light emits light in all directions in a hemisphere oriented above the light surface. This means that the shape of the light will only be pronounced when close to the surface. This is because the solid angle to the light is inversely proportional to the distance to the light. When the distance to the light is high, the intensity of the light is proportional to the solid angle and when the distance to the light is high, points on the surface will receive similar intensity. Only when the light is close to the surface will there be a significant difference in solid angle between adjacent points on the surface. Hence the light will appear more circular when further from the surface. See https://imgur.com/Ll1HrLj.gif
If you want a box like light then use the Box or Pyramid spot light in HDRP. See https://imgur.com/6dX7T2b.gif
I can't say for sure but I expect that the light in Bakery in your screenshot (https://jira.unity3d.com/secure/attachment/680342/image%20%28e6624f82-084b-4fc1-857b-540aaff7d0dd%29.png) is a box spot light. Either that or the light computed by Bakery is incorrect.