Export from Maya to Mari by Xuan Prada

Yes, I know that Mari 3.x supports OpenSubdiv, but I've had some bad experiences already where Mari creates artefacts on the meshes.
So for now, I will be using the traditional way of exporting subdivided meshes from Maya to Mari. These are the settings that I usually use to avoid distortions, stretching and other common issues.

Combining Zbrush and Mari displacement maps by Xuan Prada

Short and sweet (hopefully).
It seems to be quite a normal topic these days. Mari and Zbrush are commonly used by texture artists. Combining displacement maps in look-dev is a must.

I'll be using Maya and Arnold for this demo but any 3D software and renderer is welcome to use the same workflow.

  • Using Zbrush displacements is no brainer. Just export them as 32 bit .exr and that's it. Set your render subdivisions in Arnold and leave the default settings for displacement. Zero value is always 0 and height should be 1 to match your Zbrush sculpt.
  • These are the maps that I'm using. First the Zbrush map and below the Mari map.
  • No displacement at all in this render. This is just the base geometry.
  • In this render I'm only using the Zbrush displacement.
  • In order to combine Zbrush displacement maps and Mari displacement maps you need to normalise the ranges. If you use the same range your Mari displacement would be huge compared with the Zbrush one.
  • Using a multiply node is so easy to control the strength of the Mari displacement. Connect the map to the input1 and play with the values in the input2.
  • To mix both displacement maps you can use an average node. Connect the Zbrush map to the input0 and the Mari map (multiply node) to the input1.
  • The average node can't be connected straight o the displacement node. Use ramp node with the average node connected to it's color and then connect the ramp to the displacement default input.
  • In this render I'm combining both, Zbrush map and Mari map.
  • In this other example I'm about to combine two displacements using a mask. I'll be using a Zbrush displacement as general displacement, and then I'm going to use a mask painted in Mari to reveal another displacement painted in Mari as well.
  • As mask I'm going to use the same symbol that I used before as displacement 2.
  • And as new displacement I'm going to use a procedural map painted in Mari.
  • The first thing to do is exactly the same operation that we did before. Control the strength of the Mari's displacement using a multiply node.
  • Then use another multiply node with the Mari's map (multiply) connected to it's input1 and the mask connected to it's input2. This will reveal the Mari's displacement only in the white areas of the mask.
  • And the rest is exactly the same as we did before. Connect the Zbrush displacement to the input0 of the average node and the Mari's displacement (multiply) to the input1 of the average node. Then the average node to the ramp's color and the ramp to the displacement default input.
  • This is the final render.

Colour Spaces in Mari by Xuan Prada

Mari is the standard tool these days for texturing in VFX facilities. There are so many reasons for it but one of the most important reasons is that Mari is probably the only texturing dedicated software that can handles colour spaces. In a film environment this is a very important feature because working without having control over colour profiles is pretty much like working blind.
That's why Mari and Nuke are the standard tools for texturing. We also include Zbrush as standard tool for texture artist but only for displacement maps stuff where color managment doesn't play a key role.

Right now colour management in Mari is not complete, at least is not as good as Nuke's, where you can control colour spaces for input and output sources. But Mari offers a basic colour management tools really useful for film environments. We have Mari Colour Profiles and OpenColorIO (OCIO).

As texture artists we usually work with Float Linear and 8-bit Gamma sources.

  • I've loaded two different images in Mari. One of them is a Linear .exr and the other one is a Gamma2.2  .tif
  • With the colour management set to none, we can check both images to see the differences between them
  • We'll get same results in Nuke. Consistency is extremely important in a film pipeline.
  • The first way to manage color spaces in Mari is via LUT's. Go to the color space section and choose the LUT of your project, usually provided by the cinematographer. Then change the Display Device and select your calibrated monitor. Change the Input Color Space to Linear or sRGB depending on your source material. Finally change the View Transform to your desired output like Gamma 2.2, Film, etc.
  • The second method and recommended for colour management in Mari is using OCIO files. We can load these kind of files in Mari in the Color Manager window. These files are usually provided by the cinematographer or production company in general. Then just change the Display Device to your calibrated monitor, the Input Color Space to your source material and finally the View Transform to your desired output.

Texture bleeding in Mari by Xuan Prada

