-
-
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
MeshPhysicalMaterial: Support clearcoatMap, clearcoatRoughnessMap #18677
Comments
- GLTFLoader: Implement KHR_materials_clearcoat extension. - MeshPhysicalMaterial: Support clearcoatMap and clearcoatRoughnessMap. - Fixes mrdoob#18677.
- GLTFLoader: Implement KHR_materials_clearcoat extension. - MeshPhysicalMaterial: Support clearcoatMap and clearcoatRoughnessMap. - Fixes mrdoob#18677.
In progress: #18682 |
Fixed by #18769. |
@donmccurdy What support do you intend for clearcoat/roughness map Currently, it is not considered in the offset/repeat priority list. |
Hm. My first reaction would be uv2 for clearcoatNormalMap, uv1 for everything else. It would be nice to get out of having to hardcode those pairings. 😅 |
Should the clearcoat normal/roughness map be added to the priority list so -- at a minimum -- |
Are there any known limitations apart from performance that is stopping repeat texturing of the clear coat normal? |
This is a long-standing issue. For the primary uv set, three.js only supports one offset/repeat pair per material. See #8278. three.js/src/renderers/webgl/WebGLMaterials.js Lines 177 to 183 in c3c03a7
|
Ok, thanks for the info. So in a perfect world we'd need 3 UV sets as AO works great on UV set 2. So the clearcoat normals would have to be moved to UV set 3 :) |
On second thought, I don't know why I suggested uv2 for clearcoat normals... all of these could be uv1, as far as I can tell. More flexibility would be nice of course, but clearcoat has no unique need for uv3, compared to other maps. I don't know what's in your model, @PaulMitch, does it require a 3rd UV set? If reusing the existing uv1 is enough, then my answer to @WestLangley's question ...
... would be yes. |
Ok so when @WestLangley says "the only map", does that mean the only map using offset/repeat for that UV set. |
The change we should probably make would be to update the code that @WestLangley linked to and ensure that if any clearcoat-related texture has a UV transform, three.js will use it. Because clearcoat maps are not in that list, they currently only get a UV transform if another texture using UV1 has a transform. My original suggestion of putting The NodeMaterial system has (much) more flexibility — it can pair any texture slot with any UV map, and supports an arbitrary number of UV attributes. However, (1) I don't know if we can consider it stable, and (2) I'm not sure whether new features like clearcoat, clearcoat roughness, and clearcoat normals have been added to the NodeMaterial shaders yet. |
Yeah it looks like MeshStandardNodeMaterial is added to the master branch, Thanks for your quick responses guys, much appreciated. |
Wow adding a map texture with a transform worked great, The clearcoatnormal is now repeating. |
MeshPhysicalMaterial currently offers:
The glTF extension
KHR_materials_clearcoat
will also require texture versions of the first two, which I'd propose adding to (only) MeshPhysicalMaterial:The text was updated successfully, but these errors were encountered: