Autodesk / maya-usd

A common USD (Universal Scene Description) plugin for Autodesk Maya
747 stars 198 forks source link

Recognize "ArnoldProceduralCustom" on export for Maya-usd #3122

Open jcoelho88 opened 1 year ago

jcoelho88 commented 1 year ago

Hello everyone,

Recently we've been testing viability of using Yeti Fur (https://peregrinelabs.com/products/yeti) for rending hair and fur.

We noticed that the Arnold-USD plugin will recognize the "pgYetiMaya" nodes as an "ArnoldProceduralCustom" on export, but when using the Maya-usd the result is just an empty Xform prim.

I'm currently testing with:

Windows 10 Maya 2024.1 Maya-usd 0.23.0 MtoA 5.3.1.1 Yeti 4.2.7

Example Export from Maya-usd:

def Xform "hair_test_master" (
    kind = "assembly"
)
{
    def Xform "hair"
    {
        def Xform "body_fur"
        {
        }
    }
}

Example Export from Arnold-USD

def Xform "hair_test_master"
{
    def Xform "hair"
    {
        def Xform "body_fur"
        {
            def ArnoldProceduralCustom "body_furShape"
            {
                float arnold:density = 10
                string arnold:filename = "/PATH/TO/CACHE/hair_test.%04d.fur"
                int arnold:frame.timeSamples = {
                    1: 1,
                    2: 2,
                    3: 3,
                    4: 4,
                    5: 5,
                    6: 6,
                    7: 7,
                    8: 8,
                    9: 9,
                    10: 10,
                }
                uint arnold:id = 1155865197
                float arnold:motion_end = 0
                string arnold:node_entry = "pgYetiArnold"
                float[] arnold:samples.timeSamples = {
                    1: [1],
                    2: [2],
                    3: [3],
                    4: [4],
                    5: [5],
                    6: [6],
                    7: [7],
                    8: [8],
                    9: [9],
                    10: [10],
                }
                int arnold:verbosity = 1
                rel material:binding = </hair_test_master/Looks/fur_SG>
                string primvars:dcc_name = "body_furShape" (
                    elementSize = 1
                    interpolation = "constant"
                )
                float primvars:min_pixel_width = 0 (
                    elementSize = 1
                    interpolation = "constant"
                )
                int primvars:mode = 0 (
                    elementSize = 1
                    interpolation = "constant"
                )
                string[] primvars:mtoa_shading_groups = ["fur_SG"] (
                    elementSize = 1
                    interpolation = "constant"
                )
            }
        }
    }
}

The results from the Arnold-USD export while not renderable within Maya or Houdini Solaris (as far as I can manage anyway), it is renderable via kick.

Describe the solution you'd like Maya-usd export with the Arnold "plugin configuration option" would recognize and export the "ArnoldProceduralCustom" nodes.

Describe alternatives you've considered Currently a reason why we wouldn't just use the Arnold-USD export is in the way the export structures the layer. For example we find materials are added to the root instead of like how the Maya-usd export works where it will create a scope under the default prim. This is more convenient when multiple assets are referenced into a stage.

I'm hoping the Maya-usd plugin will support exporting "ArnoldProceduralCustom" nodes and follow the same pattern it does with materials and how they are binding, merging shapes and transforms etc.

I appreciate any insight into this and apologize if this should not be tagged as a feature request.

Cheers,

Jason Coelho

maya-usd-git-sync[bot] commented 7 months ago

Issue synced internally to EMSUSD-784