3ds Max - MCG Clone Modifier - Part 3

Login to Follow
  • Design Visualization
  • 2016
  • MCG
  • 3ds Max
Skill Level
  • Intermediate
9 min

3ds Max - MCG Clone Modifier - Part 3

This is a 3ds Max multi-part series introducing Max Creation Graph (MCG). In this tutorial, you finalize the Clone Modifier by editing its UI. You will achieve this by creating groups separating various sections and reordering their parameters.

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


00:00:07 --> 00:00:14
In this movie, you finalize your Clone modifier by adding groups to collect and reorder parameters that work together.

00:00:15 --> 00:00:22
If you haven't done so already, you need to follow the instructions presented in Part 1 and Part 2 of this tutorial before proceeding.

00:00:23 --> 00:00:28
So far, you have built an effective Clone tool that duplicates an object by applying a modifier.

00:00:29 --> 00:00:37
It has input to control the Position, Rotation and Scale of the clones, as well as their number.

00:00:37 --> 00:00:44
The graph window in itself gives you little flexibility in respect to how the various controls are ordered.

00:00:44 --> 00:00:48
You can certainly change labels, but here's an example of limitation:

00:00:49 --> 00:00:56
Zoom in on the rotation operators. You might recall labeling the parameters based on the Yaw Pitch Roll matrix.

00:00:57 --> 00:01:04
Let's say for argument sake that you wanted a more familiar naming convention, as you have used with Position offsets.

00:01:04 --> 00:01:13
In this case, you could rename the roll "X Rotation:" since that is the axis affected by the roll value

00:01:19 --> 00:01:22
Pitch becomes Y Rotation,

00:01:25 --> 00:01:28
and Yaw becomes Z Rotation.

00:01:33 --> 00:01:37
Save the graph and evaluate it to test the results.

00:01:42 --> 00:01:51
Everything seems to be working fine except for the fact that it feels weird to have the Y axis displayed before the X axis.

00:01:51 --> 00:01:58
Nothing wrong with it from a practical standpoint (it still works…) except that it feels a bit out of place.

00:01:58 --> 00:02:06
You cannot change that in the graph editor because the order is dictated by the order of rotations in the rotation matrix.

00:02:06 --> 00:02:12
However, you can achieve this and more by editing the Graph Properties.

00:02:13 --> 00:02:18
Choose Edit > Edit Graph Properties, a new dialog appears.

00:02:19 --> 00:02:26
In the main tab, you can fill personal information that can be useful if and when you develop graphs that you want to sell.

00:02:26 --> 00:02:31
More importantly, there's another tab that enables you to edit the UI.

00:02:32 --> 00:02:35
This is done with a few lines of MAXScript.

00:02:35 --> 00:02:39
Cancel the dialog for now, you'll come back to it in a moment.

00:02:40 --> 00:02:46
Choose Build > View MAXScript. Now you can see your graph in MAXScript form.

00:02:47 --> 00:02:52
Take note of the "rollout" section, which defines the UI in the Modify panel.

00:02:53 --> 00:02:56
In fact, select this whole section,

00:02:58 --> 00:03:00
and copy it to memory,

00:03:01 --> 00:03:04
and then close the MAXScript window.

00:03:07 --> 00:03:11
Go back to the Graph Properties window and to the Custom UI tab.

00:03:12 --> 00:03:17
Press Ctrl+V to paste the paragraph you copied to memory.

00:03:17 --> 00:03:22
Now you can make many more changes that aren't available to you in the graph window.

00:03:22 --> 00:03:30
First, you can change the main rollout name to "Clone Tool" instead of the uninspiring "Parameters"

00:03:32 --> 00:03:39
Next you'll separate the rest of the information in groups, to collect parameters that work together.

00:03:39 --> 00:03:48
In this case, you'll create four groups for number of clones, position data, rotation data and scale data.

00:03:49 --> 00:03:53
Add a line break after the line that represents the number of clones.

00:03:54 --> 00:04:04
Type in the following: Group "Position Offsets" and add an open/close parentheses

00:04:07 --> 00:04:15
Select the three lines that represent position data and drag them into the space between the parentheses.

00:04:16 --> 00:04:22
Clean up the work by adjusting the proper spaces and tabs for a cleaner look.

00:04:24 --> 00:04:28
Add a new group for Rotation offsets;

00:04:38 --> 00:04:44
only remember to reorder the axes with X on top and Z at the bottom.

00:04:50 --> 00:04:53
Create a final group for Scale as well.

00:05:00 --> 00:05:08
Again, clean up the tabs and spaces and when you're done, click OK to exit the dialog.

00:05:09 --> 00:05:12
Save and evaluate your script.

00:05:15 --> 00:05:20
If nothing happens, it means you made an error somewhere editing the script file.

00:05:21 --> 00:05:25
In this case go back to the graph window to examine it.

00:05:27 --> 00:05:33
In my case, it looks like I forgot to add a double-quote (") when I typed in the Scale group name.

00:05:33 --> 00:05:36
Correct any such errors,

00:05:38 --> 00:05:40
and try again.

00:05:44 --> 00:05:50
When the script is clean, you should see a new and improved interface in the Modify panel.

00:05:51 --> 00:05:57
In addition to organizing parameters in groups, you can also define additional rollouts.

00:05:57 --> 00:06:00
Go back to edit your custom script,

00:06:02 --> 00:06:04
and add the following line:

00:06:04 --> 00:06:11
rollout inforoll "About"

00:06:12 --> 00:06:16
Also add open/close parentheses to edit the rollout.

00:06:18 --> 00:06:26
This rollout will simply feature personal information, again in case you are considering developing and selling your own tools.

00:06:27 --> 00:06:32
Between the parentheses, add a few lines of personal info, such as your name.

00:06:33 --> 00:06:46
Start by defining a group to improve the display. Type: group "Clone Tool Info" and again add open/close parentheses.

00:06:47 --> 00:07:01
Between those, add a line that reads: label lab1 -and then under double quotes- "Author: John Doe"

00:07:04 --> 00:07:08
then add: align:#center

00:07:09 --> 00:07:12
Feel free to use a different name than John Doe.

00:07:12 --> 00:07:19
The align:#center statement is self-explanatory and ensures the label is centered in the Modify panel.

00:07:20 --> 00:07:23
Add another label for a company name,

00:07:30 --> 00:07:34
and maybe another for copyright information.

00:07:42 --> 00:08:00
You can even add a link to a web page by using a line such as: hyperlink hl1 -and then under quotations- "http://www.autodesk.com"

00:08:01 --> 00:08:06
and also with the statement: align:#center

00:08:07 --> 00:08:12
Press OK when ready; save and evaluate.

00:08:16 --> 00:08:25
You now have a nicely presented UI for your new Clone tool that includes a hyperlink to send users to your personal web page.

00:08:29 --> 00:08:34
This wraps up this three-part tutorial on using MCG to create a Clone tool.

00:08:34 --> 00:08:38
Look for more examples of MCG-related tutorials on this channel.
Posted By
  • 3ds Max
  • 2016
  • MCG
To post a comment please login or register
*Save $66 per month on Autodesk's Suggested Retail Price (SRP) when purchasing 1 year term 3ds Max or Maya subscription.