MtoA Arnold for Maya DOF Focus Assist Tool

Hey! I’m an old school CG artist from the days of CPU rendering and depth pass and zDefocus, and only recently got over the psychological barrier of doing in-camera DOF. My conclusion – it’s liberating. Of course, GPU render engines like RedShift is the real deal for this kind of workflow.

But for now, for those who want to give it shot at using Arnold for in-camera DOF, here’s a little script to quickly set up a focus assist locator which you can position as you wish. Just select the camera and run the script to get a focus assist locator. Hope it helps and let me know if you’ve some ideas to improve tool.

A simple tool to have viewport locator feedback for Arnold’s 3D depth of field. You can exactly direct the camera’s focal point in 3D space. It’s easier for me to see and animate this locator than to try animating “distance from camera” value. Hope you find this useful too. Cheers!

Ronald Fong MtoA Maya Arnold DOF Focus Assist Tool Demo 200px

//Author: Ronald Fong
//Date: 09 June 2018
//Usage: Just select your render camera and run the script. Enjoy!
global proc rf_aiDof() {
    string $cam[] = `ls -sl`;
    if (!objExists($cam[0])) {
        print "Ooops! Please select a camera! \n";
    else {
        string $camShape[] = `listRelatives -s $cam[0]`;
        float $camPos[] = `getAttr ($cam[0] + ".translate")`;
        string $locs = `distanceDimension -sp 1 1 1 -ep $camPos[0] $camPos[1] $camPos[2]`;
        connectAttr -f ($locs + ".distance") ($camShape[0] + ".aiFocusDistance");
        setAttr ($camShape[0] + ".aiEnableDOF") 1;
        setAttr ($camShape[0] + ".aiApertureSize") 1;
        setAttr ($camShape[0] + ".aiApertureBlades") 5;
        string $creation[] = `ls -sl`;
        string $camLoc[] = `listRelatives -parent $creation[0]`;
        parent `listRelatives -parent $creation[0]` $cam[0];
        parent $creation[1] $cam[0];
        select -cl;
        print "Success! Position the focus locator as you please! \n";

Quick colors in Maya Ramp

It’s very time-consuming to manually create many ramp entries in Maya’s ramp node, so I wrote a little script.
This simple function can be useful to create a procedural circular brushed metal texture where we want a hundred alternating colors.

//Author: Ronald Fong
//Date: 03 June 2018
global proc rf_zebraRamp(int $count) {
    $ramp = `ls -sl`;
    //Clear existing entries    
    int $entries = `getAttr -size ($ramp[0] + ".colorEntryList")`;
    for ($i=0; $i<$entries; $i++) {
        removeMultiInstance -break true ($ramp[0] + ".colorEntryList[" + $i + "]");
    //Set alternate colors
    $currCol = 0; //Initialize current color
    for ($i=1; $i<$count+1; $i++) {
        $div = 1.0 / $count;
        $currDiv = $div * $i;
        $prevCol = `getAttr ($ramp[0] + ".colorEntryList[" + ($i-1) + "].color")`;
        setAttr ($ramp[0] + ".colorEntryList[" + ($i-1) + "].color") -type double3 $prevCol[0] $prevCol[0] $prevCol[0]; //Flush previous color
        if ($prevCol[0] == 0) {
            $currCol = 1;
        else if ($prevCol[0] == 1) {
            $currCol = 0;
        //print ($div + " " + $i + " " + $prevCol[0] + "\n");
        setAttr ($ramp[0] + ".colorEntryList[" + $i + "].color") -type double3 $currCol $currCol $currCol;
        setAttr ($ramp[0] + ".colorEntryList[" + $i + "].position") $currDiv;

Houdini Alembic Import Problem

Houdini’s alembic import module, by default installation, doesn’t work well with alembic files on the network.
You’ll notice that you can only load .abc files on your local drive, and not those on the network drive.

This can be resolved by adding this line to the houdini.env files:


In case you’re wondering where your houdini.env file is, it’s usually located here:


Have fun!

Using Color Node’s Velocity with MASH Dynamics

The color node’s ‘Use Velocity’ is useful to create interesting effects. It works just fine with all other nodes with the MASH system, with the except the new Maya 2018’s MASH Dynamics node.

Solution (Part I):
The nice guy at Mainframe (North) explained that this was likely due to Dynamics ‘taking over’ the position data. The solver comes after the Waiter in the Node Editor so points are no longer where MASH thinks they are. Usually we can use the Node Editor to replug nodes between the Solver and the Repro/Instancer, but somehow the velocity information doesn’t flow through the network, and the development team is looking into it.

The Node graph at this point should then look like this:

For the full discussion, please find it in the comments section of this vimeo link

Solution (Part II):
Through some experimentation, I managed to find a workable solution. This is to replug the nodes as advised in Part I, and include an additional Signal Node before the Color Node. Somehow, this forces the velocity information to flow through to the Repromesh. So at the end of it, the Node graph should look something like this:

MASH Color Node Use Velocity Dynamics

And viola! It all works with these Fallen Candies!

Maya Wiggle Expression


Here’s a quick MEL wiggle expression for Maya’s transformation channels.
This is similar to After Effects’ wiggle() expression.

Step 1. Go to Channelbox > Edit > Expressions…

Step 2. Paste the following

$wiggleF = 3; //Wiggle Frequency
$wiggleA = 3; //Wiggle Amplitude
$wiggleV = 1.1; //Wiggle Per Axis Frequency Variant
translateX = noise(time*$wiggleF)*$wiggleA;
translateY = noise(time*$wiggleF*$wiggleV)*$wiggleA;
translateZ = noise(time*$wiggleF*(1/$wiggleV))*$wiggleA;

Step 3. Adjust Frequency, Amplitude and per axis frequency Variant to liking

Note: By default, the translate Y and Z frequency has a 1.1 (and ~0.9) multiplication to vary the animation on all 3 axes to avoid spatial linearisation.

How much to charge for animation: A Freelance Animator’s Guide

Heya fellow animators,

Money tips!

I’ve been getting many questions on how to charge for freelance animation work. While there’s no one answer (or figure) that fits all, as every animator’s skill and capacity is different, here are some general notes to help you get started.

1. Assess the scope
Before you come up with a figure, you’ll have to understand how much work you’ll be going through. Especially if you don’t work with a producer and doing the producing work yourself, certain costs get overlooked. On top of the actual creative work you may be handling a lot of producing work such as project management, coordination, client servicing, meetings, preparing quotations, invoices, vendor registration and the list goes on! These are some examples of work that are not entirely creative but work that comes with it. Producing takes up significant time and therefore should be taken into serious consideration.

2. Define your own scope
Instead of just saying “yes” to a very vague scope defined by clients at early stages of a negotiation, help both parties explaining how you see yourself contributing. If you’ve listened and understood your clients needs, you probably have ideas of how your skills can help your clients. Think this through. With that, communicate how you will be helping them in your own words, clearly, fairly comprehensively, and without jargon. Not only will your clients appreciete the thought put into solving their problem, you also won’t be saying “yes” to anything you weren’t comfortable with. This also allows you to respectfully deline a scope creep should there be a request from somebody not informed of the agreed scope.

3. Bottom Line Charge
Don’t charge an amount where you cannot even pay for your living expenses like your rent, utility bills, food and your tools of trade like softwares and computers. Make sure those costs are covered, if not you’d definitely be undercharging. With that covered, you can then add a little bit more for small (or big) profit.

Hope you’ve found these tips helpful and if you’ll like me to elaborate on any of these points, let me know!
It’s ronald [at] ronald-fong [dot] com

Happy Freelancing!

Guide to the Singapore Animation Industry

Hello animators,

Students who are currently enrolled into an animation programme, be it NTU’s ADM, Digipen’s animation or NYP’s DMD animation or a similar programme,  must have a clear picture on where they are heading with their career and what lies ahead of them. Be responsible; be aware of industry expectations. I have been through a fair bit of schooling in this field and I have heard countless hearsay horror stories, unfounded speculations, assumptions, and mentalities that can cripple the industry like a self-fulfilling prophecy. It’s inconsequential to be complaining about difficult times or spreading the negativity; instead, let’s take action!

I understand and acknowledge that there are many common problems artists/animators face around the world, but I’ll like to emphasise that these observations and advice are in reference to the animation industry in Singapore, and dedicated to the Singaporean animation students. Enough disclaimers, here are a few pointers to get you started with understanding the Singapore Animation Industry.

1. Animation industry serves two distinct industries!
Being able to provide animation services allow you to dwelve into two similar-on-the-surface but very separate industries, the Entertainment industry and the Advertising industry. Examples of animation work in the Entertainment industry are the likes of Pixar animated features films, Hollywood VFX-heavy blockbuster films, children’s animated television series, and broadcast media falls loosely into this category etc. Examples of animation work in the Advertising industry are the likes of 3D product renders for laptop or headphone commercials, 3D product end shots for television commercials, and 3D animated demos of internal workings of medication, milk formulas… you get the idea. Both these industries require the very same skill sets to create attractive and nice-looking moving visuals. The market and job market for these two industries are also distinctly different. Students need to be aware of, and understand the differences in order to know how to train and position themselves.

2. Point 1 directly influences how you prepare yourself
Animation is a mega-godzilla-large discipline that involves storytelling, acting, design etc. and to the other end of the spectrum where you’re tweaking light samples to optimise your 3D renders. It’s extremely difficult to be an expert at everything, but you definitely can be an expert at a few of the sub-disciplines, especially closely-related skills.

As of the time of writing, there’s a huge demand for 3D generalists for the Advertising scene because products and their features need to look great in order to sell them. So that’s great news for animators going into the realm of 3D production work. In the realm of the entertainment scene, there needs to be strong push in IP creation and hence very strong pre-production skills like concept design and storyboard is in demand. That said, there are significantly less job openings on the pre-production side simply because it takes more people to work in production. Also note that some studios understandably outsource the production work to be cost-effective, and there also studios who strive to keep production in-house.

Of course, this is severely over-simplifying the economics of the business, but the point is to encourage students to get used to reaching out to the people who currently work in the relevant industry to find out if the industry’s demand aligns with what their interests. On this note, don’t just speak to one person (also don’t just believe everything I say here), speak to as many as you can, from as many different companies as you can to avoid overly-biased perspectives and misjudgements.

3. Awareness
This is not exactly a third point but a summary. I think the awareness of the industry a student wishes to get in to is very crucial for student animators. I’ve observed many pitfalls. For instance, I’ve seen many students who wish to work as a 2D hand-drawn animator in Singapore but the truth is that the job openings for 2D animation production in Singapore is close to non-existent. However, it’s not impossible to work as a 2D hand-drawn animator, we just have to be aware that 2D hand-drawn production has more presence in some places in Europe, and of course Japan. Students just need to be aware whether their interests aligns to the market’s demands to properly plan their education.

Hope this was helpful for some students. Of course, please share this information with your peers, stay motivated as a community, become professional and confident at your craft. Until then, keep animating, keep dreaming! Again, this is a post is based on my personal observation and experience in this industry. So, there may be things that you may not agree with based on your experience and I will love to learn from your experiences too. Feel free to drop me a message!

Photoshop Hipster Palette

Hey, I’ve got a bunch of requests for the “hipster” color palette in use to start my digital doodles in Photoshop. So, here you go – Hipster Swatches

Photoshop Hipster Swatches

Tips on File Versioning and Date Naming Conventions

Here are some notes on file versioning and date naming conventions for 3D animation production:
I recommend using the following “_###” versioning system:


Frame padding

It depends on the project you’re on, but most project files won’t have a 1000th version so 3 frame padding is very very safe for almost all purposes in animation, while 2 frame padding doesn’t allow for the occasional 100th version.

The letter “v”

Some pipelines use “v” to denote version number, and I think it’s not a bad idea. In a pipeline where it’s understood that “_###” already denotes versioning, it comes across as an additional letter without providing more information.

Using the “.”

Please avoid using the “.” for file versioning because some softwares may confuse that with a file extension! That said, Maya’s imagePlane sequence only accepts “.” for image sequence number.

For Maya image sequence




Date naming convention

Most file browsers default to sort by name. It quite confusing to date files with DDMMYY because 301216 will numerically be after 011217 when it should actually be chronologically before:


Thus I recommend YYMMDD where it will make both numerical and chronological sense:


Why use YY over YYYY?

In fact, it is clearer to see 2016 as compared to just 16. As long as the entire pipeline understands the date convention, we can essentially save on the redundant “20”, since most of the projects we work on don’t run past a century.

That’s all for now! :)

Tips on Naming Conventions in Maya

Why should we name our stuff in Maya?

— Makes selection easy:
For me, this is the biggest reason. 3D scenes are filled with characters, props, environments, their rigs, textures and we need to work with them. Scripts can be written to automate a lot of the repetitive work in 3D work and often times it heavily involves with selecting nodes and then running functions. It’s way simpler for these scripts to be written if there’s a naming convention within the pipeline.

— Clarity:
Often times we’ll have to spend a lot of time trying to hunt for stuff from the viewport or the outliner in a poorly organised scene. Wasted time! Even more time is wasted when we make simple mistakes just because the names are confusing.

A little effort in naming our stuff as we go will ease the lives of people down the pipeline. The TDs will certainly thank you for that.

Enough of the why.

Here’s my recommended naming convention for use within a Maya pipeline. I use it myself and I’ve seen many studios adopt a similar naming convention.

— Type of Object:
The last three letters (only 3 for scripting purposes) in caps to denote the object type. This allows for ease of selection. Some examples:
ball_GEO for Geometry
ball_NUL for Null Locators
ball_JNT for Joints
ball_CON for Controllers
ball_MAT for Materials

Tip: Using Maya’s “Select by Name” field, we can type “*_GEO” and it’ll select all the objects we’ve tagged with “_GEO”

— Underscore:
Use underscores only for separate types of information. For instance, if it’s the left elbow joint, it’ll be “nose_JNT”.

— Camel Casing:
If it takes two words to describe an object like the joint of “Red Ball”, do not use “red_ball_JNT”, instead use camel case to contract these two words into one entity resulting in “noseBridge_JNT”

Bad: red_ball_JNT
Bad: RedBall_JNT
Bad: RED_Ball_JNT

Good: redBall_JNT

If done correctly, it greatly improves the readibility.



— Left/Right indication
lf_ or rt_ as a prefix
Example: lf_arm_JNT

Why not just “l” and “r”?
l and r is slightly less visible compared to lf and rt

— Upper/Lower indication
There’s more left/right mirroring in characters than top down mirroring. So upper/lower indication doesn’t justify the use of an underscore to separate the information.

So, instead of “lf_upper_Lid_JNT”, use “lf_upLid_JNT”

It’s natural to use “upper” in speech but depending on preference, we may contract it to “up” as in “lf_upLid_JNT”. This way, it can be really neat:


— Corresponding root names
We should also make an effort to standardise the root names of our objects and it’s “relatives”