Maya instancing

Hello,
I try to do … “some” instances and I have a loooong loading time.
For maya users, do you use instances ? Do you have that problem ? Do you use an internal method to bypass maya system ?
Trying to create a set with a lot of instances in maya looks like an interesting challenge.

are you talking about real maya instances? or are you using referencing?

Our first version of our pipeline used to use references to import blocks to build environments. No need to go into details, it just collapsed after a couple dozens references.
The tech team revamped the system completely around a custom instancing node and we now can have hundreds of references/instances of objects to build environments from.

Each objects are exported separately into their own intermediate mesh files. and are then referenced/instanced when used to build environments.
When used from maya, those objects are imported directly from those intermediate files, but at this time they come with a basic single color material to avoid the clutter of thousands of materials in complex environments.
On big environments, the loading time and the import of all the references can take a few seconds, but it’s not really a big bottleneck.

If you go the Maya way to create your environments you might need to find a way around the default instancing as it’s rather painful to use.

et sinon, passe le bonjour a Damien C. de ma part :wink:

I use maya referencing and maya instancing. (I reference props and i instance them.)
My conclusions go in same direction as yours. We probably will probably developp a parallel method to use reference and instance. Thx for sharing your experience.

Le bonjour a été passé. Il te salue pareillement ! :wink:

@greuh: I’m very curious how your tech team revamped their system to use a custom instancing node. This is a problem I’ve dealt with before. First I just used imports and attached custom attributes that allowed me to backtrack to the source asset files (for updates). Then I discovered just referencing the asset once and creating transforms that connected to the referenced shape. Still this wasn’t the best solution because the instantiated shape node had a lot of Maya overhead. It seems like a custom Node would be in order, but I am not completely sure how to go about that. Any direction would be most appreciated!

[QUOTE=haggercody;11207]@greuh: I’m very curious how your tech team revamped their system to use a custom instancing node.[/QUOTE]
I wish I could tell you more, but I am mostly a user of that sort of things :wink:
From what I can see, it seems to be a clever use of the inMesh connection to the shapes of the “instanced” objects in the scene, connecting all to a unique custom node holding the external intermediate mesh data.
So instanced game objects are not actually Maya instances, but act in a very similar way.

Ah yea. So they probably used MGeometry, which would make sense, because you don’t need component data. You still need geometry points (and texcoords) to build it though, so I’m guessing there are a couple ways to go about that:

-store it in a maya file, ref it, copy, destroy
-reference it in once, then use it to copy from and update from

I’m guessing since its a custom node and not a maya instance you don’t have to worry about excessive GroupID nodes either. Sounds like an awesome way to do it!

[QUOTE=haggercody;11234]… so I’m guessing there are a couple ways to go about that:[/QUOTE]

or loading external files exported previously in an intermediate format so you can control exactly the amount of “garbage” you have to bring back upstream into the master scene file (ie: not importing materials for example)

yea that is true. A lightweight intermediate file format would work nicely if you already have code to parse it. If not, it would probably still be better than and worthwhile to write that code to parse it!

You’ve learned an important lesson today.

[QUOTE=Rankor;10065]Hello,
I try to do … “some” instances and I have a loooong loading time.
For maya users, do you use instances ? Do you have that problem ? Do you use an internal method to bypass maya system ?
Trying to create a set with a lot of instances in maya looks like an interesting challenge.[/QUOTE]

I’m curious as to whether this problem you are experiencing appears to be rather inconsistent/random amongst your files? This may well not be the issue your having, but something I have frequently ran into (and therefore thought worth mentioning), when dealing with loooong loading times and Mr. Maya is to do with a build up of ‘lightLinkers’ in your scene. It almost certainly seems to occur when dealing with referencing/importing and I’m sure someone far smarter than me can tell you why this happens (though I’m yet to work out why!)

You don’t need to travel very far from google to find the solution to clean up your scene (http://forums.cgsociety.org/archive/index.php/t-808968.html) but is always one of the first things I check for now when long loading times rears it’s ugly head and decides to infect a file!

Yes Light Linkers seem to replicate like a virus. We just had some code that cleaned them up after the scene had loaded. I imagine if you use a custom node for instancing you won’t run into this problem, since you are rebuilding that mesh instead of referencing it. Yea. Light Linkers, ew.::shiver::