FORUMS

# 3ds Max - MCG Clone Modifier - Part 2

By
-
-
Industry
• Design Visualization
Subject
• 2016
• MCG
Products
• 3ds Max
Skill Level
• Intermediate
Duration
10 min

# 3ds Max - MCG Clone Modifier - Part 2

#### This is a 3ds Max multi-part series introducing Max Creation Graph (MCG). In this tutorial, you continue developing your Clone Modifier by adding Rotation and Scale flexibility to the Position data you introduced in Part 1.

Notes
• Recorded in: 3ds Max 2016
• The interface in this tutorial applies to MCG 2017. The interface in MCG 2018 has been revised to a new node naming scheme.

Transcript

`00:00:06 --> 00:00:13In this movie, you continue building your Clone modifier by adding rotation and scale offsets to the graph.00:00:14 --> 00:00:21If you haven't done so already, you need to follow the procedures highlighted in Part 1 of this series before you proceed.00:00:22 --> 00:00:28In that movie, you learned to design a graph that outputs a modifier designed to clone a selected object.00:00:28 --> 00:00:35For now, the modifier has inputs for a number of duplicates and position offsets in all three axes.00:00:36 --> 00:00:43In this movie, you continue building on your modifier by adding Rotation and Scale offsets as well.00:00:45 --> 00:00:50First make some room in your graph by moving or collapsing operators you don't need to work on.00:00:51 --> 00:01:01To move an operator and all its children, use Ctrl+Alt on the parent operator. This is similar to the Slate Material Editor.00:01:03 --> 00:01:09Take a look at the Clone and Transform compound; it has a single Transform Matrix input.00:01:09 --> 00:01:19Right now, this input is fed only by a Translation (or Position) operator. You need to add Rotation and Scale to the mix.00:01:19 --> 00:01:29In order to do that, add a Multiply operator to the graph. Browse for it in the Search Box, which can be activated with the X key.00:01:29 --> 00:01:34The Multiply operator enables you to combine two inputs into one output.00:01:34 --> 00:01:42In this case the two inputs would be Position and Rotation data that are fed into one common Transform Matrix.00:01:43 --> 00:01:47You can certainly reroute the feed manually,00:01:53 --> 00:01:59but it's easier to insert a "loose" operator by holding Ctrl and dragging it into a connection.00:02:00 --> 00:02:05Use the x input, although in this case you can use either x or y and obtain the same results.00:02:06 --> 00:02:10You now need a rotation matrix to feed into the y input.00:02:10 --> 00:02:16Go ahead and drag out the y input and type "matrix" to see the options.00:02:16 --> 00:02:22Choose MatrixFromYawPitchRoll and feed its value output to the y input.00:02:23 --> 00:02:28Yaw, Pitch and Roll refer to the three axes of rotation on a given object. 00:02:29 --> 00:02:34The term comes from aircraft lingo and flight dynamics.00:02:36 --> 00:02:43Now add Parameters: Single operators to each of these input entries using the appropriate names.00:02:43 --> 00:02:52A quick way of achieving this is to make sure the right operator is selected, right-clicking it and choosing "Generate Parameters".00:02:53 --> 00:03:00This generates three Parameters: Single operators connected to each of the three inputs and sharing their names.00:03:01 --> 00:03:12Adjust the min and max values to range from -100.0 to 100.0. You can use other values based on the limits you need.00:03:17 --> 00:03:21Save the clone tool and re-evaluate it.00:03:24 --> 00:03:31Test out the new entries; you'll notice two things: First, working the spinners seems to be too sensitive.00:03:31 --> 00:03:38Second, the Yaw, Pitch and Roll directions may not conform to the directions you had in mind.00:03:38 --> 00:03:44In this case, changing the pitch value gives in fact a Roll effect.00:03:44 --> 00:03:52We'll come back to that in a moment; first, you need to make the spinners less sensitive by turning degree values into radians.00:03:53 --> 00:03:59In the graph editor, press X and look for words beginning with "tora".00:04:00 --> 00:04:05You'll find only one operator named ToRadians. Go ahead and select it.00:04:06 --> 00:04:11Using Shift+Move, duplicate that operator two more times.00:04:12 --> 00:04:21Now select any one of the three and holding Ctrl, drag it onto the connector linking one of the parameters to the matrix.00:04:25 --> 00:04:27Repeat for the other two; 00:04:33 --> 00:04:34save, 00:04:36 --> 00:04:37and evaluate again.00:04:40 --> 00:04:46Test it out by clicking and dragging the spinners, it should be quite a bit easier to control this time around.00:04:53 --> 00:04:58To re-order the axis rotations, you only need a bit or rewiring.00:04:59 --> 00:05:11If each teapot represented an airplane with the spout being the nose and the handle a tail, then rolling should be based on the current pitch value.00:05:15 --> 00:05:22Pitch, on the other hand, should have the effect that is currently provided by yaw.00:05:26 --> 00:05:33So simply delete these connections in the graph and reorder them.00:05:50 --> 00:05:57This also reorders them in the Modifier panel. You'll learn more about advanced UI adjustments in the next movie.00:05:59 --> 00:06:07For now, simply make the necessary simple adjustments to the labels such as adding caps and colons.00:06:08 --> 00:06:12Remember to press Enter to update the values.00:06:21 --> 00:06:30Rotations seem to be working fine now, the next step is to introduce a scale factor to make the duplicates bigger or smaller.00:06:31 --> 00:06:36Clean up the graph by collapsing and moving operators to make more space.00:06:37 --> 00:06:44Earlier you used the Multiplier node to feed both position and rotation data into the Transform matrix.00:06:44 --> 00:06:48You will use the same technique to add Scale data to the mix.00:06:49 --> 00:06:52Add a Multiply operator as you have done before.00:06:53 --> 00:06:58An alternative would be to just Shift+Drag and copy the existing one.00:06:59 --> 00:07:05Reroute the existing Multiply operator into it, using the x input.00:07:12 --> 00:07:17Drag out the y input and search for a "Scale" operator that you can use.00:07:18 --> 00:07:24ScaleMatrix sounds about right; go ahead and connect to its "value" output.00:07:25 --> 00:07:28Add a Parameter: Single operator to it. 00:07:31 --> 00:07:34Name it: "Scale:"00:07:35 --> 00:07:43Set the default value to 1.0, which means that clones by default would be the same size as the original.00:07:44 --> 00:07:57Set the limits as you see fit. Here, I'll leave the min at 0.0 and set the max to 10.0 meaning I can only go as far as 10 times bigger than the original.00:07:58 --> 00:07:59Save and Evaluate, 00:08:04 --> 00:08:06and then test your modifier once again.00:08:20 --> 00:08:23A few things worth noting before we wrap things up:00:08:24 --> 00:08:31Because you opted to combine the clones into a single object, selecting any of the clones selects the whole array.00:08:32 --> 00:08:42Also, this modifier works in local space, which means transform offsets are based on the original object's orientation.00:08:51 --> 00:08:55Materials & Mapping you define on the original objects, 00:09:00 --> 00:09:04are preserved and scaled appropriately on the duplicates.00:09:14 --> 00:09:16You have now all but finalized your modifier.00:09:17 --> 00:09:25You still need to learn how you can rearrange its UI, for example to categorize various transforms into separate groups.00:09:26 --> 00:09:28This is what you do in the next movie.`
Posted By
Tags
• 3ds Max
• 2016
• MCG

Got questions? Visit the Autodesk forums.

3ds Max 2016

3ds Max 2019

3ds Max 2019