Skip to content
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

Web Support for MaterialX #1184

Open
bernardkwok opened this issue May 5, 2021 · 3 comments · Fixed by #1198
Open

Web Support for MaterialX #1184

bernardkwok opened this issue May 5, 2021 · 3 comments · Fixed by #1198
Labels
Core Core change required Enhancement New feature or request Rendering Render change required ShaderGen Shader Generation change required
Milestone

Comments

@bernardkwok
Copy link

bernardkwok commented May 5, 2021

This is an outline of work that would constitute adding in "web" support for MaterialX.
Any work done will have it's work status listed.

Main work has been performed in the Autodesk fork and is now part of LucasFilm (ASWF) main as part
of 1.38.3.

The ADSK remaining work is the OCIO/MTLX initiative and and what this means for Web support.
First has non-Web in ADSK branch and will need to be reviewed. Web would follow: Note that currently
the JS shader generation wrappers do not expose access to the colorspace system (It's hard-coded fore the viewer).

Infrastructure

  • github workflow setup (CI). Status: in_main
    • linux completed. (adsk_complete_, in_main)
    • macos and windows (to_do)
  • misc. cleanup. Status: done

Core Javascript Bindings

  • update to 1.38. Status: adsk_complete
  • JsMaterialXCore: bindings for MaterialXCore module adsk_complete_, in_main_
  • JsMaterialXFormat: bindings for MaterialXFormat module adsk_complete , in_main_

Code Generator

  • EsslShaderGenerator: OpenGL ES code generation (WebGL 2.0 support only *) complete, for 1.38.2 release
  • Note: Automatically included as part of MaterixlGenGlsl module
    - *Note: as Safari intends to support 2.0, there is no 1.0 generator planned)
  • GLES base syntax validation via glslangValidator complete, for 1.38.2 release

Code Generation Javascript Bindings

  • JsMaterialXGenShader: wrappers for MaterialXGenShader module adsk_complete_, in_main_
  • JsMaterialXGenEssl: expose bindings for EsslShaderGenerator.

Sample app integration

  • JsMaterialXView : simple sample usage of GLES. Chrome and three.js in_main
  • To check support of materials dependent on additional libraries (Part of future work by community)
  • Note: Does not match features found in MaterialXView sample viewer
  • Final hosting location in main (in_main)

Colour Management Support

  • Current default CM transforms and test pass (ACESCg 1.2 subset) (in_main)
  • Usage of OCIO and ESSL support. (tentative target is 1.38.4.

image

@bhouston
Copy link

This is amazing work!

Q: Does this import into the existing Three.js node graph system? Or does it just directly generate GLSL code from the MaterialX definitions - sort of skipping the Three.js material system mostly?

@ashwinbhat
Copy link
Collaborator

This is amazing work!

Q: Does this import into the existing Three.js node graph system? Or does it just directly generate GLSL code from the MaterialX definitions - sort of skipping the Three.js material system mostly?

It generates GLSL code and is not tied to any framework.

@bernardkwok
Copy link
Author

There may be some requirement to branch a option on the generator to handle some declaration specifics (such as for three.js). TBD the interface. Also I've updated the progress to the current dat of this posting :).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Core change required Enhancement New feature or request Rendering Render change required ShaderGen Shader Generation change required
Projects
None yet
5 participants