Alembic export and import with shaders


#1

Hello! Maybe it will be useful for you. My script which exports and imports alembic cache. But it is not just import. It restores alembic with shaders, which were on object. It supports shaders assigned to faces too.

You can try it. Just run it and print command (python): alembic_cache_tool()

How to use: just select your objects which you want to export. And push export button. Script creates folder in your project path with cache and tmp shaders files. When you want restore this objects, just push load button and select directory whith object (root dir with export scene name).

Example: you have scene apple.mb. When you push create alembic cache it creates folder “alembic_cache” on this path: maya_project_path/alembic_cache and then you will get this tree: maya_project_path/alembic_cache/apple -> .abc
/apple -> shaders/shaders.mb

to restore you must select “apple” folder.

I hope it will work fine :curious: .


#2

Yes it worked! thank you for your help :slight_smile:


#3

I was just about to script something like this by myself, but luckily I found this thread and your script works perfectly fine.
Thank you for this, mate!


#4

Hi, thanks, very useful! I could import fine but shaders don’t load…?¿


#5

very useful,many thanks


#6

Sorry I’m probably being thick here (Monday morning!) but I can’t get this to work, when I try to import the file I get an error ‘In AbcImport::doIt(), doesn’t exist’.

All I get imported to the scene is an empty group called ‘Alembic_data_group’.

If I navigate to the folder and import the Abc cache manually I can see that the geometry was cached out, so it seems to be reloading is the issue.

I notice the folder name for the cache is ‘test.ma’ if that’s relevant. I’m testing the script in Maya 2016 on Windows.


#7

I have updated the script, it stopped working due to changes in later versions of Maya. Now everything should work.


#8

Hey thanks, that’s working now in Maya 2016, very cool.

I notice I get some errors with per-face assigned materials, you can see the before-after here in a file I’m testing, the model here has a bunch of history on it rigging-wise and it’s UVs are a mess so possibly that’s a factor. I’ll try with some other characters and see if the same thing happens with those.

Thanks though, already I can see this being very useful!

Cheers,
Brian


#9

Tried another file with per-face assignments and got a similar issue (this one has clean UVs).

I didn’t post the ‘before’ this time but his entire fist should be yellow.

Again… I’m not complaining, just posting this in case it helps improve the script!

I tried it with a character that had regular UV textures and it worked perfectly.


#10

Anyone tried this script in Maya 2017 ?


#11

HI,

Anyone tried this script in Maya 2017 ?


#12

The export works fine 2017 but the load doesn’t work. It just pulls up a file browser prompt that asks you to save. If you could please make this work in 2017 you’d be my hero! Cheers!!


#13

me too I tried in 17 but couldn’t reach the shaders in in the folder. I just get the abc file with Lambert.


#14

me too I tried in 17 but couldn’t reach the shaders in in the folder. I just get the abc file with Lambert.


#15

It works a treat in 2017…You just have to select the folder and then hit the button ( it says save but should say load ) - it’s clear enough if you scroll up and read his instructions.

This script is a godsend for me…thanks!


#16

Lovely. CGS changed forum layout and with that it probably swallowed thread attachments :slight_smile: Does anyone has a copy of that script? Thanks in advance!


#17

Where is the scripts?