Yeah, well the Knight Rider was a different car. This is my attempt at a Corvette from the 1980s.
Sometimes you need a specific angle like 90°. The most common technique is to open up the Channel Box and manually enter the value.
We will take a look at an alternative using the rotate tool (E). Simply press “J” while rotating to toggle “Discrete Rotation”. This feature will force the rotate tool to snap to specific angles.
You can adjust the default behavior in the Tool Settings (Window > Setting and Preferences > Tool Settings) of the Rotate Tool.
You cannot use the “Duplicate” or “Duplicate Special”-tool to duplicate along a curve. We are going to use an animation-tool to get a similar effect.
First create your object and the curve.
Before you duplicate your object, you need to decide how many objects you need. Then you can set the Animation Range from Frame 1 to Frame (2* the count of objects that you need.)
Select your object and the curve. Now use Constrain > Motion Paths > Attach to Motion Path. When you play the animation you will see that your object moves along the curve.
We need to change the keyframe tangents to linear to distribute the objects evenly over the entire curve. To do this select your object again and open the Graph Editor (Windows > Animation > Graph Editor). Then select both keys and select “Linear Tangents”.
To create all our objects, select the object and “Visualize > Animation Snapshot (options)” In the options you need to set End Frame to your Animation Range Last Frame and the Increment to 2.
Delete the original object and curve.
While this technique is a little cumbersome, it is very flexible and extensible. For example you could add a scale animation prior to creating the snapshot, or add deformers to modify your object prior to duplicating it.
Atom is a neat text-editor created by Github. Atom can be extended with plugins and somebody already created a useful “atom-maya” plugin that enables you to send your current code to Maya.
Simply download the installation files and follow the Installation instructions. During the installation of Python enable “Add Python.exe to Path”
Simply download the installation files and follow the Installation instructions.
- Then open Atom
- Open the settings panel File > Settings (Ctrl+Comma)
- Go to “Install Packages”, search and install “atom-maya”.
To be able to send Code from Atom to Maya you need to open a command Port. We are going to set up Maya that this Command Port will be opened each time Maya starts.
When Maya starts it looks for a file called “userSetup.py” in the folder “/Users/<user>/Library/Preferences/Autodesk/maya/<version>/scripts“. If it exists it will execute the file.
If the “userSetup.py” file does not exist – simply create a new file in Atom and save it as “userSetup.py” in the folder.
Then add following lines of code:
import maya.cmds as cmds
Now that everything is set up, lets test if everything works.
Open Maya and Atom.
In Atom create a new file “test.py” add following code:
import maya.cmds as cmds
Press “Ctrl+Alt+R” to send the code to Maya. If everything went ok, a polyCube was created.
“python” is not recognized as an internal or external command. : Run the python installer again and doublecheck if you set “add python.exe to path” (Or just add it manually to the windows system environment.
Script execution error. The plugin does not support python 3 : you can fix that by downloading python 2.
Lets take a quick look on how to punch holes in Poly Objects. It is possible to do this using the “Mesh > Booleans > Difference” Tool. However with that method you sometimes get strange results and usually have to clean up your geometry with the Multi-cut Tool. So instead of wasting time with Booleans, let’s just create the hole directly with the “Multi-cut”-Tool.
Use a Cylinder as Reference. Position it where you need your hole.
Switch to a view so that you can see your object and the cylinder and select the object and the Multi-Cut Tool (Quick access Ctrl-RMB Marking menu)
Start in a corner and simply place new vertex points around the cylinder (The points should match up with the cylinder). At this stage there is no need to be exact we’ll fix that later.
You will notice that the tool does not allow you to complete the circle. Simply end the tool at a sensible position on an existing edge. Press Enter to commit your new edges.
Again select the Multi-cut Tool. Add the missing edge of the circle and add additional edges to ensure that all faces have four edges.
Now we fix the positioning of the vertex points. Using the move tool and “Point snapping” (Press “v” while using the move tool). Only use the move arrow handlers to move the vertex in the same plane.
Alternatively move the cylinder that it matches up 100% identically with your object. Then you can directly snap to the cylinder.
Delete the Cylinder and add additional edges (Multi-Cut Tool) to ensure that you only have Quads.
Extrude your hole, or delete the faces whatever you need.