Create a Pile of Stuff

This technique is a very quick and dirty approach to creating a pile of stuff. The downside using this technique is due to the fact that particles are generally round and usually stuff is not round, causing segments of your geometry to intersect with other objects.

Step 1

Set up a nParticle emitter: In the FX Menu select nParticles >  Create Emitter

Step 2

Adjust the following Attributes of  the emitter1:

  • TranslateY = 9
  • Rate (Particles / Sec) = 20

2016-07-27 10_32_22-

Step 3

Configure the nParticle (“nParticleShape1”) Shape –

  • Self Collide = true
  • Stickiness = 1.02016-07-27 10_34_42-

Step 4

Aactivate the ground plane in “nucleus1”. This will create an invisible plane to collide with the particles.

  • UsePlane = true

2016-07-27 11_07_54-Autodesk Maya 2017_ untitled_   ---   emitter1

Alternatively you could create a poly plane as ground plane to be used as a particle collider.

Step 5

Set the Playback Range to 1-500 and view how the Particles are piling up.

You can switch the Particle Render Type to Spheres to get a better idea of how the Pile will look like.2016-07-27 11_11_30-Autodesk Maya 2017_ untitled_   ---   nParticle1

Adjust the particle & emitter settings to fit your needs.

Step 6

I created a couple of basic objects, that I will use instead of the Particles.

Select the particles and all the objects you want to use as geometry replacement. nParticles > Instancer 2016-07-27 18_49_34-Autodesk Maya 2017_ untitled_

Now all the Particles should look like the first object in you selected. (in my case cubes)

Step 7

Select the Particles again go to Add Dynamic Attributes and click the General Button.

In the Add Attribute dialog enter for the Long name = objIndex PP, enable Per particle(array) and click Ok2016-07-27 19_02_59-

Step 8

Back in the ParticlesShape Node open “Per Particle (Array) Attributes” RMB on “Obj Index PP” > Creation Expression

2016-07-27 19_08_01-

In the Dialog add following Expression:

In essence this means that for each particle a random number between 0 and 3 is going to be choosen.

Step 9

Back in the Attribute Editor go to Instancer(Geometry Replacement) > General Options > Object Index select ObjIndex PP2016-07-27 19_15_07-Autodesk Maya 2017_ untitled_   ---   nParticle1

Restart the playback to refresh all particles.

(optional) Step 10

Now all the objects are looking kind of stacked up and look identical. To make it visually more interesting you can activate “Rotation“.

2016-07-27 19_25_54-Autodesk Maya 2017_ untitled_   ---   nParticle1

Go to Instancer(Geometry Replacement) > Rotation Options > Rotation and select rotationPP

2016-07-27 19_27_06-Autodesk Maya 2017_ untitled_   ---   nParticle1

Step 11

You can modify and place your initial geometry on its own layer and hide that. (Especially if your objects appear to big, you could scale them down etc.)

Quick Tip: Polygon Display Face Centers

By default you select faces in Maya with the whole face. I recommend changing this setting to “Center”. It makes it easier to select faces  in the orthographic views and makes faces without area visible.

To change the setting go to  Window > Setting & Preferences > Preferences, on the left choose “Selection”  and choose “Select Faces with: Center“.

2016-06-10 22_13_02-Autodesk Maya 2016 Extension 2_ untitled

 

 

 

2016-06-10 22_14_39-Autodesk Maya 2016 Extension 2_ untitled_
Polycube with Zero Geometry Area Faces

 

2016-06-10 22_25_27-Autodesk Maya 2016 Extension 2_ untitled_
Select the Top Face of a Poly Cube in the side view
Using the Brigde Tool

The Bridge-Tool creates a bridge between edges or faces. To use the tool you need to select on both sides the same number of edges or faces.

By default you get something like this:

Two cubes combined into a single object
Two cubes combined into a single object
Linear Blend the default settings
Linear Blend the default settings

You can change the default Curve Type Settings to Blend and you will get something like this:

2016-03-25-20_44_29-Autodesk-Maya-2016_-untitled_-pCube3.e2_3...

In the Blend mode you do not have any of control how the blend will occur. You need to create a Bridge with the options set to “Smooth path + curve”.

2016-03-25-20_57_31-Bridge-Options

Initially the bridge will look identical to the “Curve Type: Blend” or “Bridge type: Smooth path”. You need to switch to “Wireframe”-Mode then you can select and adjust the control curve.

2016-03-25-20_56_39-Autodesk-Maya-2016_-untitled_-curve1.cv0_5

Rotate Tool: Snap to Angles

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.

2016-05-21 01_19_12-Autodesk Maya 2016 Extension 2_ untitled_.png

Quick Tip: Duplicate Object Along Curves

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.

Step 1

First create your object and the curve.2016-05-06 20_15_26-Autodesk Maya 2016 Extension 2_ untitled_   ---   pCube1.png

Step 2

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.)

Step 3

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.

Step 4

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”.

2016-05-06 20_29_23-Graph Editor.png

Step 5

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.

Step 6

Delete the original object and curve.

2016-05-06 20_38_03-Autodesk Maya 2016 Extension 2_ untitled_   ---   bezier1....png

End Result

2016-05-06 20_38_42-Autodesk Maya 2016 Extension 2_ untitled_   ---   transform1_2...

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.

 

Quick Tip: Round Holes and Extrudes in Poly Objects

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.

STEP 1

Use a Cylinder as Reference. Position it where you need your hole.

2016-03-25-09_34_53-Autodesk-Maya-2016_-untitled_-pCylinder2

STEP 2

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)

2016-03-25-09_35_21-Marking-Menu

STEP 3

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.

2016-03-25-09_35_55-Autodesk-Maya-2016_-untitled_

STEP 4

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.

2016-03-25-09_36_35-Autodesk-Maya-2016_-untitled_

STEP 5

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.

2016-03-25-09_37_38-Autodesk-Maya-2016_-untitled_-pPlane2.vtx12

STEP 6

Delete the Cylinder and add additional edges (Multi-Cut Tool) to ensure that you only have Quads.

2016-03-25-09_38_19-Autodesk-Maya-2016_-untitled_

STEP 7

Extrude your hole, or delete the faces whatever you need.

2016-03-25-09_41_11-Autodesk-Maya-2016_-untitled_