Home Technical Talk

[Maya] Issue with references sharing shading networks

polycounter lvl 11
Offline / Send Message
Spudnik polycounter lvl 11
I have an issue where if I create references to scenes with shared shading networks, it works only as long as I only reference one file. Ex: I reference in scene A with a cube that has shader shdrA into a new scene (shared shading networks enabled in reference options). I can now duplicate that reference as much as I like and only have one instance of shader shdrA.

Then I reference in scene B with a sphere that has shader shdrB. If I duplicate the reference of scene B now, I get multiple shaders instead of just one shared shader for all duplicated references.

So, the setup would look like this where A would have a shared shader and B would generate douplicate shaders with different namespaces.
MyScene
--- ref:A
--- ref:A2
--- ref:B
--- ref:B2
I also tried a setup that looks like this, where I just created an intermediary scene that held all the duplicate references of one file (all sharing one shader as expected), but as soon as I bring the two _assembly scenes back together, the 2nd one to get referenced in gets separate shaders again while the first one retains its one shared shader (where in both _assembly scenes it was one shared shader for all duplicates)
MyScene
--- ref:A_assembly
--- --- ref:A
--- --- ref:A2
--- B_assembly
--- --- ref:B
--- --- ref:B2
To sum up, the goal is to have one scene with multiple duplicates of different scenes refrenced in, but for those duplicates to share one shader. This is driving me insane since there's no appearant reason why it should break as soon as I reference in more than one different file. (Maya 2013 btw)

Replies

  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
  • Spudnik
    Offline / Send Message
    Spudnik polycounter lvl 11
    Found the solution.

    In the end, my scene setup looked like this, with the cube and sphere having shaders shdr_cube and shdr_sphere respectively:
    final_assembly.ma
    --- ref:cube_assembly.ma
    --- --- ref:cube.ma
    --- --- ref:cube.ma
    --- sphere_assembly
    --- --- ref:sphere.ma
    --- --- ref:sphere.ma
    
    These were the reference options. The Important thing is the "Merge into selected namespace and rename incoming objects that match" and having "Shading Networks" ticked obviously.
    andnbye.jpg

    And this is what things look like in my final_assembly.ma
    9KEPZHT.jpg
    PD62HiD.jpg
Sign In or Register to comment.