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

Color Management changes in THREE #5302

Open
dmarcos opened this issue Jun 9, 2023 · 3 comments
Open

Color Management changes in THREE #5302

dmarcos opened this issue Jun 9, 2023 · 3 comments

Comments

@dmarcos
Copy link
Member

dmarcos commented Jun 9, 2023

I've seen changes landing on THREE lately related to color management that seemed change A-Frame default behavior

A-Frame 1.4.2 on THREE r147

image

A-Frame master on THREE r152

image

@donmccurdy Sorry to bother. I went through the changelog. There are tons of changes and couldn't make it complete sense. Do you have a quick summary of the changes we have to do to get the same results than r147? Thanks so much

@donmccurdy
Copy link
Member

donmccurdy commented Jun 9, 2023

Hi @dmarcos! This summary is worth a look, if you haven't read it yet:

https://discourse.threejs.org/t/updates-to-color-management-in-three-js-r152/50791

At a glance, it looks like the "environment" component might need some updates, as described in supermedium/aframe-environment-component#83. Are there other issues you're seeing outside the environment? If that's the main thing, I can take a closer look there...

Setting renderer="colorManagement: false;" appears to get you back to the r147 behavior in r152, but that's more of a temporary workaround than a solution.

@dmarcos
Copy link
Member Author

dmarcos commented Jun 9, 2023

Thanks for getting back so quickly. I just skimmed through the thread. Still so much for me to learn he he. I was writing a component and handling textures manually and learned I have to do:

texture.colorSpace = THREE.SRGBColorSpace;

We are doing that automatically already for the built-in materials

For the environment component I have to spend more time. Thanks so much.

@mrxz
Copy link
Contributor

mrxz commented Jun 11, 2023

@dmarcos While setting texture.colorSpace manually works, you could consider calling rendererSystem.applyColorCorrection(texture) from your component instead. That way the component will work correctly with older versions (<= 1.4.2) as well.

As for the aframe-environment-component, I've updated the PR for supermedium/aframe-environment-component#83 as some additional changes were needed for aframe-master.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants