secondlife / secondlife/viewer
Wrong highlights on BP materials
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 299
- Forks
- 146
- Avg merge
- 1d 9h
- Merged PRs (30d)
- 88
Description
Very niche edge case I spotted at random: a glancing reflection of the sun will result in the reflection getting blown out into wrong colors.
This affects only the glossy component of Blinn-Phong materials: PBR and environment BP are unaffected. It also requires a fairly specific kind of sky and a shallow angle so it's not easy to spot in everyday use.
Repro:
-
Create a cube, set it to blank texture, black tint so the diffuse doesn't interfere with any colors you see. Set specular to blank texture, set glossiness to 255, environment 0.
-
Set environment to sunset (control-shift-N). Open personal lighting settings, set glow focus to 1.0 to increase the sun intensity.
-
View the top of the cube towards the sun at a shallow angle. You should see something like the attached image, with a distorted cyan-blue-magenta highlight in the middle of the sun. Rotating the cube might help seeing the effect from a less shallow angle as well.
The effect depends strongly on the chosen sky and angle of viewing, e.g. I can't reproduce it using the default midday, but can see it on a custom sunset as well (PBR-tuned HDR enabled, so HDR or lack thereof doesn't matter). It can be seen on a sphere prim, but only when the specular angle is sufficiently shallow and glancing. Also lowering the glossiness spreads out the intensity of the highlight, eventually making the colors normal.
Dan notes: I see the color of the highlight is affected by the Blue Density.
https://secondlife.canny.io/admin/board/bug-reports/p/wrong-highlights-on-bp-materials
This repo is using Opire - what does it mean? 👇
💵 Everyone can add rewards for this issue commenting
/reward 100 (replace 100 with the amount).🕵️♂️ If someone starts working on this issue to earn the rewards, they can comment
/try to let everyone know!🙌 And when they open the PR, they can comment
/claim #5229 either in the PR description or in a PR's comment.🪙 Also, everyone can tip any user commenting
/tip 20 @canny[bot] (replace 20 with the amount, and @canny[bot] with the user to tip).📖 If you want to learn more, check out our documentation.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the listed cube and sphere cases with the sunset sky, shallow viewing angle, and high glossiness, then trace the glossy Blinn-Phong material rendering path. Done means the cyan-blue-magenta highlight is corrected while PBR and environment Blinn-Phong materials remain unaffected, including the reported Blue Density variation.
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
- 42/100