pmndrs / react-three-fiber

🇨🇭 A React renderer for Three.js
https://docs.pmnd.rs/react-three-fiber
MIT License
27.62k stars 1.6k forks source link

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

Open fabiopolimeni opened 9 months ago

fabiopolimeni commented 9 months ago

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 commented 8 months ago

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 commented 8 months ago

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.