More Tips and Tricks

Ted Boardman tedb@tbmax.com         http://www.tbmax.com


Distortions

Well, it’s Sunday Dec 7 and I’m sitting in Westin Hotel at the Detroit airport waiting for a flight to Boston. I’ve been on my way back from Autodesk University in Las Vegas since Friday night and this is as far as I’ve gotten because of a large blizzard fouling up all air travel into New England.

I had some relatively late nights in Las Vegas and was usually up and out to breakfast by 4am because of the time changes. I took a red-eye flight here to Detroit, which meant less than two hours sleep. After hanging around the terminal most of the day Saturday I realized flights were going to be canceled through the night so grabbed a room at the hotel. Sunday morning is proving to be the same and all fights are canceled for the day so I’m back in the room for one more night. Oh well, there goes this weeks pay!

Autodesk University was extremely good for me this year. It’s a chance to visit lots of old friends and meet plenty of new ones who share a common passion for Autodesk VIZ and 3ds Max. There were more attendees, many of them first timers to AU, than ever before and more than 300 CAD and visualization classes over the course of 4 days.

For those of you in my classes that visit cgarchitect.com and this column thanks very much and hope to see you again this year. The rest of you might look into attending next year.

I arrived home finally on Monday at noon to several feet of snow. It didn’t last long, however, a couple of rain storms washed it away and we have been having “unseasonably” warm weather with temperatures in the low 50’s all through the holiday season.

In this column I’ll look at a couple of options for distorting mesh objects. I recommend using Bump maps when possible, but there are times when the effect just doesn’t work well enough for close views or clarity and you actually need physical geometry to represent the surface distortions.

I won’t do step by step tutorials but will explain and demonstrate some of the functionality of each method to give you an idea of how it all works, then you can apply similar methods to objects in your own work.

I’ll perform the exercises for this column on the same object, a flat Plane with segments set to 30 by 30, so you can see the differences each may offer. Again, it will be simple examples so you can concentrate on what the tool does. The included files are VIZ 4 but will work in max 4 to max 6 as the processes are the same for all versions.

Noise modifier

We’ll start out by looking at the one simplest of the methods of displacing objects; the Noise modifier. And, as simple as it is, it may often appear to have no affect on objects when first applied and you may have given up on using it.

The Noise modifier actually moves vertices in 3D space. Therefore the first thing you need is enough vertices for something actually to happen at all. Apply the Noise modifier to a default box and it won’t do anything. Increase the number of segments (more vertices) and still nothing will happen. Change the values in the Strength fields the changes might be more apparent, but not necessarily, depending on the size of the box. Making adjustments to the Scale factor of the Noise modifier is usually the final control that causes the effect to show noticeably on the box.

Opening the file called Noise_modifier.max and applying the Noise modifier to the flat plane does nothing as stated above, even though the plane has plenty of vertices. The Strength numeric fields are set to 0 by default. If I enter 10’ in the X: Strength field the distortion is apparent on the flat plane. See Figure 1.

Figure 1: 200 foot square Plane with 30 by 30 segments and Noise modifier applied with an X: Strength of 10’.

The edges in the object’s Local X-axis direction are rougher. Actually all vertices have been moved randomly in the X-axis but it is most noticeable on the edges. The amount they have been moved is a random number between –5’and +5’. Entering 10 feet in the Y: Strength field move vertices in the Local Y-axis to make the top and bottom edges o the plane rougher. Setting X and Y back to 0 and entering 10’ in the Z-axis field moves the vertices up or down 5’ from their original positions. See Figure 2.

Figure 2: Setting the X and Y Strength back to 0 and entering 10’ in the Z-axis moves the vertices up or down randomly a maximum of –5’ or +5’.

The effect of the Strength settings is readily seen in this example because the object has enough vertices and because it is large enough. Had the plane been small we might have seen no effect or minimal effect. Very often you need to adjust the Scale setting to a smaller number for the Noise to become apparent on a surface. Setting Scale to smaller amounts for this object affects the random numbers assigned to vertex movement, but doesn’t make it look much different. However, increasing the Scale setting to 300, for example, smoothes the Noise over a large area resulting in more gradual slopes. See Figure 3.

Figure 3: In this example, setting the Scale value to 300 smoothes out the slopes over a larger area.

The Noise modifier in this example is applied to the whole object but you can gain more control by using a Mesh Select modifier to create a selection set and then apply the modifier only to that sub-object selection.

The Noise modifier can be used for creating more natural randomness in landscape, rocks, soft furniture, or fabrics, for example.

Volume Selections

The Vol. Select modifier does not affect geometry itself, but as the name implies, is a method of selecting at the sub-object level. The selection must then have a modifier following it up the Modifier Stack to actually affect the geometry. I’ll walk you through a two simple examples highlighting the functionality of a couple of techniques of applying Vol. Select to the flat plane.

Vol.Select by Texture Map

The default method of selection when you apply Vol. Select to the flat plane in the example file is to select the whole object. In this case, however, we will be selecting vertices so much check the option in the Stack Selection Level of the Parameters rollout. All the vertices will turn red based on the area covered by the Gizmo that fits the plane. See Figure 4.

