A couple of fun maya tips

By - - Maya
Duration
2 mins
Last modification: 16 Sep, 2017

I thought I'd share a couple of my favorite Maya tips. 1. You can tumble ortho views. This is especially useful for technical illustration. Just toggle off "Orthographic Views:locked" in the tumble tool settings. 2. One can directly type expressions inside numeric edit cells in the attribute editor. Just click inside any numeric field and type "=". This puts the cell into expression mode. Whatever you type after the "=" is then turned into an expression node when you hit return. Expressions can use the keywords "time" and "frame". Thus if one typed = time into the ytranslate edit cell for an object, the object will now move uniformly upward where its height is equal to the current time in seconds. To make it go half as fast simply type: =time * .5 To make it jump in a totally random fashion type: =random(1.0) To make it wiggle up and down in a random yet smooth fashion you can use the noise function. Type: = noise( time ) To make it wiggle up and down in a uniform fashion type: = sin( time ) To make it lock to the y position of a second object called "sphere2" type: = sphere2.ty At any point you can rightmouse over the attribute name to open the expression editor for easy editing.

Posted By
Published In
Tags
  • Maya
11 Comments
To post a comment please login or register
| 8 years ago
I'm not aware of an automated method to select objects near a locator currently, so I think you would need to write a mel script. There might be something on creativeCrash to do this. One method would be to check the distance between the locator position and object center inside an expression. If you make these positions vector variables and subtract them then take the magnitude of the result you get the separation distance. Here is a simple expression that does this. string $objs[] = `ls -type mesh`; vector $l = `getAttr locator1.worldPosition[0]`; float $selectDist = 1.0; for( $obj in $objs ){ vector $v = `getAttr ($obj +".center")`; if( mag($l-$v) < $selectDist ){ select $obj; } } When you playback any meshes within the selectionDist value will become selected. Use select -r if you want other objects to become unselected.
Edited by XfBIG9DY 8 years ago
| 8 years ago
hi duncan how can i select objects in the scene, through a animated locator position
| 8 years ago
I`m sorry i just want to ask a stupid question(for me maybe it will be opposite).i`m a college student in china with common questions,but where can i get more informations about those basic expressions?I became so confused when seeing theses scripts,but be excited by these amazing Special effects?Could you introduce some basic ideas for me?I just don not know how to begin with it.Very pleased to share with your tips!Thank you!
| 8 years ago
Thank you!- let me have a go with those settings.
| 8 years ago
The default gravity on hair (.98)is correct if units are interpreted as meters. (note that the actual units setting has no effect on dynamics) Thus if you are treating units as cm make the gravity 98.0. Also initially make the mass 1 and the drag zero. One can think of the drag as the mass of the air. If it is high, then it is like the hair is underwater. You may also need to increase the iterations on the hair to avoid stretching when using real world gravity settings. One may need to lower stiffness to compensate for increasing the iterations. For the boat on ocean, if you did "make boat" then look at the extra attributes on the locator that the boat is parented to. As well there are notes on that node. Lowering the objectHeight attribute might help you( this is initially set based on the bounding box of your boat object... it might be wrong if your boat has a tall mast). Depending on the scale one can set things like gravity( the speed of the ocean waves should also be set to correctly match the scale ). WaterDamping will cause the boat to more exactly follow the wave. Also the pivot center is important... for a boat with a mast you may wish to translate it upwards relative to the locator, so that the center of the locator transform is the center of the boat hull.
| 8 years ago
Hi Duncan, can you also perhaps share how to affect the hair solver scale? I can find nothing about it on the web or in the documentation- currently, my female character's hair looks great, but moves slowly as though underwater. Any help is appreciated. Fiddling with mass and gravity seems to make little difference. Also, if I have a ship constrained to an ocean with really large waves, I find it difficult to have the ship travel up and down the giant waves smoothly. It often dips under or floats above the wave surface, rather than cruises along it. This then makes adding a wake effect using 2d/3d fluids impossible. Any advice is appreciated, Adam
| 8 years ago
Hi Duncan, can you also perhaps share how to affect the hair solver scale? I can find nothing about it on the web or in the documentation- currently, my female character's hair looks great, but moves slowly as though underwater. Any help is appreciated. Fiddling with mass and gravity seems to make little difference. Also, if I have a ship constrained to an ocean with really large waves, I find it difficult to have the ship travel up and down the giant waves smoothly. It often dips under or floats above the wave surface, rather than cruises along it. This then makes adding a wake effect using 2d/3d fluids impossible. Any advice is appreciated, Adam
| 8 years ago
"I read this but not sure what does it mean"its a trick where you are just parenting the mesh shape under the transform, rather than combining them" " One can parent shapes to transforms, not just transforms to transforms. Parenting a shape requires using the "-shape" option on the parent command. You can't do it through the menu or by dragging( as far as I know). If you parent multiple shapes to the same transform you can't transform the shapes relative to each other without moving their vertices. Also many operations on such meshes will only function on the first shape, and not all the shapes under the transform. Mesh->separate separates poly objects into their parts already, so I'm not sure what you are trying to do.
| 8 years ago
Hello Duncan, I hope you could help me to figure out with another Maya tip. I want to create an script which separates one polyObject into its parts. but when I'm doing my tests. I'm using the combine tool, but after I combine the parts I lost the objectShape, and I just keep the transforms. Its another way to combine multiple parts without using the combing tool or boolean?. I read this but not sure what does it mean"its a trick where you are just parenting the mesh shape under the transform, rather than combining them" Hope this makes sense too you. Thank you in advance.
| 11 years ago
Handy indeed. I've been working on a solar system that is made almost entirely out of expressions written on particle shapes. I am having trouble coming up with the function that would make the moon orbit earth while it is orbiting the sun. If earth's orbit = <<sin(time),0,cos(time)>> kind of thing. How would I go about completing this?
| 12 years ago
Nice tips!! Save a lot of time no need to open the Expression Editor. I also use the Ctrl key and mouse buttons to easily change the value of a field in the Attribute Editor. However, those tips are useless for the channel box. Thanks Duncan!
*Save $66 per month on Autodesk's Suggested Retail Price (SRP) when purchasing 1 year term 3ds Max or Maya subscription.