Community
Maya Forum
Welcome to Autodesk’s Maya Forums. Share your knowledge, ask questions, and explore popular Maya topics.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Problem with Instance of reference

11 REPLIES 11
Reply
Message 1 of 12
graylen
3839 Views, 11 Replies

Problem with Instance of reference

Hello,

I am building a large scene that has multiple objects duplicated. I have one file of the object and I reference the file in the master scene and all was well. The problems start when I try to make multiple instances of the referenced file. It works while I am in the scene and everything looks perfect but when I reload the scene again all the instances are transparent and can only be viewed in wireframe mode. I can select them from the outliner but I can not see them. I am running Maya 2011 64 bit on windows 7.
anyone has ideas how to solve this? Should I make several references to the same file instead of instances copy? is it the same from the memory point of view?

Thanks

Daniel
11 REPLIES 11
Message 2 of 12

The behaviour you describe makes me think that the instanced objects no longer have a material assigned to them. You could fix that, but frankly, I would not instance the objects but reference them in.
Message 3 of 12
Anonymous
in reply to: graylen

THNKR is right, you're losing your connections between your shading group and your shape node.

Were they reference edits(did you assign shaders in the new scene?)

I am not reproducing this on a simple scene right now, but maybe your scene is not so simple.
Can you describe your scene, are you using renderLayers(layer overrides?), have you assigned different shaders to the new instances in the scene?(again with a simple scene the reference edits seemed to do this right) Different UV's? Referencing in shaders that you are assigning? (you might try making sure the objects are not assigned to the default lambert shader in their originating scene...(though with my simple scene I wasn't seeing this as an issue))

When you make your instances, are they all instancing the original at the first transform level, or are you creating many instances, grouping them and then instancing those groups and then grouping those intstances and then instancing those groups.(give me some idea about how complex you are getting)

Are you instancing LOD groups? (there may be ways, but these may be better off as dupe refs)

You can check the reference edits on your referenced in scene when things seem hooked up ok, you might be able to export those reference edits to an offline file (which can be edited by hand if there is an understandable issue) which could then be assigned to the asset reference as a referenced edits.

Also, you asked about whether duplicating references (referencing the same scene in again and again) gave you similar performance gains. This is not a bad idea and there are changes in Maya2011 that now make duping a reference much faster (during file open of the referencing scene) than what used to be loading in the scene over and over. You can select the ref in the refEditor and dupe it - little double icon next to add and remove reference icon in the refEditor.

Duping is now faster than it used to be, much more predictable and easier to de-bug than instances, but some still swear by instancing in games. (but then they still would like per-instance almost everything, which makes things more complicated) Performance inside Maya may rely more on your scene history graph and graphics card in either situation.
Message 4 of 12
graylen
in reply to: graylen

Thank for the help, it turned out that I had a problem with the shader networks in the original files I was referencing, once I built the shader networks again all is well 🙂
Message 5 of 12
Anonymous
in reply to: graylen

Thanks for letting us know.
Any info on how you use and combine references and instancing would be helpful too.
Message 6 of 12
revilo3d
in reply to: graylen

Definitely curious about instancing ref methods. Ref'ing in an object say 1000 times does not seem practical.

Is this where the use of assets could come in?
Message 7 of 12
Anonymous
in reply to: revilo3d

duplicating a reference is somewhere in between reffing in an object 1000 times (the dupe is faster than really reffing in 1000 different files) and it isn't instancing, which is really tricky and can prove unhelpful later on if you'd like to change something possibly.

So, with dupe, you get the speed up of duping and the integrity of individual objects. I'd do the dupe.
Assets comes in when you want to more easily swap out one asset for another and maintain the work done to the scene with 1000 dupes, each with its own edits.
Message 8 of 12
Anonymous
in reply to: graylen

I am having the same trouble in maya 2012 with instances losing material assignments.

When I first reference my mesh and create the instances, every thing is fine. But as soon as I close and re-open the file, the instances have lost their material assignments and the original, referenced mesh is fine.

What kind of changes did you make to your shading network to get instances to work? In my case, the mesh has multiple materials, so the shape node talks to the SGs (as opposed to the transform talking to the SG in the case of a single material assigned to a whole object).
Message 9 of 12
Anonymous
in reply to: graylen

I think I may have tracked down the problem.

It appears that a combination of Sharing Shading Groups and multiple materials assigned to a single mesh cause the instances to lose their materials.

Follow these steps to reproduce:


1. Create a Sphere and assign two materials to it. Two lamberts, one blue, one green.
2. Save this File as refTest_twoToneSphere.ma
3. Create a new file.
4. Open the Create References Options.
5. Enable Sharing.
6. Enable Sharing Shading Networks.
7. Bring in the sphere.
8. Check the Reference Edits. Should be clear of any edits.
9. Instance the Sphere, parenting the new instance to the World.
10. Refresh the Reference Edits. You should see a bunch of re-wiring going on between over the IOG (instance object groups) attrs.
11. Save the file, you should see the instance of the Sphere immediately disappear (looks like maya immediately reloads references after a file is saved).

This doesnt happen if the mesh has a single material assigned to it, although you do see reference edits appear after instancing the mesh.

If someone can independantly verify the problem, it would be appreciated.
Thanks.
Message 10 of 12
leonsooi
in reply to: Anonymous

Yes, there seems to be a problem with referencing "multiple materials assigned to a single mesh". Details and (possible) solution at the following link - http://usa.autodesk.com/adsk/servlet/ps/dl/item?siteID=123112&id=13518129&linkID=9242258
Message 11 of 12
DLolo
in reply to: leonsooi

Even in 2020 this problem remains...

Message 12 of 12
johnturelloTXG93
in reply to: DLolo

Any update on this? It's still an issue 

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums