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

WIP: Added anisotropic roughness to mainline #17391

Closed
wants to merge 16 commits into from

Conversation

DanielSturk
Copy link
Contributor

@DanielSturk DanielSturk commented Aug 30, 2019

b3fcfc566d0bb4368f83a378358e23df

This is made with the intention of aligning three.js with the next-gen glTF model KhronosGroup/glTF#1442 and the Enterprise PBR #16977

The code was sourced from Google's Filament https://google.github.io/filament/Materials.html#materialmodels/litmodel/anisotropy

Likely before merging, the intention is to switch the parameterization from strength/direction to a 2d vector. The reasoning for this is that for interpolated rotation maps, there will be a discontinuity where the direction wraps around (360 -> 0 will not wrap naturally, it will interpolate backwards from 360 to 0). This is discussed in several places in the glTf thread KhronosGroup/glTF#1442 (comment)
In fact, this is visible in the screenshot
8ff5725c042bbbade2e72a340de57c66

Another intended feature is to try to combine the anisotropy and sheen brdfs. For IBL this is easy (bent normal from anisotropy + sheen env DFG lookup). For direct lighting this is more complex.

# Conflicts:
#	src/materials/MeshPhysicalMaterial.js
#	src/renderers/WebGLRenderer.js
#	src/renderers/shaders/ShaderChunk/common.glsl.js
#	src/renderers/shaders/ShaderChunk/envmap_physical_pars_fragment.glsl.js
#	src/renderers/shaders/ShaderChunk/lights_fragment_begin.glsl.js
#	src/renderers/shaders/ShaderChunk/lights_fragment_maps.glsl.js
#	src/renderers/shaders/ShaderChunk/uv_pars_fragment.glsl.js
#	src/renderers/shaders/ShaderChunk/uv_pars_vertex.glsl.js
#	src/renderers/shaders/ShaderChunk/uv_vertex.glsl.js
#	src/renderers/webgl/WebGLProgram.js
#	src/renderers/webgl/WebGLPrograms.js
# Conflicts:
#	examples/webgl_materials_envmaps_anisotropy.html
…latShading

# Conflicts:
#	examples/jsm/nodes/materials/nodes/StandardNode.js
#	examples/webgl_materials_envmaps_anisotropy.html
#	src/renderers/shaders/ShaderLib/meshphysical_frag.glsl.js
…e material

# Conflicts:
#	examples/jsm/nodes/accessors/ReflectNode.js
# Conflicts:
#	examples/jsm/nodes/materials/nodes/StandardNode.js
Signed-off-by: Daniel Sturk <danielsturk1@gmail.com>
@DanielSturk DanielSturk changed the title Added anisotropic roughness to mainline WIP: Added anisotropic roughness to mainline Aug 30, 2019
@WestLangley
Copy link
Collaborator

Related: #9250.

Perhaps @bhouston can provide a model similar to the model shown in #9250 so we have a high-quality example.

@Mugen87
Copy link
Collaborator

Mugen87 commented Sep 2, 2019

Can you please add the new example to files.js? Otherwise it won't be visible in the side bar navigation menu.

@mrdoob mrdoob added this to the r109 milestone Sep 2, 2019
@DanielSturk
Copy link
Contributor Author

@Mugen87 Thanks for reviewing my code, the suggested changes have all been made. Apologies for the delay, @sunag was helping me with some changes to this in another thread

@mrdoob mrdoob modified the milestones: r109, r110 Sep 25, 2019
@mrdoob mrdoob removed this from the r110 milestone Oct 30, 2019
@mrdoob mrdoob added this to the r125 milestone Dec 24, 2020
@mrdoob mrdoob modified the milestones: r125, r126 Jan 27, 2021
@mrdoob mrdoob modified the milestones: r126, r127 Feb 23, 2021
@mrdoob mrdoob modified the milestones: r127, r128 Mar 30, 2021
@mrdoob mrdoob modified the milestones: r128, r129 Apr 23, 2021
@mrdoob mrdoob modified the milestones: r129, r130 May 27, 2021
@mrdoob mrdoob modified the milestones: r130, r131 Jun 30, 2021
@mrdoob mrdoob modified the milestones: r131, r132 Jul 28, 2021
@mrdoob mrdoob modified the milestones: r132, r133 Aug 26, 2021
@mrdoob mrdoob modified the milestones: r133, r134 Sep 30, 2021
@mrdoob mrdoob modified the milestones: r134, r135 Oct 28, 2021
@mrdoob mrdoob modified the milestones: r135, r136 Nov 26, 2021
@mrdoob mrdoob modified the milestones: r136, r137 Dec 24, 2021
@mrdoob mrdoob modified the milestones: r137, r138 Jan 26, 2022
@mrdoob
Copy link
Owner

mrdoob commented Feb 23, 2022

Seems like this got stale.

@mrdoob mrdoob closed this Feb 23, 2022
@mrdoob mrdoob removed this from the r138 milestone Feb 23, 2022
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

Successfully merging this pull request may close these issues.

5 participants