-
-
Notifications
You must be signed in to change notification settings - Fork 35.3k
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
MeshPhysicalMaterial: Added sheen #16971
Conversation
# Conflicts: # examples/jsm/nodes/materials/nodes/StandardNode.js # examples/webgl_materials_nodes.html
By the way, this implementation only covers direct lighting for the time being. There's a bit of confusion/complication in regards to IBL and ambient lighting because sheen seems to be dependent on the direction of the light source |
We should never support ambient lighting on this. |
Thank you for your contribution once again... |
What do you mean by this? I asked my colleague tested it and it runs fine on his machine |
If you are using something like "githack" to test, it won't work. |
The reason we are adding this is that it is a BRDF improvement and it is to align with the Enterprise PBR model: https://github.com/DassaultSystemes-Technology/EnterprisePBRShadingModel |
@DanielSturk @sciecode Yeah, I run locally and work thanks.
The roadmap is very good. My think is advance in BRDF using nodes only to create better support for it and facilitate the merger of PR. Once implemented, create other BRDF features will be easier and optimized since the code can be calculated modularly. |
Usually the brdf parameters are part of the base brdf node. Having brdf
parameters as separate nodes generally is not how brdfs are implemented.
…On Fri, Jul 5, 2019, 2:41 PM sunag ***@***.***> wrote:
@DanielSturk <https://github.com/DanielSturk> @sciecode
<https://github.com/sciecode> Yeah, I run locally and work thanks.
The reason we are adding this is that it is a BRDF improvement and it is
to align with the Enterprise PBR model:
https://github.com/DassaultSystemes-Technology/EnterprisePBRShadingModel
The roadmap is very good. My think is advance in BRDF using nodes only to
create better support for it and facilitate the merger of PR. Once
implemented, create other BRDF features will be easier and optimized since
the code can be calculated modularly. Sheen could be one of these new
BRDF nodes.
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#16971?email_source=notifications&email_token=AAEPV7L44GWGK4U4LYSFEGLP56IU3A5CNFSM4H5JCQY2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGODZKDUZY#issuecomment-508836455>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/AAEPV7NFFSDBDCNEG4OS5L3P56IU3ANCNFSM4H5JCQYQ>
.
|
I was not thinking about separating the code from BRDF class, just implementing it as a process tree a bit more organized. So we can add relatives |
@mrdoob @WestLangley I do not want to block this PR, maybe I have caused this impression, it looks good to me. I can improve these details relative to the |
https://raw.githack.com/DanielSturk/three.js/sheen/examples/webgl_materials_sheen.html It seems it's not possible to control the arm with the keys like in the original physics example. Besides, the arm jitters right now in a strange way. At least on my system. If no interaction is intended, consider to remove the arm or make it static. |
He has put a |
# Conflicts: # examples/jsm/nodes/materials/nodes/StandardNode.js
@DanielSturk Can you please resolve the merge conflicts? |
# Conflicts: # src/materials/MeshPhysicalMaterial.d.ts # src/materials/MeshPhysicalMaterial.js # src/renderers/shaders/ShaderChunk/lights_physical_pars_fragment.glsl.js # src/renderers/shaders/ShaderLib.js
@mrdoob Looks ready to merge 👍 |
Is there a reason this isn't being merged? |
Sorry, I'm sure this PR was just overlooked. @DanielSturk Can you please resolve the merge conflicts one more time? |
@DanielSturk What problems did you run into with IBL support for |
@Mugen87 Np. Merge conflicts resolved :) |
Thank you, I appreciate the support! I've got it working now (was a little confused by the DFG (DG) LUT but it's working now). As soon as we can get this merged, I'll create the PR for the IBL Sheen! |
Thanks! |
@DanielSturk @bhouston I have renamed the property to |
@sunag on one of my computers (MacBook Air, Early 2015, Intel HD Graphics 6000) the sheen example runs at 20fps when using the node material, and at 60fps when not using it. In this screenshot, the fps graph shows when nodematerial was enabled and disabled: |
This because the NodeMaterial is being compiled every frame: |
Oh, what's the PR that fixes it? |
Ops, I'm already sending, sry my english 😳 |
Thanks for the merge @mrdoob and everyone involved |
The glTF sheen extension (KHR_materials_sheen) is nearly complete, although still welcoming feedback for a bit longer. To implement in MeshPhysicalMaterial, it would require:
The two maps use |
Added sheen for cloth materials such as velvet. The BDRF used is the same as Google's Filament (NDF is Estevez's and Kulla's "Charlie" sheen + Neubelt's visibility term https://google.github.io/filament/Filament.md.html).
I also added support for sheen to the StandardNodeMaterial (@sunag)
The demo for testing is webgl_materials_sheen.html