Sometimes Mari seems to have small issues with the texture bleeding.
I just realized that sometimes the bleeding doesn't happen at all. If you find yourself with this problem, the best solution is probably to force Mari to do the texture bleeding.
Only 2 steps are needed.

  • Click on "Toggles on/off whole patch project.
  • Now select the patch or patches, right click on top and select "Bleed patch edges".
  • This should be enough to fix pretty much all the texture bleeding issues inside Mari.

Import layer masks in Mari 2 by Xuan Prada

Lets say that importing masks in to Mari 2 created in other software, is something very common and all the texture artist out there do every single day.

I’m talking about painted masks in Photoshop or Nuke, or baked masks in Maya, Softimage or just cavities, occlusions and other important maps generated in Zbrush or Mudbox.

Using all these programs and more is something pretty normal in any VFX boutique nowdays.

When I started working with the first alpha version of Mari 2 I found a bit tricky the way to import maps generated in others software packages in to Mari as layer masks.

The way to paint layer masks in Mari seems to be pretty straightforward but as I said if you want to import a texture as layer mask you need to follow some steps.

I’m pretty sure that if you are a new Mari 2 user you can’t find how to do this before spend some time struggling your mind to figure out how to do this simple thing.

I spent probably more than 30 minutes to find this out and just realize that a lot of texture artist are having the same problems to find a way to do it.

So, follow these steps to import layer masks in to Mari and save your precious time :)

And of course, if you have another fastest way to do it, I’ll be glad to hear it.

  • Import you mask as new layer.
  • Add a reveal layer mask to the layer that you want to mask with your imported map.
  • Make a mask group.
  • Double click on the mask group icon to open the masks window.
  • Drag your imported mask layer to the list.
  • Remove the previous mask created by default.
  • Yo can invert the mask if needed.
  • Done, your imported mask is working perfectly.

Mari 2 Maya script by Xuan Prada

I was lucky enough to find this simple but effective script to import your Mari textures in to Maya in a really quick way.
It is a Python script created by Kushal Goenka.

Follow these instructions to install the script.

# Mari2Maya – PyMEL Script
# Written by Kushal Goenka ( Animation Maniac )

# Description:
# This Script Automates the Process of Setting up given MARI Texture Patches
# into one Single Layered Texture in Maya.

# Setup:
# Copy Script to ‘\maya\2012-x64\scripts’ folder. ’2012-x64′ might by different.
# Source the Script. ( Script Editor > File > Source Script… )
# Call the Python Command: ‘Mari2Maya()’ (or add to Shelf)

# Requirements:
# Export textures from MARI with ‘$UDIM.extension’ at the end.
# For Example: $ENTITY_$CHANNEL_$UDIM.tif >> Castle07_color_1003.tif

# Instructions:
# 1. Drag Texture Files into Hypershade.
# 2. Drag Select all Imported Texture File Nodes in the Hypershade Work Area.
# 3. Run the Script. via ‘Mari2Maya()’ Let the Magic happen.


Mari to Maya by Xuan Prada

Yes I know, make your Mari textures work inside Maya could be a bit weird specially if you never worked before with multi UV spaces.

I hope to give you some clues with this quick and dirty step by step tutorial.

I’m using the blacksmith guy from The Foundry who has 40 textures with 4k resolution each.

  • First of all check your model and UVs.
  • Export all your textures from Mari. You know, right click on the desired channel and export.
  • Now you can type the naming convention that you want to use. I like to use COMPONENT_UDIM.tif COL_1001.tif for example.
  • Check your output folder. All your textures should have been exported.
  • Import your model in Maya and check the UV mapping. You need to understand how the UV shells are called inside Maya to offsetting your texture maps.
  • The default UV space is 0-0 the next one on the right will be 0-1 the next one 1-1 and so on.
  • Open the first texture map called COL_1001.tif in the hypershade and rename the image node to COL_1001 and the 2D placement node to UDIM_1001.
  • Do the same with all the textures.
  • Select all the texture nodes and open the attribute spread sheet.
  • Set the default color RGB to 0.
  • Select all the 2D place texture nodes and open again the attribute spread sheet.
  • Switch off wrapU and wrapV.
  • Type the properly offsets in the translate frameU and translate frameV.
  • Create a layered texture node.
  • Select all the texture images nodes and click and drag with MMB from an empty space of the hypershade to the layered texture node attributes tab. This will create one layer with each texture map.
  • Delete the default layer.
  • Set the blending mode of all the layers to lightnen.
  • Connect the layered texture to the input color of one shader of your election.
  • Repeat the whole process with all your channels. (SPEC, BUMP, DISP, etc)

