mrdoob / three.js

JavaScript 3D Library.
https://threejs.org/
MIT License
102.25k stars 35.35k forks source link

Anisotropic (and rotated anisotropic) reflections that work with IBL / PMREM #9250

Closed bhouston closed 1 year ago

bhouston commented 8 years ago
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:

cooking pot ggx anisotropic metallic

https://clara.io/view/a8b929e6-c703-47ff-a85d-44bc44e5a132

Three.js version
bhouston commented 5 years ago

The solution to this is "bend normals."

bhouston commented 2 years ago

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

danyjf commented 2 years ago

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"?

Mugen87 commented 2 years ago

Ideally, it is added to MeshPhysicalMaterial similar to clear coat, sheen or transmission.

Mugen87 commented 1 year ago

This is implemented since r153 :tada:!