Tuesday 16 June 2009

Exporting materials?

Does anyone know if it's possible to export/import materials from the hypershade?

I have an old scene file that i'd like to use for some materials I made in a previous project. The way i've usually gone about this is to import the entire scene into my current project (which adds all the materials to the hypershade)

Problem with importing scenes into your current work project is that bad things can happen and things can get messy and confusing.

I was wondering is there a way of exporting materials only form the hypershade? There is actually a import/export shading network option under the 'File' menu of the hypershade but I haven't been able to get it work. If you select a material and hit export shading network it asks to save that out as a regular mb file, but then importing that file does nothing. As a test I created a simple blin, exported it, deleted the blin, imported the file...no blin appears.

So is there a way around this?

cheers

4 comments:

  1. Hi Mate. I just gave it a quick go and it seems to work.

    Just open the maya file with the material you want to save and give that material a name, open the hypershade and highlight that shader network. From there go to file export shader network and save as .mb

    Open the new scene in which you want to import that material, open the hypershade and go file > import and find the saved material and bring it in.

    Ive done it a couple of times and it seems to work that way.

    Let me know if it works.

    Ryan

    ReplyDelete
  2. Shit, I figured it out. LOL...

    What you need to do is first select the material you want and hit the 'graph selected materials' button from the tool bar to show all connections.

    Then with it graphed, go file (again from hypershade toolbar) and choose 'export shading network'. Choose mb (ma probably work too) as export format. obj is no good for this.

    Then just a matter of file>import, select the shadingnetwork.mb file and job done the material should appear in the hypershade.

    ReplyDelete
  3. Yeah, you right Ryan (I was writing previous post and doing something else for a while so missed your post)

    I think where I was going wrong is I had .obj as default on the export which doesn't seem to work.

    ReplyDelete
  4. Cool as long as its working now!

    Ive used it a couple of times to export and import materials from one project to another. Very handy.

    Ryan

    ReplyDelete