-
-
Notifications
You must be signed in to change notification settings - Fork 36.1k
Examples: Updates for color management (pt3) #25889
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
Examples: Updates for color management (pt3) #25889
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@takahirox does this result seem acceptable for the Hatsune Miku character?
| scene.add( camera ); | ||
|
|
||
| const grid = new THREE.GridHelper( 50, 50, 0xffffff, 0x333333 ); | ||
| const grid = new THREE.GridHelper( 50, 50, 0xffffff, 0x7b7b7b ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The default color values of GridHelper are 0x444444 and 0x888888 right now. Would it make sense to update these in the ctor of GridHelper as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good question! Replied in main thread, since it is an important question and I don't want to lose the discussion.
|
@Mugen87 to your question about changing the BoxHelper default colors —
I believe these BoxHelper colors were chosen during stage (1) above, and were not updated with (2). And (1) is still the default workflow in three.js, at least until r152 is released. So, probably the colors used in helpers do not need to be updated, they are still sRGB hex codes. Because of the change of input color assumptions, I'm trying to update the hex values in examples that use Anyway, sorry for such a long answer to a short question! It has been a challenge to work out these decisions. 😅 Does this sound OK? /cc @WestLangley |
|
Yes, sounds good! |
* LWOLoader: Updates for color management * MMDLoader: Updates for color management * Examples: Update more loader examples for color management --------- Co-authored-by: Michael Herzog <michael.herzog@human-interactive.org>
| params.emissive = new Color().fromArray( material.ambient ); | ||
| params.transparent = params.opacity !== 1.0; | ||
|
|
||
| if ( ColorManagement.enabled === true ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm currently reviewing the remaining explicit usage of ColorManagement in the example code.
Do we need this check here? This is the only loader which conditionally performs a color space conversion based on ColorManagement.enabled. Can't we just always assume color management and sRGB output is enabled?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the check would also be fine to remove, yes. VOXLoader does something similar:
three.js/examples/jsm/loaders/VOXLoader.js
Line 199 in 673eca6
| _color.setRGB( r, g, b, SRGBColorSpace ); |
Related: