-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
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
Inital PR for MeshStandardMaterial #7381
Conversation
Looks great! We'll definitely have to find model/textures for this. |
Inital PR for MeshStandardMaterial
Hmm, I think you forgot to include |
Looks like I forgot a lot of stuff... sorry. |
Also |
I failed to push the new files. Sorry. #7382 |
One thing to think about. This model is desigend to be easy-to-use. It only has color, roughness, reflectivity, and metalness as its main parameters. Even so, it is physically-based. @bhouston has proposed a more-sophisticated Disney-like material with clear-coat and the like. That material may be more appropriate for our It is up to you. |
What do you think @bhouston? |
Very very nice. Usually people call it specularMap rather than reflectivityMap. That would reduce some of the code because we already have a specularMap. I think we should aim for full compatibility with the UE4 Physical material, which is basically the Disney PBR material with slightly different parameterizations. :) |
I would suggest only having a single MeshPhysicaMaterial, rather than a Standard and a Physical - just for simplicity sake. |
Looks really nice, I like it. I read it as: the old "map" texture is albedo, roughness (glosiness), reflectivity (specular) and metalness, plus the old usual maps (normal, envMap). Will the Fresnel contribution be possible to modify, or is it enough with the Schlick's approximation? |
@spite, normally specularColor (e.g. F0) should blend to white via Dielectric Fresnel using the Schlick approximation. What further control do you require? Here is how you can map between IOR and specularColor/F0 so you can use the Schlick's approximation:
|
I am in favor of a Disney-like model, too, but it involves 10, not 4, parameters. ( For example, some additional parameters would be sheen, tint, clearCoat, specularTint, clearCoatGloss, subsurface.) In my view, that is too much for the average user, so I proposed It was my vision to add the more-sophisticated Disney-like |
@bhouston nice! i was just wondering about that. it looks cool. i agree that a basic, 4-params physical material for threejs will be more than enough for almost everyone |
If we are against implementing the rest of the standard UE4/Disney PBR model as part of this material to keep it simple, you should not call this Physical, rather call it Standard. I would only call this Physical if it is going to be compatible, or at least eventually compatible with the standard UE4/Disney Physical models -- otherwise we have to introduce a new MorePhysical material in the future, which would just be awkward. Unity actually has a similar simplified PBR material and they use the name Standard. I think reflectivityMap is fine now that I understand how it differs. :) |
Here is Unity's Standard material, which closely followed @WestLangley's implementation: (Although it looks Unity3D have even done away with the ability to control F0, unless I am mistaken, so one less parameter than this material.) |
I think this is quite a change for what people is used. Evidence of this is how hard it is to find models/textures out there, so I think calling it A more advanced material could be just called |
So yesterday I was checking out a bit more the So yes, I think I'll rename the new material back to |
OK. So now can |
I guess 😉 |
Yeah, that makes sense. |
Great work! Any idea when this will land in master/be released? |
December 15th, hopefully! |
This PR contains the plumbing necessary to support the addition of
MeshStandardMaterial
, an easy-to-use, pre-defined material.This material will be physically-based, and support roughness and metalness. Also, a roughness map, a reflectivity map, and a metalness map (aka, a metalness workflow). It uses the GGX brdf, with GGX-Smith visibility term. It also uses an "environment brdf" to modulate the reflectance of the environment map. This is considerably more realistic than the "combine" methods we employ now.
Future enhancements will add image-based lighting support, and perhaps light probes.
The details of the model are not important at this point; that can be discussed/debated/changed later. The material can also be renamed to
MeshPhysicalMaterial
if desired. The purpose of this PR is to get the plumbing in place.This should not affect existing code; deletions are minimal.
I will provide an example of its use shortly.
/ping @bhouston