10 Maya quick tips

autodesk maya tips

In this post I will share a few more maya tips that can help you to work faster inside maya. Simple python scripts and some “not-so-obvious” maya options that will make your life easier.

#01 Maya test scene

test maya scene python

I don’t know how many times I created a simple sphere (maya’s teapot) and a plane to test an hdri, a simple workflow or scripts. This python code will create a simple test scene so you can do all your experiments after a button click.

def aiScene(*args):

	# create a sun&sky environment

	aiSkyNode = mtoa.utils.createLocator('aiSkyDomeLight', asLight=True)

	cmds.setAttr(aiSkyNode[0]+'.skyRadius',1)
	cmds.setAttr(aiSkyNode[0]+'.aiSamples',2)

	physicalSky = cmds.shadingNode("aiPhysicalSky", asTexture=True)
	cmds.connectAttr(physicalSky+'.outColor', aiSkyNode[0]+'.color',f=1)

	# test objects

	cmds.polyPlane(w=26,h=26,sx=1,sy=1)
	mySphere = cmds.polySphere(r=3)
	cmds.setAttr(mySphere[0]+'.translateY',3)
	cmds.select(clear=1)

#02 Maya intermediate objects

maya intermediate objecthover the image to see the animation

Maya saves most of the changes of your objects in history, connecting the nodes and in some cases like booleans and combining geometry, it hides the original objects and creates a new one. You can access those intermediate objects and change the settings. For example change the subdivions of a smooth operation in individual meshes after you combined a few objects, or even change the position of meshes in a boolean operation (hover the above image to see an example).

Use the hypergraph for example to see the connections, select the transform/shape nodes to change any settings. If you want to show the intermediate object(s): in the shape node, object display >> uncheck intermediate object, and in the transform node display >> check visibility.

#03 Ptex geometry metadata

ptexview mari iclude

When working with ptex, if you use mari, in the export settings you have the option to include gemetry ptex medatada, which will be usefull if you want to preview/debug your ptex inside a ptex viewer like renderman’s ptxview. In the above image you can see the difference between exclude and include options.

#04 Geometry from curves without illustrator

paths photoshop maya

You praobably know already that you can make shapes inside maya from illustrator files. If you don’t use illustrator and only have photoshop, you can use a normal image like png or jpg, select the pixels and in the paths tab click on make work path from selection. The path/curves won’t be perfect, but using the pen editing tools you can tweek it really easy. When the shape it’s ready just go to file >> export >> paths to illustrator. This will create an “.ai” file that you can import to maya. Then with a basic extrude and fill hole, you have your 3D shape. If you want to smooth the mesh just insert some edge loops in the corners and triangulate the faces where you used the fill hole command along with an extrude to offset the faces in.

#05 Outliner filters

maya outliner filtering

If you want to search/select materials/file nodes, the outliner is a good option, just unckeck dag objects only and you can view all nodes in your scene. The problem is that you see a lot of nodes that you may not even recognize, like settings nodes, etc. So here the filtering options are very usefull, in the image above you can see that i was looking for all the nodes starting with “ai”, using the “*” after the letters. You can also insert the star(*) before the letters. In the second case I was not sure how the material was named, only knew that has “metal” in between, so using the star(*) before and after the keyword will give me the exact match. Keep in mind that this is case sensitive. By default the outliner don’t show the set members when you create selection sets, to enable it use display >> Set members.

#06 Use maya presets

maya presets

Find yourself setting your initial render settings, color space, sampling everytime you create a scene? You can save a preset of those settings and just use presets >> load preset. You can also use preset for materials, texture filtering, etc. When you need to set your 0.4545 gamma in a gammaCorret node, save a preset and reuse it anytime you need instead of typing 0.4545 3 times.

#07 PreRenderMel and PostRenderMel

prerendermel postrendermel maya

Under the render options/callbacks of the render settings you will find 2 very usefull options. Pre Render mel and Post Render Mel enables you to run a command just before the render and other after the render is complete. One example that I can give is to hide the imagePlane when you render and unhide when the render is finish. If you don’t know the mel commands just look into the script editor result when you hide the imageplane for example and copy/paste in the render options.

#08 Maya tools constrain to axis

Use shift + mmb to constrain the tool to a specific axis while moving with the mouse/pen to the desired direction. You can use this with maya tools like the move and scale tool. To remove the constrain click in the middle square of the tool’s manipulator.

#09 Animated fog with 3D textures

maya animated fog

Connect a 3D texture like “Cloud” or “Volume noise” to your fog shader and keyframe the position of the “place3dTexture”, don’t make big moves, something subtle should do.

#10 Levels control with remapHSV

remap hsv maya

For quick specular/bump maps from your diffuse texture you can use the remapHSV node inside maya. Just connect the file node to the color of the remapHSV node, remove the saturation and use the value tab to ajust the black/white levels. This is a similar approach to the remapColor. You can also use this node to change the color of the diffuse texture in the hue tab.

Let me know if you find this usefull, subscribe and like our facebook page to get the latest updates.

  • Burçe

    Thank you very much. I am very happy to find your site. Lots of usefull information about Maya! Just one question; there is an arnold panel in most of the screenshots. I think it is custom made. Possible to share it? Thanks.

    • therenderblog

      Hey Burçe, thanks a lot for the feedback, glad you found usefull info here :)

      About the panel, it’s really simple stuff, where I access arnold settings without jumping between render settings tabs. Besides arnold stuff I have a lot of scripts to automate tasks but it’s based in my environment/file scrutctures/etc. I will try to make a version to share with arnold users in a near future. ;)

      • Burçe

        thank you very much