Multi Channel Setup MEL

Not only Mudbox 2009 can generate displacement and normal maps, but also it has the ability to paint other channels  such ads color, special, reflection etc.While working with models that has multiple UV tile and you will end up with a huge collection of textures, that needed to be connected in Maya.
I created this MEL with the help of few friends (names are in the MEL :) ) to connect all these channels automatically with the click of few button.

multi_chan_setup.jpg

Note: Tiff files that are created in Mudbox 2009, have a LZW compression. This compression is not supported by mental ray .
Solution:  use open EXR or convert these TIFF to another TIFF without compression using Photoshop (CS3 and up)Maya: make sure to turn ON: use Maya old style alpha detection found under the render section of the preference window

alpha_style.jpg

Currently Mudbox doesn’t export Ambient occlusion or Alpha maps , however there is an easy work around for both
A- Use either “CrazyBump” or “Filter Forge” to convert the displacement map into a an AO map
B- While painting in Mudbox use black and while image to be used as the alpha map.

Note: Mudbox SP1 can export AO maps

How the MEL works
Select a surface and run the script.
Choose a file from the exported/saved images generated from Mudbox 2009.
The MEL will recognize the files based on their naming convention
Each file will be placed in the appropriate UV tile based on their name.
Once you hit create, a shading network will be assigned to your selected object.

ash_multi.zip

ash_multi_mac.zip

Here is an updated vr of the MEL to match the new 2011 dark look ;)
Mutli Channel Setup 2011

ash_multi_2011.zip


Recent Entries

19 Responses to “Multi Channel Setup MEL”

  1. doug_at_buck Says:

    can u still do the multi uv tiles in the new mudbox? does it just work?
    I don’t see anyplace to choose tiles when you create a map.

  2. Ashraf Says:

    Yes, Mudbox 2009 will output all the UV tiles for you automatically
    It will name the files according to their UV location
    For example
    Disp_U1_V1.tga
    Disp_U1_V-1.tga

  3. Using both Normal and Bump map in one Shader – Tutorial Says:

    [...] this short tutorial, I’ll explain part of my Multi-Channel Setup MEL script, on how to add both normal maps and bump maps together in one [...]

  4. Andre Branco Says:

    Hi, what’s the best way in maya to use only one shader for a whole character. Keeping in mind that in mudbox I have different layers for different body parts.

    Thanks.

  5. Ashraf Says:

    in Mudbox, you need to make all the diffuse layers into ONE diffuse and ONE bump and so on.
    then with this MEL it will bring all these into ONE shader

  6. cedric Says:

    Good day everyone…..

    i have a multiple objects in my maya scene and when i try to apply the multi channel setup with my maps onto another object,the previous applied object assumes the materials i have with the current object im working on..

    ex: i have a flower pot that has been textured with maps via multi channel setup…then i move on to my cat model within the scene and apply my texture maps again via multi channel..but as soon as i hit create,the texture material of my flower pot assumes the new material and its multi channel links in hypershade gone….

    i hope there is sumthing i can do about this….thank you.

  7. Ashraf Says:

    Hi Cedric,
    Does the textures have the same name , for example the flower diff maps called color.tga, same as the pot diff maps also called color.tga ?

  8. cedric Says:

    …woops,kinda..i have this pair of horns and i only used deformers in maya to differ their look to avoid mirror imaging..and everything else with regards to material maps have the same filename(horn_dispMap.exr)…i thot it wont be a problem since conventionaly,in maya, it wasnt a big deal…

    you think it might be the problem?

    thanks for your time ash.

  9. Ashraf Says:

    just rename the files to be horn_right_dis.exr for example so the application knows exactly what to use
    hope this helps

  10. sanro Says:

    hello,
    how can i put the script into a shelf as mel ?

    I tried with drag the script from the editor but i seam to not work …

    thanks for great plugin

  11. Ashraf Says:

    If you open the MEL in a notepad , it has the instructions.
    To answer your question, just type Ash_multi(); in the script editor.
    Drag that line and place it in the shelf.

  12. Padro Says:

    cool picxxs

  13. Peter Sharp Says:

    Thank you for what looks like a good tool, you should add to the documentation for implementation for mac based file structures. The path is actually quite different and goes as such
    Macintosh HD/Users/Shared/Autodesk/maya/xxxx/icons
    Macintosh HD/Users/Shared/Autodesk/maya/xxxx/scripts

    This will help people like me not need to go through an hour of trial and error trying to figure out where these directories are. Thanks.,
    Peter

  14. woo hoo Says:

    thank you so much!!!

  15. Sina Says:

    Hi Ashraf

    Thanks for your great script,
    It would be great if you add another tab for Vector Displacement since the normal displacement setup doesn`t work for VD in 2012.
    I ended up creating the chain with the normal displacement setup and then using the file texture nodes and connecting them all to a layered texture and then used the result to connect to the displacement shader node,(which I am not sure if that is the best way!)

    Thanks again

    Sina

  16. Eric Says:

    Howdy,

    Using on Mac 64 bit Maya 2012. Tried this on both the original and the Mac script you posted. If I click the folder icon next to First Image Maya crashes. If I paste in the file path to the first image in my sourceimages folder (relative path) it finds the first displacement map but fails to to see the others created by Mudbox. tried this on two completely different models. My displacement maps as created by Mudbox are labeled: testCube_u1_v1.exr, testCube_u2_v1.exr, testCube_u3_v1.exr, testCube_u4_v1.exr, etc

    Thanks

  17. Eric Says:

    hey, quick follow up. After a bit of testing I have figured out that its a Maya 2012 mac issue. Maya 2011 on mac works just fine, displacement maps load properly, renders great, awesome beautiful.

    FYI after noodling in Maya 2012 I found that something about the +-Average node and the RGB>Luminance node crashes maya when rendering in the preview window. Its not my Mudbox maps because when I use a single map plugged into a blinn SG it renders fine but when I use the set up your script creates it crashes. Again, just 2012, not 2011. So something changed between these versions that may affect how your script works. Thanks for the script BTW, it really is quite awesome.

  18. MrFarrar Says:

    Hello,
    Eric – I am having the same problem. Script works a charm and sets all the shader network up perfectly, but maya (mac 2012) crashes every time I try to render.
    Anyone have any suggestions/workarounds/fixes etc? Script or not, this does seem to be the only method I can find to make multi-displacement maps work in Maya!!
    Mike

  19. chard Says:

    Thanks!!!

Leave a Reply