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

Any guide on how to migrate to the new ThreeJS lighting model? #3174

Open
fabiopolimeni opened this issue Feb 18, 2024 · 2 comments
Open

Any guide on how to migrate to the new ThreeJS lighting model? #3174

fabiopolimeni opened this issue Feb 18, 2024 · 2 comments

Comments

@fabiopolimeni
Copy link

fabiopolimeni commented Feb 18, 2024

Hi, I am looking around, see if I can find some help on how to setup a fiber/drei project that look good with a three version > r154, with no much luck so far.

I am new around here, and all, or at least the one I have tried, examples from the Example page, look amazing, but not so much once ported to my own project with ThreeJS > r154. They look dull, ugly, or the lighting is simply wrong.

I am aware of the lighting model changes since r155, and the legacy flag, but that is not sustainable in the long run. Is there some guide, or some example of how to setup scenes that look good, or any tutorial that shows how to bring one of examples to the "new" version of ThreeJS while keeping its look and feel?

@CodyJasonBennett
Copy link
Member

See https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733. We can add a guide for this or at least update our examples since many of them use old lighting.

@fabiopolimeni
Copy link
Author

Thank you for the replay. I read the migration doc, and that's what I tried to follow when bring examples to the new lighting model. It would be nice if some of the examples could be ported. I have the impression the physically correct fall-off of the lights play a big role, or, it is just my inexperience, but I could reproduce the same lighting by just multiplying the light intensity by PI, using the sRGB color space, or playing around with tone mapping. The background would never blend in with the default plane.

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

2 participants