secondlife / secondlife/viewer

Light leaking into object corners

Open
#4,236 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

CannyUpvoted stale
Dominant language
C++
Stars
299
Forks
146
Avg merge
1d 9h
Merged PRs (30d)
88

Description

  1. Create a simple cube (mesh or prim) and scale it to 0.3, 4.0, 4.0.

  2. Create another cube, scale it to 4.0, 4.0, 0.3 and place it on top of the first one.

  3. Set the sun azimuth so that it shines onto the wide side of the first cube.

Move away from the objects and observe that the shadow changes; there is now a fully lit band of light directly underneath the second object.

This seems NOT to be not related to:

• Materials/PBR -- adding a PBR material does not change this behavior.

• Geometry -- the objects are watertight.

• LOD -- a mesh cube with all LODs using the full geometry behaves the same.

• Physics Shape Type -- Convex Hull and Prim behave the same.

I have found only two factors that affect this:

  1. Top object thickness -- the effect kicks in farther away with thicker objects.

  2. The Draw Distance -- the effect kicks in farther away with lower distances.

Interestingly, moving the top object up so that there is a gap between the two object changes the behavior and reduces the effect; see the attached image.

PS: I realize that this may not technically be a "light leak" -- but I couldn't think of a better term.

PS 2: I have tried to think of ways of designing around the issue, but I don't think there are any realistic options. Most non-trivial structures will encounter this issue in some form or other.

https://secondlife.canny.io/admin/board/bug-reports/p/light-leak-shadow-bug

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the two scaled cubes, varying the sun azimuth, camera distance, object thickness, draw distance, and the gap between objects. No source file or test entry point is identified; trace the shadow-rendering path responsible for the distance-dependent lit band, and consider the issue done when the reported setup no longer produces the artifact without regressing shadows.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
computer-graphics
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.