autodesk-forks / MaterialX

MaterialX C++ and Python libraries
http://www.materialx.org/
Apache License 2.0
106 stars 23 forks source link

Web Support for MaterialX #1184

Open bernardkwok opened 3 years ago

bernardkwok commented 3 years ago

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

Core Javascript Bindings

Code Generator

Code Generation Javascript Bindings

Sample app integration

Colour Management Support

image

bhouston commented 3 years ago

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 commented 3 years ago

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 commented 3 years ago

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 :).