Tag Archive for: Tricks

Maya HDRI Studio for Redshift

A video documentation on how to use the tool.

10 cool tricks in Maya

In this video, I explain some of the time-saving tricks in Maya that I kind very useful for my CGI work. There’s a lot in there that I think can save you some time too. On top of this list, there’s a fairly hard-to-explain MMB trick in the Maya timeline when animating, and that shall be the next video tutorial I’m going to tackle. Meanwhile, enjoy this list and I’ve also detailed them as a image-text tutorial below!

  1. Duplicate with Transform
  2. MMB Main Menu for Last Used Submenu
  3. Quick Expressions in attribute editor
  4. Multiple Attribute Edtors
  5. MMB Drag in Viewport for translation
  6. Repeat last command
  7. Content browser + Remesh + Retopo
  8. Varying speeds in Channelbox + Attribute Editor
  9. Right click on <>
  10. Noob code – Drag MEL to shelf

01 Duplicate with Transform

Quickly create cool shapes with this technique. Also useful for quickly populating a scene.
Select object, press Shift+D, do some transformations (rotate, move, scale), Spam Shift+D.

How does it work? When you press Shift+D, it starts “recording” the transformations you make from your original object, then next time and subsequent times you press Shift+D, it applies those transformations it temporarily stored!

02 MMB Main Menu for Last Used Submenu

Quickly access the last used submenu by MMB click on the main menu item.
Very useful when you like to work without clutter of floating menus, but want quick access.

I personally use this all the time for my Graph Editor. Also, I think it’s high time for the Graph Editor to be shipped with a hotkey by default. Alt+G will be nice!

03 Quick Expressions in Attribute Editor

In valid fields in the expression, type “=” followed by the expression you want. For instance, we can oscillate a rotation of an object by typing “=sin(frame)” in one of the rotation axis channels.

04 Multiple Attribute Editors

Have as many attribute editors as you need by pressing the ‘Copy Tab’ button.
The copied floating ones aren’t context-sensitive, so it’s particularly useful for drag-n-drop UI

05 MMB Drag in Viewport for Translation

This is a little bit of a “Kung Fu”. Select your object, switch to your translation tool (W), hold down Shift, and MMB drag anywhere in the viewport in the general direction of where you want your object to move. It’ll work like magic!

06 Repeat Last Command (G)

As long as it’s a function/command in Maya, you can keep pressing “G” to repeat the last command. Useful for repetitive modelling operations like ring splits and bevels, or anything repetitive actually, look out for repetitive tasks and this will come in handy.

07 Content Browser + Remesh + Retopo

Use the base mesh in the content browser to prototype or block out models. They can quite easily be utilized for cartoony models (where details are selective) and Maya 2022 makes auto topologizing easy with the new remesh and retopo algorithms! Very decent results I must say!

08 Varying Speeds in Channelbox / Attribute Editor

We often want to get minute control when adjusting values of each attribute. In the channelbox, simply hold down Ctrl, Nothing, Shift, for slow, medium and fast respectively. In the Attribute Editor, hold down Ctrl, and scrub in the input field with your LMB, MMB, RMB for slow, medium and fast respectively. Remember, “Hold Ctrl for Control!”

09 Right Click on <>

When you’ve a bunch of modelling or deformation history on your geometry, you’d have many tabs on your Attribute Editor. The material attributes are usually placed at the end of this stack and instead of fast-clicking the “>” button to reach the end, you can simply right click on those buttons and choose the node you’re looking for!

10 Noob Code

Maya records everything you do in the Script Editor. Simply copy and paste the relevant commands into the MEL input editor, select the code block and press Ctrl+Enter to test the code. If it works, you can drag this bunch of code onto your custom shelf button. Masterful!

Iridescent Glass Material in Redshift

Developed this iridescent glass shader in Maya / Redshift based on IG @odddough ‘s request at work.

  1. Start with the Redshift “Glass” present.
  2. Create a RS Fresnel and remap its values into rainbow hues.
  3. Optionally, if you’ve used MASH Color to have varying colorSet values for each part of your geometry like this toy gun example, you can add a Redshift Color Correction to this resulting information, remap colorSet to 0 to 360 and use it to drive the hue variance of the Color Correction node.
  4. Feed the resulting information into the refraction color of the Glass Material
  5. Increase the Dispersion Abbe number to 1 or 30 to taste, it creates iridescent refraction
  6. Enjoy the results!
An example of what this material can achieve.
The lighting setup for this example render. Some volumetric atmosphere and a couple cylindrical mesh lights with volume contribution
Iridescent Glass Material Shading Network
Screenshot of my screen as I was working on this material. While the render at the start of this post has some simple compositing, from this screen shot, we can tell that it looks pretty good right off the bat, without any comp work.

