AcademySoftwareFoundation / MaterialX

MaterialX is an open standard for the exchange of rich material and look-development content across applications and renderers.
http://www.materialx.org/
Apache License 2.0
1.83k stars 335 forks source link

Exporting to glTF2 PBR material and glTF2 material with sheen, clearcoat and transmission. #653

Closed fire closed 2 years ago

fire commented 3 years ago

Trying to devise a match for the gltf2:

  1. glTF2 PBR materials
  2. glTF2 material with sheen, clearcoat and transmission.

Not sure where the current work is.

jstone-lucasfilm commented 3 years ago

@fire To my mind, the first step would be the creation of a MaterialX graph for the glTF BSDF, which should be validated by Khronos then contributed to the BxDF graph library in MaterialX:

https://github.com/materialx/MaterialX/tree/main/libraries#bxdf-graph-library

We're happy to help developers in constructing such a graph, and there are several examples from which they can borrow, but ideally the development process should be overseen by the designers of the glTF BSDF at Khronos.

fire commented 3 years ago

I have started initial contact with Khronos's gltf working group.

emackey commented 3 years ago

One of the members of the Khronos PBR TSG began prototyping something for us to experiment with. Many things still need adding or fixing, but it's a great start:

https://github.com/KhronosGroup/MaterialX/pull/1

fire commented 3 years ago

Reporting back that I was able to compile gltf2 boomb[ox] example and using previous standalone work I was able to bake the dependencies.

boom_box_bake boombox_viewer

https://github.com/fire/MaterialX/tree/standalone-gltf

fire commented 2 years ago

@donmccurdy gave me a MaterialX sample to reference making pbr gltf materials.

  1. https://github.com/donmccurdy/three.js/blob/364bf554d47ed92ea76a2630f4c602ee76b993d6/examples/jsm/loaders/MaterialXLoader.js#L259-L273

Discussion reminded:

  1. https://autodesk-forks.github.io/MaterialX/?file=Materials/Examples/StandardSurface/standard_surface_default.mtlx.
  2. https://www.materialx.org/assets/ASWF_OSD2021_MaterialX_slides_final.pdf
jstone-lucasfilm commented 2 years ago

An initial MaterialX graph for the glTF PBR shading model has been merged in pull request #861.

jstone-lucasfilm commented 2 years ago

Thanks for posting this original issue, @fire, and I believe we can close it out and create new issues (e.g. #874) to capture additional work on glTF/MaterialX integration.