lighttransport / tinyusdz

Tiny, dependency-free USDZ/USDA/USDC library written in C++14
Other
492 stars 37 forks source link

[TODO] MaterialX support #86

Open syoyo opened 1 year ago

syoyo commented 1 year ago

Working branch: mtlx https://github.com/syoyo/tinyusdz/tree/mtlx

MaterialX spec: https://materialx.org/assets/MaterialX.v1.38.Spec.pdf (version: 1.38)

Adding TinyUSDZ to load USD model in ASF MaterialXViewer https://github.com/lighttransport/materialx (We can use this as a reference and for verification)

TODO

Don't support

Dataset for USD + MaterialX

syoyo commented 1 year ago

Example syntax(?) of materialx

#usda 1.0

def "bora" 
(
   # Seems we need to specify </MaterialX> prim path
   references = @usd_preview_surface_default.mtlx@</MaterialX>
) {

}
$ usdcat --flatten materialx-001.usda 
#usda 1.0
(
    doc = """Generated from Composed Stage of root layer /mnt/data/work/tinyusdz/tests/usda/materialx-001.usda
"""
)

def "bora"
{
    def "Materials"
    {
        def Material "USD_Default"
        {
        }
    }
}
syoyo commented 1 year ago

https://materialx.org/assets/MaterialX.v1.38.Supplement.pdf

Texture nodes

Math nodes

Adjustment nodes

Channel nodes