Mari to Softimage by Xuan Prada

Recently I was involved in a master class about texturing and shading for animation movies, and as promised I’m posting here the technical way to set-up different UV sets inside Softimage.
Super simple process and really efficent methodology.

  • I’m using this simple asset.
  • These are the UVs of the asset. I’m using different UV sets to increase the quality. In this particular asset you can find four 4k textures for each channel. Color, Specular and Bump.
  • You probably realized that I’m using my own background image in the texture editor. I think that this one is more clear for UV mapping than the default one. If you want you can download the image, convert it to .pic and replace the original one located on C:\Program Files\Autodesk\Softimage 2012\Application\rsrc
  • This is the render tree set-up. Four 4k textures for color, specular and bump. Each four textures are mixed by mix8color node.
  • Once everything is connected, you still need to offset each image node to match the UV ranges.
  • I know that the UV coordinates in Softimage are a bit weird, so find below a nice cart which will be so helpfull for further tasks.
  • Keep in mind that you should turn off wrap U and wrap V for each texture in the UV editor.
  • Really quick render set-up for testing purposes.

Selection groups in Mari by Xuan Prada

When you are working with huge assets is very useful to keep everything organized.
One of the best ways to do it inside Mary is using selection groups.

  • Go to view -> palettes -> selection groups.
  • Select faces, elements or objects.
  • Click on plus icon to create a new selection groups based on your current selection.
  • You can create different selection models based on different parts of your asset.
  • Now you can be focused on just one specific area of your asset.

Save as in Mari by Xuan Prada

If you are getting crazy trying to find the save as button in Mari, don’t worry, it's not there.
The best way to save as in Mari is using snapshots tool.
Is not exactly the same as save as option, but is something quite similar.

  • In this example I have a version of the robot with some flat colors as texture maps.
  • Open the snapshot window, under view -> palettes -> snapshots.
  • Create a new snapshot and name it as you want. For example v001
  • Keep working on your textures, channels, shaders, etc.
  • When you want to save as indeed going to file -> saves as (traditional way) go to your snapshots window and create a new snapshot.
  • If you want to switch between versions just select the thumbnail and click on revert.

UDIMs workflow, Maya to Mari by Xuan Prada

Sometimes is very useful to work with different range of UV’s, specially when you are working with a huge assets and a high detail is needed.
Find below my workflow dealing with this kind of stuff.

  • Unfold the UV’s in different ranges.
  • If you need to bake procedurals, dirtmaps or whatever, keep in mind to change the UV range in the baking options.
  • I always use the same naming convention.
  • UxxVxx.tiff
  • 0101.tif
  • 2301.tif
  • Create a new project in Mari.
  • Check if the UV’s are placed correctly.
  • Create a new channel called “base” and import your baked textures into it.
  • Ready to keep working.

Introduction to channels in Mari by Xuan Prada

  • Create a new proyect in Mari.
  • Create a new channel called “base”.
  • Adjust size, color space and color.
  • Right click on “base channel” to import a texture bitmap as base color.
  • We already have our cube with the blue base color.
  • Create a new shader called “blueCube” and choose as texture the “base channel” created before.
  • Create a new channel called “underPaint”.
  • Adjust size, color space and color.
  • Right click on the “underPaint” channel to import a nice under paint texture map.
  • You can see it in the viewport.
  • Create another channel called “underPaintMask”.
  • Adjust size, color space and color.
  • Import the under paint mask texture into the “under paint channel.”

Looks awesome in the viewport.

  • Select the “blueCube shader” and add a “new shader module”.
  • Select “masked diffuse” from the list.
  • As base texture select “underPaint channel”.
  • As mask texture select “underPaintMask channel”.
  • Invert the mask.
  • Add more layers in very simple, just need to add more channels.
  • Create a new channel called “rust”.
  • Adjust the size, color space and color.
  • Import a rust map into the channel.
  • Check it in the viewport.
  • Add a new channel called “rustMask”.
  • Adjust size, color space and color.
  • Go back to shaders tab and select “bluCube shader”.
  • Add a new shader module and select “masked diffuse” from the list.
  • Select the “rust channel” as “base texture” and “rustMask channel” as “mask texture”.
  • Invert the mask.
  • Select the “rustMask channel” and paint with black color to create rust in desired areas.