Figure 4: Applying a Vol.Select modifier to the plane and choosing Vertex selection level selects all vertices within the Gizmo that fits the object.

Going to sub-object Gizmo and scaling the Gizmo in the viewports will change the size of the Gizmo. It can then be moved or rotated to select the rectangular area you want. The shape of the Gizmo may also be changed by switching from Box to Sphere or Cylinder in the Select By area.

A more powerful option of selecting vertices is by using the Texture map option in the Surface Features areas. While there are several methods of setting this up I will start in the Material Editor. With a Sample Window active, I pick on the Get Material button and double-click Noise map in the Browser list. See Figure 5.

Figure 5: Using Material Editor Get Material, double-click on Noise map in the Material/Map Browser.

Note: This is not a material that can be applied to objects in the scene. It is just a map displayed in the Material Editor so it can be adjusted.

To apply the map to the Vol.Select modifier, drag and drop from the Sample Window to the slot below Texture Map in Surface Features area and choose Instance in the dialog. Check the Texture Map Radio button to activate it. See Figure 6.

Figure 6: Drag the map in the Sample Window onto the Texture Map slot in the modifier and check the Texture Map radio button to activate it.

The vertices on the plane will turn from a red to yellow in color. In the Material Editor, Noise Parameters rollout, Noise Threshold fields, enter 0.5 in the High and 0.49 in the low for a hard edged black and white Noise pattern. Change the Size to 400 and you will see definite areas of selected (red) and non-selected (blue) vertices. See Figure 7.

Figure 7: Entering 0.5 in the High and 0.49 in the Low Threshold fields of the Noise map creates equal parts black and white with a hard edge. Setting the Size to 400 increases the size of the pattern on the plane. Red vertices are selected, blue are not.

Re-adjusting the Threshold settings to 0.6 and 0.3 in the High and Low respectively introduces orange and yellow vertices in the selection set. This acts like soft selections but is based on the luminance (whiteness) of the pixel in the map over a vertex. Red vertices will be fully affected by any modifiers above the selection set, orange vertices are affected somewhat less, yellow vertices only slightly affected, and blue vertices are not affected at all. Applying a Ripple modifier with both Amplitudes set to 2’0” shows the differing ripples according to vertex color in Figure 8.

Figure 8: A Ripple modifier affects red vertices fully, orange and yellow vertices progressively less and has no effect on blue vertices.

The map parameters may be adjusted in the Material Editor to change the areas affected by the ripple. In max these parameters may all be animated, but VIZ doesn’t allow sub-object animation. However, you may use an AVI or MOV file in the map slot to create sub-object animation in either program.

As with any sub-object selection set it is always a good idea to put a Mesh Select modifier at the top of the Modifier Stack to return control to the whole object.

Vol. Select by Object

Another option in the Vol. Select modifier is to use other geometry as the selection area. After applying the Vol. Select modifier to the plane and choosing Vertex as the Stack Selection Level you can go into the Select By area and pick the None button below Mesh Object and pick an object in the scene or use the H key to select by name. In this case the torus is used as the selection object.

Any vertex that comes in contact with the surface will be selected, but a more practical option is to go into the Soft Selection rollout, and check the Use Soft Selection checkbox. For this scene the default Falloff of 20 units will give noticeable results, but you can increase or decrease the amount to see the effect. Moving the plane closer to or farther from the torus will also affect the area selected. Again, red vertices will be fully modified, orange less, yellow even less, and blue not at all. See Figure 9.

Figure 9: At Vertex Stack Selection Level, choosing the torus as the Select By object and checking the Mesh Object radio button, then enabling Soft Selections results in vertices being select by the torus.

Applying a Push modifier above the Vol. Select modifier and setting the Push Value to –10 causes the selected vertices to be pushed away from the torus. See Figure 10. Moving the plane toward or away from the torus changes the amount of push on the vertices. Changing the Push Value to a positive number will cause the torus to “attract” the vertices.

Figure 10: Applying a Push modifier with a –10 Push Value causes the torus to repel vertices based on the Soft Selection settings.

Tip: This process of using Push modifiers with Vol. Select can be used as a modeling tool. When the object is distorted the way you want, just use the Snapshot tool found in the Tools pull down menu to create a “frozen” snapshot of the mesh. Adjust the original again and take another snapshot to create multiple models or, in 3dsmax, animate the object and use Snapshot over multiple frames to create a series of models that could be used as Morph targets, for example.

Summary

Objects may be directly distorted with the Noise modifier by setting the Strength amounts and adjusting the Scale factor to move vertices random amounts. It is important to have enough vertices in the object to begin with to see the effect of the Noise movement. Sub-object selections may be passed to the Noise modifier as well as acting on whole objects. For example, the Vol. Select could be used to determine what vertices are affected by Noise.

Vol. Select modifiers may be used in conjunction with maps where the whiteness of the pixels in the map determine the soft selection areas and that information can be passed up to other modifiers. This is the way I make water surfaces less regular and more natural, for example.

Other objects can be used with the Soft Selection options in Vol. Select and are especially handy when used with the Push modifier

Experiment with simple examples of each and with combinations of each to see what you can come up with to aid in your production workflow.

Good luck and have fun
Ted


DOWNLOAD MAX FILE (40KB)