three.js
three.js copied to clipboard
Anisotropic (and rotated anisotropic) reflections that work with IBL / PMREM
Description of the problem
We should probably implement in the core of ThreeJS anisotropic reflections and anisotropy rotation. I've implemented this in Clara.io but only for direct lights, not the PMREM filtered IBL indirect lights.
It would be cool to have anisotropy that works with IBL PMREM results -- although I understand that this may require pre-calculated anisotropic PMREM which we currently do not have, or PMREM filtering is only isotropic.
My implementation produces results that looks like this:
https://clara.io/view/a8b929e6-c703-47ff-a85d-44bc44e5a132
Three.js version
- [x] Dev
- [x] r78
- [ ] ...
Browser
- [x] All of them
- [ ] Chrome
- [ ] Firefox
- [ ] Internet Explorer
OS
- [x] All of them
- [ ] Windows
- [ ] Linux
- [ ] Android
- [ ] IOS
The solution to this is "bend normals."
Myself and https://github.com/Threekit are pleased to put a bounty of $250 USD on an accepted PR of a full implementation of bent normals for anisotropy with environment maps. A really good reference implementation and explanation is in the Filament code base: https://github.com/google/filament/blob/df6a100fcba66d9c99328a49d41fe3adecc0165d/shaders/src/common_lighting.fs#L89
Hey, I was looking at this problem and I have some questions on how it is supposed to be implemented. Is this supposed to be an option on a material to add an anisotropic map or is it supposed to be a new material like "anisotropic material"?
Ideally, it is added to MeshPhysicalMaterial
similar to clear coat, sheen or transmission.
This is implemented since r153
:tada:!