Saturday, December 12, 2009

Famous Maya Render Layer Bug

I bet you encountered that bug before, like all the others maya players around. I'm talking about the render layer bug, you now, you switch to some other layer and got some messages saying that maya couldn't create a connection to a shading engines foo attribute at index [-1], yeeahh :) this one I'm talking about... So here is the solution

The bad thing about it is, they just didn't fix the real problem, it is a workaround...

4 comments:

Tankut said...

De-instancing all externals and fixing ALL namespaces to point to ":" usually works around the problem. Unless the deadline is very near, of course :)

Ozgur said...

For the real render layer bug, where you weirdly lost the shading assignments for some objects, I've written a script. What the script does is to store the shading assignments in somewhere else and re-assign it at render time. Although it is a very simple script, it helped me a lot in some projects.

Blazej said...

Haha, Ozgur, same thoughts again.
This is especially true for per face assignment of materials.
I wrote a script that converts per face shaders to layered shaders which work with mentalRay vertex colors. The VertexColor sets are generated from the per face assignemnt of the shaders.
I am not sure how stable this works but it saved me on a shot at my graduation work. The benifit is that VertexColors work then on one shader and the layers can manage this.
This solution is tied to mental ray though. And it got kind of complicated because mental ray was not smart enough to render the subshaders with specific specular on one shader. And further more Maya had a bug in 2009 with VertexColor rendering which I realized after I wrote the workaround script. The service pack fixed it though. Still I lost my trust in Renderlayers. And once you look a the hypergraph you see what a mess the implementation is. It simply is not smart enough to reconnect the sets correctly if you start changing shader assignment on different layers.

GuildWars2Items said...

When you're down, and the world seems dark and empty, your forever friend lifts you up in spirits and makes that dark and empty world suddenly seem bright and full Diablo iii Gold Sale, this is Forever Friendship Diablo III Gold, someone who convinces you that there really is an unlocked door just waiting for you to open it Diablo 3 Gold.
The past is gone and static. Nothing we can do will change it.scarlet blade gold, the future is before us and dynamic. Everything we do will affect it rs gold, You laugh at mescarlet blade gold for being different , but I laugh at you for being the same.