How to render “Object ID” in Maya and use it in After Effects?

Max users know, there is a very useful “.rpf” file format in 3d Studio Max.

In compositing programs like After Effects, It gives you a control of objects in scene with one file.

Maya doesn’t support for “Object ID” and rpf as Max does, so how can we get same result in Maya?

There are 3-4 tricky ways for that in Maya, but we will learn the best and easiest way like always; “Label ID technique”.

(By the way, the places of commands and menus could be changed in older versions of Maya, but there are, please search it around)

I am going to show an example, you can apply same for your scene.

Firstly, create a new empty scene in Maya,

Create a sphere, a cube and a cylinder as image below,

Select Cube;

In the attribute panel, select [Attributes > Add Attributes…]

Enter “miLabel” as Long name and select [Integer] as Data Type

Repeat this adding attribute steps for sphere and cylinder

When you finished, select cube, in the attribute editor, you will see [Extra Attributes] under “pCube1” tab

There must be a [Ml Label]  under [Extra Attributes]

for cube, enter “1”

for sphere, enter “2”

for cylinder, enter “3”

In the viewport menu, select “Select Camera”

Select perspShape tab, find [mental ray], under [Output Shaders] select [Create]

Select [Label (integer) 1×32 Bit] from “Frame Buffer Type” menu

Check File Mode, enter your destination and filename to “File Name Postfix” box, ( for example c:\fxfx.iff )

Now select render settings, choose [Mental Ray] as render engine, and in quality tab, select [Production] as “Quality Presets”

Render!

Using render in compositing programs like After Effects;

Import your render file (fxfx.iff) to After Effects,

Create a compositing, drag your render .iff file to layer panel, you will see a 3 colored image.

Now, for example you want to control settings of Cube, select the layer, apply “Color Key”, select the yellow color of cylinder, and apply “Color Key” again (or duplicate effect), select green of sphere.

And apply “Color Key” again to remove black around scene.

Now you have only red cube and you can control it as you want.

That’s all folks,

Keep in Fx,

Caner ATAS

About Caneration

Check Also

Free 4K Studio Backgrounds!

A great bonus pack for Fxfx NET users! You can use this 10 studio backgrounds to look your text, logos, objects great!

3 comments

  1. Many Thanks, was very helpfull

  2. its not working in the end its not giving colorid image

  3. I almost never create remarks, but i did some searching and wound up
    here How to render "Object ID" in Maya and use it in After Effects?

    – Fxfx.net ::: Digital Art Tips & Tricks. And I actually do have 2 questions for you if you usually do not mind.
    Is it simply me or does it appear like a few of the responses look as if they
    are coming from brain dead people? 😛 And, if you are writing on additional social sites, I would like to
    follow everything fresh you have to post. Could you list of the complete urls of all your public pages like your linkedin profile, Facebook page
    or twitter feed?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.