Create File Cache and File nodes in Houdini

Here’s a tool to add filecache and file nodes to your selected node in SOPs geometry context. At Masonry Studios, we base our Houdini geometry caches and its version on the file name (which contains the version number) and the node name, which is the default in Houdini’s file cache node.

However avoid using the file cache’s “Load from Disk” option to load the geometry back in, because:

  1. It’s convenient for the file cache node’s “Geometry Path” to stay as the default un-evaluated relative path, in order to generate new caches based on the current file version
  2. If we load in the geometry based on this relative path, and we version up our working file, this relative path will fail.
  3. Hence, we find it quite an elegant solution to use a file cache and a file node separately. The file node points to the absolute evaluated “Geometry Path” of the file cache node and we’ve since successfully avoided the issue of broken links to caches.
# Author: Ronald Fong
# Date: 29 Sep 2021
# Usage: Add this as a shelf tool. With a SOP node selected, use this tool to quickly create a filecache and a cache node.
# Feature 1: Names the cache nodes based on your selected node
# Feature 2: File node will automatically be the evaluated absolute path of your filecache node
selected_node = hou.selectedNodes()
geo_node = selected_node[0].parent()
name = str(selected_node[0])
filecache_node = geo_node.createNode("filecache", ("filecache_" + name))
file_node = geo_node.createNode("file", ("file_" + name))
file_node.setInput(0, filecache_node)
filecache_node.setInput(0, selected_node[0])
geo_node.layoutChildren()
filecache_node.setDisplayFlag(1)
filecache_node.setRenderFlag(1)
filecache_node.setSelected(1)
filename = filecache_node.parm("file").eval()
file_node.parm("file").set(filename)

RBD Packed and Vellum Interaction

Vellum and RBD both have the newer packaged workflows, and while it’s nifty on their own, I haven’t found a way to set up such that they can mutually affect each other properly in a single simulation.

Usually, we’d set this up in a custom dopnet using the multi-solver, but because of the way the packaged node’s geometry and constraints are group together, there’s no straightforward set up setting this up.

So here’s a quick and dirty (but efficient) way to fake the interaction between RBD packed simulation and a Vellum simulation.

The Result

The idea is to first mimic the movement we’d want of the interaction using just the RBD bullet solver. We feed that output to serve as a collisions geometry for another temporary Vellum solve, feed this temporary Vellum output back to a new RBD bullet solver for the final RBD simulation, and once again feed it back to a new Vellum solve for the final vellum interaction.

This multi-phase simulation approach yields decently convincing results. While it’s not technically accurate, it’s artist-friendly to utilise the packaged simulation nodes.

Node Tree

This screenshot of the node tree shows how Vellum and RBD packaged SOP level nodes feed into each other to arrive at the illusion of interaction.

Obj Sequence to Maya

A quick and dirty way to load an .obj sequence in Maya and have each geometry’s visibility automatically keyed to show up at the frame they are supposed to show up. Wrote this script as an experiment, but don’t have time to make a UI, so I just commented on the two variables to change accordingly to your setup. Cheers!

Update [10 Feb 2020]: Made sure the import command explicitly points to the specified folder directory (Thanks Cody for pointing out that the script didn’t work for you!)

global proc rf_objSeqImport() {
string $folder = "C:/objImport/"; //Change the folder directory to the folder containing your .obj sequence
string $mesh = "Mesh"; //Change the word 'Mesh' to the name of the geometry that would be imported
string $objFiles[] = `getFileList -folder $folder -filespec "*.obj"`;
int $i = 0;
while ((size($objFiles[$i])) > 0){
    print ("Importing " + $objFiles[$i] + "... \n");
    file -import -type "OBJ"  -ignoreVersion -ra true -mergeNamespacesOnClash false -namespace ("objImport" + $i) -options "mo=1"  -pr  -importTimeRange "combine" ($folder + $objFiles[$i]);
    currentTime ($i+1) ; //visible on frame
    setAttr ("objImport" + $i + ":" + $mesh + ".visibility") 1;
    setKeyframe ("objImport" + $i + ":" + $mesh + ".v");
    
    currentTime $i ; //invisible before frame
    setAttr ("objImport" + $i + ":" + $mesh + ".visibility") 0;
    setKeyframe ("objImport" + $i + ":" + $mesh + ".v");
    
    currentTime ($i+2) ; //invisible after frame
    setAttr ("objImport" + $i + ":" + $mesh + ".visibility") 0; 
    setKeyframe ("objImport" + $i + ":" + $mesh + ".v");
    $i++;
};
}
rf_objSeqImport();

Tag Archive for: Tricks