Alembic cache and name space?

708 views
Skip to first unread message

Panupat Chongstitwattana

unread,
Jan 16, 2014, 1:15:43 AM1/16/14
to python_in...@googlegroups.com
I'm trying to merge alembic cache into my Maya scene... it only seems to work if the destination model's name matches everything of the source even the namespace.... Can't quite make use of it in a project with millions of references.

For example alembic cache exported from namespace:character_rig_geo will not merge with namespace1:character_rig_geo.

Is there any work around for this?

Thank you.

Marcus Ottosson

unread,
Jan 16, 2014, 5:02:30 AM1/16/14
to python_in...@googlegroups.com
Millions of references?!


--
You received this message because you are subscribed to the Google Groups "Python Programming for Autodesk Maya" group.
To unsubscribe from this group and stop receiving emails from it, send an email to python_inside_m...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/python_inside_maya/c8260532-9399-4c4a-b246-d68d178a3855%40googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.



--
Marcus Ottosson
konstr...@gmail.com

Justin Israel

unread,
Jan 16, 2014, 5:04:54 AM1/16/14
to python_in...@googlegroups.com
It was a typo. He meant billions. 


Ævar Guðmundsson

unread,
Jan 16, 2014, 6:40:27 AM1/16/14
to python_in...@googlegroups.com
Billions you say....!
  I'm all ears, surely there are workarounds but the right one will depend on what on earth you are doing with billions of references.
a)
  Some would say you should never ever use more than one reference, the trick is usually within the multiplication itself, as in what works one 3 refs will work on 300 refs. if what you are doing is scalable from the ground up.
b)
  This gets trickier when you start treating billions though and you will need to parse this pretty efficiently in order not to wait a lifetime for results,  the big win there will presumably end up being something as simple as the difference between range and xrange, or even your choice in reader.
c)
  Will need a workflow example in order to provide a more practical answer but if it helps make sure to treat each as one and disregard sloppyness and marginal overlooked things which don't matter when you only treat a few, cheapest thing in the book would be creating a bunch of dummy locators as placeholders while you import this so the clash never occurs then script a controlled merge based on the result, but that's no good if you are iterating over more than a few hundred... 

  To quote Tim Peters;
>>> import this
The Zen of Python, by Tim Peters
[...]
Namespaces are one honking great idea -- let's do more of those!
>>> 

Asi Sudai

unread,
Jan 16, 2014, 5:25:01 PM1/16/14
to python_in...@googlegroups.com
As you found out abcImport won't load your cache when the hierarchy naming isn't a match.
There are a few workarounds, none that I can think will work out of the box. so you'll need to script around it.

Like Aevar pointed out, more info on what you're trying to achieve would help. just a wild guess... are you trying to load the same cache into many different references?
something like crowd-animation ( birds flying but each bird have a slight different transformation )

Panupat Chongstitwattana

unread,
Jan 17, 2014, 7:02:52 PM1/17/14
to python_in...@googlegroups.com
@Asi, Aevar.

It's mainly for crowd animation. I wanted to see if I can reference multiple instances of the same model, give them different materials and then apply alembic cache to them. Geo cache works but I'm curious if alembic can be used this way.

Best regard.

Asi Sudai

unread,
Jan 18, 2014, 4:13:24 PM1/18/14
to python_in...@googlegroups.com
I had a feeling you're looking to do something like crowd or birds-flock animation :)

If you can use particles to instance the crowd, that would work pretty good.

By anyway, Instead of loading the abc cache to each and every asset ( which will be slow if not deadly to your scene interactivity )
Try a different approach:
1. bring in ONE time the cache, let's call this asset "master_cache"
2. then distribute the cache to all the other assets by connecting the shapes nodes (outMesh to inMesh) or do a simple duplicate-instance.
I believe duplicate-instance would be more efficient, but in your case you might need to use references... I don't know.  
 
hope this helps, good luck!

aevar.gu...@gmail.com

unread,
Jan 18, 2014, 6:14:34 PM1/18/14
to python_in...@googlegroups.com
  Asi is very correct, a duplicate instance is your friend here.
Reply all
Reply to author
Forward
0 new messages