New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Maya] usdExport cannot export shading with instances #332
Comments
What would be a good way to handle shading and instances? |
Hi Oleh- thanks for reporting these issues. Funnily enough, we are currently working to extend the material binding system in UsdShade to allow binding "by collections ", which will allow us to assign materials to instanced prims from "outside" the instance. Look for a "Roadmap update" post on the interest forum soon for more details.
The second issue is not something we've run into, and we'll look into it. We may use this issue primarily to target the #2 bug in the report.
…--SpiffiPhone
On Nov 22, 2017, at 1:07 AM, Oleh Stolyar ***@***.***> wrote:
What would be a good way to handle shading and instances?
I was wondering if it's possible to isolate shading in a separate, stronger layer, which would override instanceability and provide opinions about material references at locations of instance proxies. If yes, would geometry still be shared between prims?
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.
|
Filed as internal issue #154222. |
Maya plugin development has migrated to Autodesk's maya-usd project, so this is no longer relevant. Closing this out. |
…lve/adsk/feature/LineStyle Merge latest adsk/feature/linestyle branch
Description of Issue
There seems to be a fundamental difference between how Maya and USD handle instancing and material assignment.
In Maya, it's possible to override material assignment for instances: an instanced shape has an array attribute
instObjGroups
, the elements of which can be connected to multiple shading nodes. In this way, instances share geometry, but can have different materials.As far as I understand, in USD, a reference to material lives on a Gprim. Since
usdExport
translates Maya instances into USD instances, authoring edits on instanced Gprims is forbidden, which is exactly whatPxrUsdMayaShadingModeExporter
tries to do.Additionally, it is possible to crash usdExport and Maya if there is a name conflict between instanced shapes, coming from a referenced scene. I think this happens because
PxrUsdMayaUtil::MDagPathToUsdPath
, used byPxrUsdMayaShadingModeExporterContext::GetAssignments
is not injective: it maps distinctMDagPath
sfoo|bar|baz
andfoo:bar|baz
to the sameSdfPath
. This confuses usdExport: it attempts to write to a null prim, which raises aSIGABRT
.Steps to Reproduce
usdexport_shading_instances.ma
(File -> Create Reference...).usdexport_shading_instances_Cube_1
and shape node tousdexport_shading_instances_Shape
.System Information (OS, Hardware)
CentOS 7
Package Versions
v0.8.1
Build Flags
Mostly default.
The text was updated successfully, but these errors were encountered: