Quixel Bridge Fix for Maya/Arnold (4.8)

The latest version of the Maya plug-in is 4.8.
This is my modified importer script for that version:
MS_Importer.py

How to use:

  • Update Quixel Bridge to the latest version
  • Update the Maya plug-in
  • Replace the the script in the lug-in folder
    (the path is something like this: …Megascans\Library\support\plugins\maya\4.8\MSLiveLink)

Fixes:

  • Added a missing Displacement shader node (without that there is no displacement)
  • Unnecessary node removed from the roughness branch (use nodes if you need them)
  • Modified attributes on the imported file nodes (alpha is luminance on, alpha offset: -0.5 for the displacement)
  • Set attributes for the added Displacement node (displacement padding: 10 cm (you have to change that to get correct results if the actual displaced distance is more that 10 cm), displacement zero value: 0 [because we already set that with the alpha offset], displacement scale: 10)
  • Modified attributes on the imported geometries (removed duplicated attributes: there is no point to modify the same values in two different places)
  • Set shader Base Color weight to 1 (the default 0.8 is way too dark for the already usually too dark albedo textures).

Why those modifications:

The missing Displacement shader is obvious.
The others are simple to explain as well.
The adaptive Displacement preview feature is rally useful in Maya (to check contacts with characters, more precice layout etc.). Also you always want to add clear and easy to use controls.
The best way to modify Displacement intensity (scale) and offset is when you can see the result immediately.
All the modifications are targeted to that goal.

This way you can change the displacement offset via the alpha offset int the file node, you can change the intensity (scale) on the Displacement shader node while you can see correct preview in the viewport.
Displacement preview: select an object, press ALT+3
Turn off: press 1

Important tips:

Always download the Displacement textures with the JPEG+EXR mode.
If not, the script can’t find the the EXR file (I have no fix for that, sorry).

For objects (not ground or big surfaces) usually it’s better to use decimated hires geometry than a displaced one.

If you using this method in most cases you have to modify the downloaded EXRs. The original files usually using the Red channel only, and the Green and Blue channels are black (which is perfectly fine for UE4 but in Maya and with this method is not correct).
How to fix it:

  • open the texture (choose Alpha channel data As Transparency)
  • copy/paste the R channel to the layers
  • flatten the image
  • save the file
  • click Reload in Maya (file node)

Unfortunately in Maya there is no easy way to offset a color value into negative (to get correct preview). So that’s why I chose this method (this way you can see what you do). The original script is not wrong (except the missing displacement shader), but it’s not very artist friendly.

One more thing: If you sending the High Poly geometry to Maya, don’t forget to turn off the subdivisions in on the shape (mesh) node at the Arnold section.

Cheers, D

Clarisse iFX Cryptomatte in NUKE

Cryptomatte: A few steps to make it work. Really easy.

  1. Add the Cryptomatte Sub Pixel Filter to your render layer: Select the layer (Layer Editor) -> at the bottom in the Attribute Editor you can find the Sub Pixel Filters section. Add -> Cryptomatte
  2. Open the Cryptomatte filter (Click on the small arrow), and set the type to AOVs and Manifest
    This way the Cryptomatte data will be stored as AOVs.
  3. Done. 🙂 Render the Image via the Render Manager
  4. Use as usual in NUKE with the help of the Cryptomatte node.

You can use the Cryptomatte plug-in in the non-commercial Nuke as well (it’s ideal for learning):

  1. Download the Cryptomatte plug-in.
  2. Unpack it
  3. Open Nuke’s plug-in init.py file (for exmple: Program Files\Nuke12.0v2\plugins\init.py)
  4. Paste this line at the end of the python script:
    nuke.pluginAddPath(‘D:/Downloads/Cryptomatte-master/nuke’)
    Change the path of course, make sure you using / instead of \
  5. Save the init.py file, restart Nuke.

Duplicate Selected Object Command in Clarisse

Clarisse iFX is a really good tool indeed.
But a Duplicate command is a “must have” in any software (I don’t want to use the copy and than paste commands, that’s one more click than it should be). 🙂

I just put those two into one command, but I think this will be helpful anyone who just started to learn Clarisse. That’s it.

