Giter Club home page Giter Club logo

materialx_learn's Introduction

Welcome to "MaterialX Learn"

main

Overview

This is a complementary site for those interested in learning about or are integrating MaterialX. Current content includes:

  • Node definition library with image and node graph previews.
  • Glossary of basic types, geometric definitions, color management and real-world unit definitions.
  • Fundamental concepts (Nodes, Nodegraphs, Documents, Definitions)
  • Python environment setup for MaterialX
  • Javascript utilities for graph, code generation, and shader previews
  • Python and Jupyter Tutorials from basics to shader code generation, shader graph interop, definition creation, and rendering pymaterialx.
  • Workflows touching on OpenUSD, OpenColorIO, Khronos glTF, Maya, Houdini and Blender.

Contributions Wanted

Comments and ideas for improving or providing new content and contributions are always welcome. See issues and project area for some of items on queue.

If you find value in here and want support its progress, Please consider sponsoring the project as it will allow it to be supported and continue to evolve.

Visit the site

March, 2024 Update

  • Update to 1.38.9 release which includes support for things like NPR library.
  • Inclusion of OpenPBR reference definition
  • Usability / workflow enhancements in progress, including:
    • enhanced Javascript / Web support for graphing, shader generation and preview
    • property editor revamp for definitions include shader preview, graph and interaction.

Visit the Repository Content

The content for the site is provided in the following sub-folders:

  • Documents Learning materials, utilities, and definitions.
  • PyMaterialX Python Tutorials, Jupyter Notebooks and Python utilities (including mxltutils)
  • Resources Additional MaterialX resource files.

materialx_learn's People

Contributors

guannan-kwok avatar kwokcb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

joaovbs96

materialx_learn's Issues

Custom Targets and code gen

  • defining custom targets
  • add in example for usd overrides from issue
  • how code target resolve works for impls which are graphs vs source code or C++
  • PR to fix resolves for issue. Under review. Fixed problem for logger.

Geo and file name resolvers

[] Geo reosolvers, including usd primvars
[] file name revolvers. E.g usage in Arnold, Mel / omniverse
[] object path resolvers

Validation and schemas

  • initial json schema for node graphs ( for Gltf proposal )
  • additional attributes such as units, cm, and graph positioning
  • usd graph wrapping?
  • mtlx to json and back to mltkx round trip โ€” required ?
  • baking vs graphs wrapping
  • cm node wrapping
  • data validation tests

Swatch generation for all nodedefs

A common core utility to be able to sample any type of output with a root material.
WIP generation and rendering testing part of this. kwokcb/MaterialX#36

[ ] New convert definitions to convert from type X to material (written, to review)
[ ] Python script to create and add in decorations
[ ] Add in matrix support
[x] Add in float, vec, color, BSDF, EDF, surface, volume support
[ ] Log issues with existing code gen (in progress)
[x] Code gen test GLSL
[x] Code gen test with OSL
[ ] Code gen test with MDL (tbd)
[x] Render test GLSL
[x] Render test with OSL
[ ] Render test with MDL (tbd)
[ ] PR for definitions fix and code gen fixes (in branch, not in ASWF)

Add in Basics Notebook

  • Done. Under review.
  • To separate out connection code into nodegraphs + nodes + connections book.

PRs on queue

On-going

  • topological value changes. In 1.38.8
  • publishing interface changes. In review for 1.38.9
  • Web viewer updates.
    • Uniform Performance. 1.38.9
    • UI revamp. 1.38.9
    • [] Drag and Drop
      • Geometry D&D. 1.38.9
      • Fix single file texture D&D. Maybe 1.38.9 or 1.39
  • target implementation resolve. 1.38.8

Back-logged

  • downstream traversal
  • nested nodegraphs

Archive 1.38.8 library

  • Save copy of 1.38.8 library
  • Add definition comparison to definition doc generation (so can tag what version a definition was introduced in)

Add in Glossary

Add in

  • typedefs
  • geompropdefs
  • unit and unittype.
  • colorspace. Need to add in different impls for each target. GLSL is done.

MaterialX / USD Notebook

Setup Workflow

  • Python USD setup
  • Basic USD shader graph traversal

Export Workflow

  • Export from USD to MTLX
  • Codegen

Synchronizing USD and MTLX

  • Basic value edit

  • Topological edit

  • USD Material encapsulation with shared shader / graph reference vs non-encapsulate MaterialX approach.

  • Import MTLX to USD (without UsdMtlx Python support)

  • More attributes

  • More Examples

UI Library Update

  • Boostrap update
    • Dark / light mode update
    • Dark / light mode detection

