nightstyles / alembic

Automatically exported from code.google.com/p/alembic
Other
1 stars 0 forks source link

shadingGroup per faceSet not rendered #341

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.Import the attached .abc file into Maya

2.Run the following MEL script
shadingNode -asShader phong;
// Result: phong1 // 
sets -renderable true -noSurfaceShader true -empty -name phong1SG;
// Result: phong1SG // 
connectAttr -f phong1.outColor phong1SG.surfaceShader;
// Result: Connected phong1.outColor to phong1SG.surfaceShader. // 
setAttr "phong1.color" -type double3 0 1 0 ;
select -r -ne ball_clusters_top ;
defaultNavigation -ce -d ball_clusters_top.surfaceShader -source phong1;
connectAttr -f phong1.outColor ball_clusters_top.surfaceShader;
// Result: Connected phong1.outColor to ball_clusters_top.surfaceShader. 

3.Render the scene

What is the expected output? What do you see instead?
Expected: Rendered ball with the top half in green color
Result: nothing

What version of the product are you using? On what operating system?
Maya 2015, Alembic 1.5.0, Windows 7

Please provide any additional information below.
Issue happens on animated mesh. For shadingGroup to work on animated mesh, the 
DG graph has to be different, it's a chain of (groupParts + groupId) nodes with 
the Polymesh node connected at the end.

Suggested fix: 
- instead of creating a ShadingEngine node and connecting it manually, 
AbcImport should just call `sets` command
- Also, sets command has to be called after Alembic Node is connected to Mesh 
node, otherwise the command wouldn't recognize that it's an animated mesh.

Original issue reported on code.google.com by nghoch...@gmail.com on 7 May 2014 at 4:13

Attachments:

GoogleCodeExporter commented 9 years ago
i have a temporary fix in my clone
https://code.google.com/r/nghochung-softimage-alembic/source/detail?r=e6512b6db1
792aa797641511737124fb2cbf0794

Original comment by nghoch...@gmail.com on 7 May 2014 at 4:34

GoogleCodeExporter commented 9 years ago
Is there a way to do this with the API so we don't have to call a MEL command?
You mention that this is a temporary fix, do you have a longer term solution in 
mind?

Original comment by miller.lucas on 7 May 2014 at 5:08

GoogleCodeExporter commented 9 years ago
Other than calling the MEL command, we can just create the groupParts and 
groupId chain in the plugin, but I'm not sure this will always be compatible 
with future version of Maya.
I haven't found another solution yet. It's temporary cause it was just quick 
fix for a Softimage user who was trying to bring his geometry cache over to 
Maya.

Original comment by nghoch...@gmail.com on 9 May 2014 at 11:56

GoogleCodeExporter commented 9 years ago

Original comment by miller.lucas on 25 Jun 2014 at 9:46