Here is how to install it:

  • Download the script
  • Put the script inside the Program Files\Isotropix\Clarisse iFX 4.0 <version>\Clarisse\python\menus\main_menu\edit folder.
  • Edit the _populate.py script (it’s inside the same folder) and paste this line after the last Edit category (begins with menu.add_command(“Edit>Instantiate”) line:
menu.add_command("Edit>Duplicate", "./duplicate.py", "shift+alt+d", "Duplicate selected Node or Object")
  • Save
  • Start Clarisse iFX
  • You’ll see a nice new menu item inside the Edit menu.

Of course you can change the shortcut.

Cheers, D

Intersection Detector with Paint Effects in Maya

Paint Effects is still one of the best tool in Maya. A friend of my colleague suggested this really nice method to visualize geometry intersections (intersection between objects and self intersection as well).

I just put together a simple script for doing this a little bit easier: pfxIntersectionDetector
It’s not Houdini, but it can be really useful if you modeling objects for simulation in Maya.

How to use it:

  • Select an object or objects
  • Run the script
  • There is a Line With and the a Self Intersection attribute on the generated pfxToon transform node for easier adjustments.

note: This could be very slow if you using it on high resolution objects and you have a lot of intersection.

Separate objects based on selections in Maya

Hi everyone,
Maya is usually pretty slow when you try to do something with a lot of components.
I wrote a simple MEL script (yeah I know it’s old) to separate objects based on the selected polygons.
My goal was to get the result(s) fast, with the correct name, maintain the hierarchy, the script should work on multiple objects at the same time and check the selection against the total number of polygons for each object.

Maybe it’s not elegant, but it will do the job and it’s pretty fast. (Actually this is the fastest separation script I found/tested so far.)

How to use it:

  • Select the polygon faces (It works on multiple objects as well)
  • Run the script
// Separate objects based on Face Selection
// Created by Denes Dankhazi
// Environment artist at Digic Pictures
{
// Get the objects name based on the face selections
string $selObj[] = `ls -hl`;

for ($item in $selObj)
{
    // Select object
    select $item;
    // Get the number of all polygons in that object
    int $numFce[] = `polyEvaluate -f`;
    // Change the selection mode
    changeSelectMode -component;
    // Get the number of the selected polygons in that object
    int $numFs[] = `polyEvaluate -fc`;
    
    // Testing the number of polygons. All vs Selected
    if ($numFce[0] != $numFs[0]) 
    {
        select $item;
        // Duplicate the object with and modify the name. Fortunately Maya keeps the selection when an object is duplicated. :)
        duplicate -n ($item + "_separated");
        changeSelectMode -component;
        InvertSelection;
        delete;
        select $item;
        changeSelectMode -component;
        delete;
        changeSelectMode -object;
    }
    else {print ("It's unnecessary to separate this object: \n" + $item + ".\nAll faces was selected.\n");}
}
changeSelectMode -object;
}

Cheers, D

Unfortunately this method is not always work (sometimes Maya doesn’t keep the selection at the duplication process.) I will modify the script soon to compensate this.

Quick Fixes for Quixel Bridge to Maya Shader Generator Script for Arnold (update)

If you tried to use the Quixel Bridge to Maya export feature you probably recognized it’s not working correctly (a missing Displacement shader, a strange aiRange node to modulate the roughness – which is not doing anything by default, and a few other things).

A quick fix for those issues:

  • Close Maya
  • Download the modified version and replace the MS_Importer.py script (the path is something like this: ~\Megascans\Library\support\plugins\maya\4.0\MSLiveLink\)
  • Start Maya, start the listener, use the Exporter in Bridge.

Now you’ll get correct displacement and shader connections.
I changed a few additional things (update).
Some displacement texture intensity is not necessarily in the correct value range and the middle value (the “non displacing” value) can be incorrect as well. You might have to change the displacement scale (displacement shader) and the alpha offset (file node) values to get correct results.

For example (check the displacement scale and alpha offset values):

Sometimes the displacement texture is not “Maya friendly”, always check the exr files in an image editor.

Also I did not fixed the unnecessary file node generation problem (so you’ll get “Gloss” and Specular map file nodes as well, if you download those as well.) You can easily fix that if you just delete the redundant file types at line 60 and 61 in the MS_Importer.py script.

Cheers, D