Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Spoke Mirror Color not accurate #5572

Open
qiangjiadong opened this issue Jul 7, 2022 · 6 comments
Open

Spoke Mirror Color not accurate #5572

qiangjiadong opened this issue Jul 7, 2022 · 6 comments
Assignees
Labels
bug needs triage For bugs that have not yet been assigned a fix priority P2 Address when able

Comments

@qiangjiadong
Copy link

qiangjiadong commented Jul 7, 2022

Description
Mirror color presented in Hubs room is not consistent with Spoke preview.
The color seems too brighter and cannot be corrected with the exact match (Hubs room vs Spoke preview) If fog is enabled.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Scene Properties', set 'Background Color' to 4a4a4a, 'Fog Type' to exponential, 'Fog Color' to 4a4a4a, 'Fog Density' to 0.08
  2. Get 'Mirror' into Scene, default Mirror 'Color' is 7f7f7f, which matches Background Color and Fog Color in Spoke preview (see screenshot 1),
  3. Scenario 1: Publish Scene with default Mirror 'Color' 7f7f7f, Hub room mirror too bright compared to Spoke preview see screenshot 2),
  4. Scenario 2: Publish Scene with set Mirror Color 4a4a4a, Hub room mirror still too bright compared to Spoke preview see screenshot 3 and 4),
  5. See error screenshots below and sample scene link: https://hubs.mozilla.com/scenes/Xz98Ma5

Expected behavior
Mirror color consistent between Spoke preview and Hubs room.

Screenshots
Screenshot 2022-07-07 at 11 20 01
Mirror Color 7f7f7f in Spoke
Screenshot 2022-07-07 at 11 19 01
Mirror Color 7f7f7f in Hubs room
Screenshot 2022-07-07 at 11 39 54
Mirror Color 4a4a4a in Spoke
Screenshot 2022-07-07 at 11 21 08
Mirror Color 4a4a4a in Hubs room

Hardware

  • Device: Desktop,
  • OS: Windows, iOS
  • Browser: Firefox, Chrome

Additional context
Add any other context about the problem here.

@qiangjiadong qiangjiadong added bug needs triage For bugs that have not yet been assigned a fix priority labels Jul 7, 2022
@takahirox
Copy link
Contributor

Thanks for the problem report. The issue might sound similar to #5571 and there might be a chance that it was broken by the recent our Three.js upgrade #5488, too.

@qiangjiadong
Copy link
Author

Thks Taka for fast reply :))), hope it can be fixed soon :)))))

@juunini
Copy link
Contributor

juunini commented Jul 11, 2022

this is github:mozillareality/three.js#hubs-patches-133

image

and this is github:mozillareality/three.js#hubs-patches-141

image

@takahirox it seems Three.js version issue

@emclaren emclaren added the P2 Address when able label Jul 12, 2022
@takahirox
Copy link
Contributor

takahirox commented Jul 16, 2022

Probably I have figured out the root issue. The root issue seems to be in the official Three.js. Color space conversions for fog can mismatch between render target and screen. I'm thinking of

  1. Filing an issue to Three.js GitHub repository
  2. Discussing the solution and making a PR
  3. Cherry-pick it to our Three.js if it will be merged

Although I said I hope we can fix the problem in one or two weeks on Discord but there is a chance that it takes longer.

A short-term workaround that you can do on your end so far is to disable fog in your scene if the scene has mirrors.

@takahirox
Copy link
Contributor

Filed an issue in Three.js github repo mrdoob/three.js#24362

@takahirox
Copy link
Contributor

Another workaround may be using LinearEncoding for output encoding.

@takahirox takahirox self-assigned this Jul 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug needs triage For bugs that have not yet been assigned a fix priority P2 Address when able
Projects
None yet
Development

No branches or pull requests

4 participants