Rendering Notebook

  • Basic renderer setup for GLSL
  • OSL renderer setup
  • MSL renderer setup
  • Extract into mxrender.py
  • Creating "renderable" graphs roots (using convert*)
  • Handling topological changes.
    • "Hashing" / Shader dictionary
  • Log issues with core API (missing wrapper so far, but also fixing direct paths to interface inputs vs interior inputs as no one will ever figure out you need to do this.
  • Full reflection model (e.g. to JSON)

Add in Code Generation Notebook

  • Go over basic code generation up to the point of producing code for a given language.
  • Use generateshader.py as source material.
  • Thought: check in a version of this with Jupyter comments (annotations).

NodeGraphs Notebook

Basics for creating nodegraphs including:

  • instantiating a graph,
  • creating input and output
    interfaces
  • creating nodes
  • connecting nodes to each other and to the interfaces.

Connecting with a root of a surface shader within the graph and to a surface material outside:

  • Output mermaid graph
  • Output render image

JSON serialization

  • Initial JSON test using 3rd party Python packages. xmltodict and sample schame
  • Replicate MaterialJSON from branch ASWF proposal. Read and write done
  • Initial write-up using serialization.
  • JSON proposal issue on ASWF repo
  • Python utilities extraction to mtlxutils

Web Updates for Reference Library

Change

  • Add web previews / editing to UI per node
  • Update core Web viewer
    • performance updates
    • editor updates
    • drag-drop updates
  • JS module publishing. Core module now available as part of 1.38.9 release.
  • Use MTLX JS for mermaid generation
  • Use MTLX JS for shader preview and shader gen

Document comparison

  • utility to compare elements at arbitrary level.
  • log issue that built in function has incorrect compare for children
  • compare libraries, nodefs and impls.
  • compareVersions.py command and sample output.
  • mtlxuitls utility (pull out MaterialXCompare class from command)

Distillation and Baking Notebook

  • Add 2D pipeline setup
  • extract to show glTF distillation pipeline
    • including image swizzle graph for ORM.
  • Possible USDz distillation pipeline
  • Possible deferrred rendering pipeline

QuiltiX Pipeline

Plugin

  • Added in mtlx<->gltf interop
  • Added in mtlx xml->json interop
  • Added in usd material text preview
  • Added in gltf / json text preview
  • Added in glTF QT widget

Core QuiltiX Updates

  • Logged issue about incorrect type resolve for glTF
    • Added PR for fix - in-
  • Small graph data integrity issues -- checked in.
  • USD text preview -- checked in
  • Logged issue about multi-output type not work.
    • PR for fix
      • in review and test Richard's changes. In progress

Plugin Writeup

  • Basics of pipeline interop
  • Incorporating Python packages
    • Github template repos
  • "Plugin" design
  • Graph handling + interop glTF/USD/MTLX
  • Usage for glTF pipeline and editor.
    • glTF editor site V1

1.38.7 Sync

  • Filter predicates in Python working now
  • New conversion to material definitions added now
  • Rebuild reference library to include MSL and any definition changes.
  • Sync shader gen notebook to include new Metal support.
  • TargetDef / TypeDef Python exposure usage

Publish Additional Python utilities

  • Base file, graph manipulation / traversal (mtlxutil created)
  • Utility in MTLX core PR for GraphIO ( Will use mxgraph for now instead of
    relying on core changes)
  • Utility to inline source implementations
  • Utillity to create definitions for source implementations (code in notebooks)
  • Utility to generate material roots for sample.
    • [] Utility to render these using OSL, or other
  • Utility to generate graphs based on input textures. (tooling be proposed by Mosha on TSC)
  • Blender based utilities
    • SVG to MTLX / GLTF
    • Blender material to MTLX plug-in
    • Image to MTLX / GLTF

OCIO code gen

  • OCIO 2.2 setup
  • built in configs and colorspaces
  • source code gen for glsl, osl, Mel
  • Logged issue of missing osl in Python api (works in local build) AcademySoftwareFoundation/OpenColorIO#1820
  • nodedefs and impl for source code logic
  • stand alone utility to mxtlxuits package and sample command
  • check on basic blocks progress (OCIO TSC)

Add shade code functions for node library docs

Possible options:

  • Show only OSL
  • Show all

Note that there is a difference betweeen generating a reference and generating
the code for the function which has no current option for code gen.

MaterialX Development and LLMs

  • Look at LLMs for MaterialX development
  • Short-term:
  • Multi-language code generation. in progress
  • Graph generation / remapping.
  • schema generation (JSON graphs prototype for glTF mtlx discussions tried. And in book)
  • Coding assist - CoPilot book done
  • ... more to come ...

Jupyter Notebook Hosting

  • Figure out how to host on Codespaces and Colab
  • Create sample repo that can be used for both.
    - [x] Add additional cell for Colab specific setup
  • Add video for Codespace usage. TBD

Transfer / Create Node Page

  • Pull useful parts about libraries, assets, publishing creation docs from 1.39 spec. Not required as in core github now.

Investiatae code spaces and colab

For interactive editing, look at code spaces

Something akin to this

  • Test with local Jupyter basics book
  • Try pushing to Google Colab
  • Investigate using Github codespaces instead. In progress.
  • Encapsulate std lib inside Python module.
  • Core support for PySide pip install. Help wanted to get this into ASWF build system and published ?
  • Add pip install of MaterialX modules as part of Colab setup.

Nodgraphs / Definition Publishing Notebook

  • Core publishing fix and base workflow in node editor (PR in review)
  • Update existing library core update (spacing PR in review)
  • 1.39 spec documentation re-review
  • Doc: Identifier generation
  • Doc: namespace, nodegraphs, versioning
  • Doc: document strings
  • Doc: comparisons with Houdini / Maya
  • Source code approach vs functional graph approach
  • creatematerial.py script (in progress)
  • Doc: tokens and variants

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.