Autodesk / Autodesk/maya-usd

maya-usd and primvar-reader

Open
#3,238 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Wolfram Language
Stars
905
Forks
223
Avg merge
2d 9h
Merged PRs (30d)
17

Description

Hello,

Here at Superprod we are doing the surfacing in Houdini. The result is exported into USD.
And we would like to get the surfacing into Maya (the USDPreviewSurface). This is the case for simple usage (we have the USDPreviewSurface and connected Textures), but not for more complexe cases. Example with a [primvar-reader node](https://openusd.org/release/spec_usdpreviewsurface.html#primvar-reader):

In Houdini I setup something like this:
![image](https://github.com/Autodesk/maya-usd/assets/2589095/66015d1d-1309-4c6b-9609-9b5a7326ebb8)

Then I export a USD, and I have something like this:
```
#usda 1.0
(
endTimeCode = 1
framesPerSecond = 24
metersPerUnit = 1
startTimeCode = 1
timeCodesPerSecond = 24
upAxis = "Y"
)

def Xform "world"
{
def Xform "geo"
{
def Mesh "mesh1" (
prepend apiSchemas = ["MaterialBindingAPI"]
)
{
rel material:binding =
matrix4d xformOp:transform = ( (1, 0, 0, 0), (0, 1, 0, 0), (0, 0, 1, 0), (0, 0, 0, 1) )
uniform token[] xformOpOrder = ["xformOp:transform"]
}
}

def Scope "mtl"
{
def Material "mat_prv"
{
token outputs:displacement.connect =
token outputs:surface.connect =

def Shader "mat_prv"
{
uniform token info:id = "UsdPreviewSurface"
color3f inputs:diffuseColor.connect =
token outputs:displacement
token outputs:surface
}

def Shader "usdprimvarreader1"
{
uniform token info:id = "UsdPrimvarReader_float"
string inputs:varname = "my_primvar"
float outputs:result
}
}
}
}
```

And in Maya, if I import this USD, I have this in the hypershade:
![image](https://github.com/Autodesk/maya-usd/assets/2589095/361d2449-b0c3-4256-92e4-43dce56ddfbd)

The **primvar-reader** is missing...
Also, the primvar (here `my_primvar`) is not "translated" into the Maya world. I know that this topic has been discussed in various threads (#896 for example). But I do not know if a direction has been decided about this?
At first, I would expect to find the [USDPreviewSurfaces and basic set of nodes](https://openusd.org/release/spec_usdpreviewsurface.html) into Maya. Do you have any work in progress linked to this?

Thank you all for your amazing work here!
Cheers,

**Additional context**
OS centos 7
Maya 2022.3
Maya USD 0.23.0

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reviewing the USDPreviewSurface specification and issue #896 to understand the project's direction for primvar-reader support. Reproduce the Maya 2022.3 import with the provided USD snippet and inspect how the missing node and `my_primvar` are represented. Done means the primvar-reader and its primvar connection are represented in Maya, with the intended scope agreed.

Written by the indexing model from the issue text.

Assessment

Domain
computer-graphics
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.