-
Notifications
You must be signed in to change notification settings - Fork 234
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
Sheen implementation method? #227
Comments
The proposed spec is here: KhronosGroup/glTF#1688 You can see an example JSON: https:/BabylonJS/MeshesLibrary/blob/master/Sheen/Cloth.gltf#L157-L164 "KHR_materials_sheen": {
"sheenFactor": 1.0,
"sheenColor": [
0.0235294117647059,
0.0352941176470588,
0.2745098039215686
]
}, Let me know if you need more help. |
Note that the proposed spec is not final. In particular, it uses the term "factor" in a way that is inconsistent with the rest of glTF. I think it needs a bit of renaming things to fix it. |
Thanks! Sheen isn't appearing, and there's a Validation error:
Sorry for the noobishness. What's the proper syntax to declare the extension? |
glTF has a pair of root-level arrays of strings, one array called If the model cannot be displayed correctly in any glTF viewer that does not support a particular extension, then the extension must be declared in both |
Also your first material in |
@echadwick-wayfair Try this: Drop the GLB file here: https://sandbox.babylonjs.com/ |
That worked great. Thank you! How did you generate the GLB? I need to submit a bug for the BabylonJS guys, the Sandbox's exporter seems to be resetting the Occlusion UV1 assignment to UV0, and tossing the sheen settings. |
@echadwick-wayfair I'm using VSCode with my own "glTF Tools" extension (plugin) added to it, and I can't recommend it enough for hand-editing glTF files. I also have the "Prettify JSON" extension by Mohsen Azimi installed, which is how I auto-formatted the glTF's JSON (Ctrl-A, Ctrl-K, Ctrl-F). I made the GLB by right-clicking the title bar tab for the glTF file and picking "Export to GLB" from the context menu. It can import and export GLBs, using code contributed to my extension by Microsoft. It also shows live output from the official glTF Validator in the document problems window at the bottom. There's also a 3D preview, but that doesn't have Sheen or other PBR Next things in it yet. |
Keep in mind that the sheen settings are experimental and may change before they become ratified. Don't build out any graphics tool pipeline with the draft sheen extension, as its output will likely become obsolete soon. |
Thanks Ed. I'm working on this for the Khronos 3D Commerce group, helping develop standards, so yeah everything's in flux and that's fine. I would like to share files with the working group to demonstrate different sheen material settings. What's the best way for content creators to do so, at present? Did you do any edits to the source for the GLB file? Does the JSON in the GLTF overwrite all material settings inside the GLB binary, or only some of them? |
I would like to share files with the working group to demonstrate different sheen material settings. What's the best way for content creators to do so, at present?
For public samples under 10 meg, uploading to GitHub issues like this is great. For NDA stuff, use the Khronos document system, behind the login on the members page.
Did you do any edits to the source for the GLB file? Does the JSON in the GLTF overwrite all material settings inside the GLB binary, or only some of them?
The two files are separate. The GLB is completely stand-alone, but cannot be edited as-is, merely "imported" to glTF.
The glTF file is the one I hand-edited, prior to exporting to GLB. The glTF is not stand-alone, it pairs with the bin file and texture images from
your zip file. Search for the word "sheen" to find my edits. I added it to extensionsUsed, and to one material.
|
Thanks for the help! I am able to edit files easily now to test Sheen, and share results. My process:
|
What is the glTF syntax for adding sheen to an existing asset?
I've exported a model from Max2Babylon into glTF ASCII format, and am trying to manually add the sheen parameters. I'd like to share the asset, with sheen enabled.
Here's the asset without sheen:
With sheen enabled, using the BabylonJS Sandbox:
The sheen sample code from BabylonJS: https://doc.babylonjs.com/how_to/physically_based_rendering_master#sheen
My blind and fruitless attempt to integrate it into the glTF file:
chair_gltf_sheen.zip
Thanks for any help!
The text was updated successfully, but these errors were encountered: