Photobucket

related link

Thursday, January 31, 2008

LOFTING1

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

Fundamental Lofting Methods in VIZ and max

The topic of Lofting in 3ds max or Autodesk VIZ has come up fairly often in the VIZ support forums lately so I thought I would use the bulk of this months column to touch on the process. To me, it is the most powerful modeling tool in max and VIZ, but one that is often underutilized because of some seemingly "strange" behavior when using it. The behavior is not really strange, but lofting is unlike any creation method you use in other software so it requires that you know a few simple concepts in order for it to make sense.


As a quick aside, the term Lofting comes from old ship building practices where the patterns for ribs of a ship were all laid out in the upstairs loft of the ship builders shop. Long, thin metal bands, or splines, were set on edge and bent to the curvature of the hull at given points along the keel. To hold the splines in place so the lines could be traced on the patterns, the ship designer place heavy steel or lead "ducks" at the tangency points. To create the hull, the ribs (loft shapes) were then attached along the keel (loft path) and the planking was attached to form the hull (mesh object).

But I don't speak the language…

There are certain terms in max/VIZ lofting that need to be explained before starting.

• Shape: a Shape is a 2D object in max or VIZ. It may occupy 3D space as a Helix shape does, but does not have any surface information. A Shape has a name and a color.
• Spline: a Shape must contain at least one sub-object level spline, but a Shape is a Compound Shape if it has more than one Spline. For example the Donut primitive is a Compound Shape made of two splines, i.e. concentric circles
• Loft Path: the Shape that defines the extrusion length of the loft object
• Loft Shape: the Shape that define the cross-sections of the loft object

A loft object can have only one continuous closed or open 2D spline as a path. A loft object can have an unlimited number of open or closed shapes as cross-sections.

Each shape or path can have an unlimited number of vertices and different shapes can have different numbers of vertices each.

Each shape on a path must have the same number of splines. For example you cannot loft a Circle and a Donut primitive on the same loft path.


• Local Reference Coordinate System: there are seven different coordinate systems in VIZ and max, but the Local system is most important in lofting. Essentially the Local system is the system of the shape as it is created. When you create a shape in any given viewport the rule is that Local positive X axis is to the right, Local positive Y is up, and Local positive Z is out toward the viewer. This Local coordinate system stays relative to the shape as the shape is rotated.
• Pivot Point: the pivot point of a shape is usually positioned at the geometric center of the bounding box of the shape. It can be repositioned through the Hierarchy panel. The pivot point defines the apex of the X, Y, and Z axis of a shape. See Figure 1.
• First Vertex: each 2D spline has a First Vertex indicated by a white box when in sub-object Vertex mode. Open splines can have either end vertex as First Vertex and closed spliness can have any vertex as First Vertex.

Tip: The First Vertex of a shape can be seen when in Sub-object Vertex editing mode. However, you can also view First Vertex at any time by selecting the shape(s), right-clicking and choosing Properties, and checking Vertex Ticks in Display Properties, By Object menu.

The Pivot Point and First Vertex are very important in the lofting process and a lack of understanding of them is probably the prime reason for frustration while lofting.


Figure 1: Selection set of shapes with First Vertex showing as white box on vertex


Lofting

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

Fundamental Lofting Methods in VIZ and max

The topic of Lofting in 3ds max or Autodesk VIZ has come up fairly often in the VIZ support forums lately so I thought I would use the bulk of this months column to touch on the process. To me, it is the most powerful modeling tool in max and VIZ, but one that is often underutilized because of some seemingly "strange" behavior when using it. The behavior is not really strange, but lofting is unlike any creation method you use in other software so it requires that you know a few simple concepts in order for it to make sense.

As a quick aside, the term Lofting comes from old ship building practices where the patterns for ribs of a ship were all laid out in the upstairs loft of the ship builders shop. Long, thin metal bands, or splines, were set on edge and bent to the curvature of the hull at given points along the keel. To hold the splines in place so the lines could be traced on the patterns, the ship designer place heavy steel or lead "ducks" at the tangency points. To create the hull, the ribs (loft shapes) were then attached along the keel (loft path) and the planking was attached to form the hull (mesh object).

But I don't speak the language…

There are certain terms in max/VIZ lofting that need to be explained before starting.

• Shape: a Shape is a 2D object in max or VIZ. It may occupy 3D space as a Helix shape does, but does not have any surface information. A Shape has a name and a color.
• Spline: a Shape must contain at least one sub-object level spline, but a Shape is a Compound Shape if it has more than one Spline. For example the Donut primitive is a Compound Shape made of two splines, i.e. concentric circles
• Loft Path: the Shape that defines the extrusion length of the loft object
• Loft Shape: the Shape that define the cross-sections of the loft object

A loft object can have only one continuous closed or open 2D spline as a path. A loft object can have an unlimited number of open or closed shapes as cross-sections.

Each shape or path can have an unlimited number of vertices and different shapes can have different numbers of vertices each.

Each shape on a path must have the same number of splines. For example you cannot loft a Circle and a Donut primitive on the same loft path.


• Local Reference Coordinate System: there are seven different coordinate systems in VIZ and max, but the Local system is most important in lofting. Essentially the Local system is the system of the shape as it is created. When you create a shape in any given viewport the rule is that Local positive X axis is to the right, Local positive Y is up, and Local positive Z is out toward the viewer. This Local coordinate system stays relative to the shape as the shape is rotated.
• Pivot Point: the pivot point of a shape is usually positioned at the geometric center of the bounding box of the shape. It can be repositioned through the Hierarchy panel. The pivot point defines the apex of the X, Y, and Z axis of a shape. See Figure 1.
• First Vertex: each 2D spline has a First Vertex indicated by a white box when in sub-object Vertex mode. Open splines can have either end vertex as First Vertex and closed spliness can have any vertex as First Vertex.

Tip: The First Vertex of a shape can be seen when in Sub-object Vertex editing mode. However, you can also view First Vertex at any time by selecting the shape(s), right-clicking and choosing Properties, and checking Vertex Ticks in Display Properties, By Object menu.

The Pivot Point and First Vertex are very important in the lofting process and a lack of understanding of them is probably the prime reason for frustration while lofting.

Figure 1: Selection set of shapes with First Vertex showing as white box on vertex

The Pivot Point of the Shape attaches to the First Vertex of the Path. An AutoCAD analogy for Pivot Point during lofting would be the Insertion Base Point of a block.

The orientation of the shape on the path is a bit more complex. I'll talk you through it here and show an example, then discuss it in more detail later. The local Z axis of the shape aligns itself "down" the path and the local Y axis of the shape aligns with the local Z axis of the path. See Figure 2.



Figure 2: Curved path and L shape created in Top viewport. Loft shows orientation of the shape on the path. You can also see the respective local axis Gizmo's of the two shapes.


Let's Loft…

The lofting process itself is simple enough, but there are a couple of options worth mentioning. Lofting is found in the Create panel, Geometry, Compound Objects pull-down menu. See Figure 3. You must have a valid 2D shape selected or the Loft button will be grayed out.

In the Creation Method rollout are two options Get Path and Get Shape. The usual workflow is to have the path selected and to use the Get Shape option. However, you could select the shape and use Get Path. The determining factor is that whichever object is selected remains in place and the other, Shape or Path, reorients and moves to the selected shape. For all examples in this column I will select the path and use Get Shape.

Just below Get Path and Get Shape are some very important options; Move, Copy, and Instance. The default is Instance. This means that a clone of the shape jumps to the path, not the shape itself. The advantage of this option is that you can modify the original 2D shape and the lofted 3D mesh will change accordingly.

The Move option actually moves the original shape to the path and Copy places a clone of the shape with no connection to the original making either choice much less editable. I have never found the need to use either Move or Copy.





Figure 3: Loft panel


In Figure 4, most of the walls, glazing, and seating are lofted from 2D shapes, allowing quick and easy editing.

As I say, the fundamental process is simple enough, but there are more options that you must understand to make a lofting efficient modeling choice.



Figure 4: Example of lofted objects that are very easily adjusted by editing the 2D shapes.


Lofting Efficiency…

If you want 3ds max and Autodesk VIZ to be a cost effective tool in your office, you MUST keep models as simple as possible. Modeling overhead is the primary hindrance to production that I encounter in my training session. Each vertex and face in a model uses valuable computer overhead and you can very quickly overwhelm even the most powerful systems and render them useless in an office. Would you buy a new car and load it up with heavy weights just for the heck of it? Of course not, so it always baffles me when I see overloaded models in max and VIZ, it's the same thing.

Lofting offers controls for adjusting mesh density of models while retaining the necessary details. First we have two new terms to learn:

• Shape Steps: Shape Steps are intermediate points between vertices of the shape that define curvature in the connecting shape segment
• Path Steps: Path Steps have the same function between vertices on the path.

When a shape is lofted along a path, segments are created in the loft mesh for each vertex and path/shape step. Figure 5 shows the previous loft object with Edged Faces turned on in the viewport configuration options.



Figure 5: Example of lofted objects with segmentation caused by the Path and Shape Steps settings and the original shape and path vertex locations.


If I right-click on the selected mesh object and go to Properties, I can see that the object has 5136 faces. If I go to the Modify panel, Skin Parameters rollout, I see two spinners for Shape Steps and Path Steps. Each is set to 5 by default in 3ds max 4 and Autodesk VIZ 4. See Figure 6. VIZ 3 has a default setting of 0 for each of the Steps.



Figure 6: Default Shape and Path Steps settings is 5 in max 4 and VIZ 4.


If I set the Path Steps to 0, there is no longer enough information to show the curvature between the vertices. The object has less detail, but is not acceptable to the viewer. See Figure 7.

Increasing the Path Steps to 3 might give an acceptable level of detail depending on the distance from the camera or the background and reduces the overall face count to 3552. You must be the judge of how much detail is enough, but you have the option to change it at any time to optimize the object for any occaision.



Figure 7: Setting Path Steps to 0 results in no curvature between path vertices.


Looking at the shape for the loft you will notice that there are no curves in either the L-shaped spline or the letters x and y. Setting the Shape Steps to 0 in this case has absolutely no effect on the detail of the mesh object. See Figure 8.

Reducing the Shape Steps to 0 of this loft object has no effect on the quality and reduces the face count to 582. This is a huge savings in memory resources when done for all your lofted objects in the scene. As a matter of fact, I can now increase the Path Steps back up to 5 resulting in much higher visual quality and still only have 846 faces.



Figure 8: Setting Shape Steps to 0 has no effect on mesh object quality because there is no curvature between shape vertices..


Just below the Path Steps and Shape Steps spinners is a checkbox labeled Optimize Shapes. If I had checked this option instead of setting Shape Steps to 0 it would have resulted in the same savings. What Optimize Shapes does is an intelligent analyzing of the shape and will reduce the number of steps in the straight portions of the shape and leave the curved portions set to the number in Shape Steps field. This can result in the best of both worlds for many typical shapes used in lofting.



Remember the definition of Shape Steps and Path Steps - intermediate steps between vertices that define curvature in the segment. If you do not have adequate steps then you must have vertices to define the curvature.

Figure 9 shows a rectangle lofted along a filleted path. This could be a sidewalk, road, countertop, in fact it could many different things if you use your imagination to apply the tools.



Figure 9: Rectangle lofted along a filleted path with default Shape and Path Steps. Loft object has 908 faces.


There is Optimize Path option in the Modify panel of a loft object, but I have never seen it active and available so I don't have the same options as with Shapes. However, I can adjust the number of vertices to get the same results. Setting the Shape Steps to 0 or checking Optimize Shapes results in 148 faces. However, reducing the number of Path Steps quickly destroys the detail in the curve portion of the sidewalk. Setting it to 0 results in a useless object as seen in Figure 10.



Figure 10: Setting Shape Steps and Path Steps to 0 results in no curvature between path vertices and an unacceptable object.


To correct this I will select the original path, go to Segment sub-object level in the Modify panel and select the curved segment of the path. In the Geometry rollout, I will enter 4 in the Divide field, then pick the Divide button. This adds 4 vertices along the segment and redefines the curvature to that segment without adding unnecessary detail along the straight segments. The result is an object with a good balance of detail and efficiency with only 60 faces in the entire walk. See Figure 11.



Figure 11: Selecting the original loft path, setting Shape and Path Steps to 0, then using Divide to add vertices to the curved segment only results in a good looking, efficient object


In Summary…

I have touched on the fundamental issues in lofting that are responsible for most confusion when initially learning to loft. There are still topics that I want to cover to increase the control in both the orientation of shapes along the path and the use of multiple shapes on the same path.

As I say, even if your primary modeling tool is AutoCAD or ADT or any other program, VIZ and max lofting offers some very unique and power features that will allow you to model and edit objects just not possible in the other programs. Take a little time to investigate the tools and I guarantee you will find plenty of uses in your everyday work.




Read More......

Wednesday, January 30, 2008

MATERIAL MASKING

Who was that masked material?
Masking is the process of hiding and revealing portions of a pattern using the luminance values of another pattern or map. The concept is simple, as is the fundamental application, but by using masking upon masking you are able to generate very complex materials that are convincing to the viewer.

This column will introduce you to the process of masking at both the map and the material level in 3ds max or Autodesk VIZ, both programs share the same capabilities. We will start with the simple applications to see how masking functions, then work into more complex examples including animated masks.


Grayscale images generally function best as masks. It is the Luminance value of a pixel that controls the masking effect, white is opaque…black is transparent…levels of gray are somewhere in-between. Color images may be used as masks, but it is very difficult for most of us to judge a particular luminance value of a color. For example, green and yellow look very different, but might have the same luminance values and would be ineffective as a mask.

As with all topics in max or VIZ it is best to start simply to get a feel for the functionality and controls, then work into more complex applications. I will include a VIZ 4 file for downloading that can be opened in either VIZ 4 or 3ds max 4 and 5. For those of you with previous versions of max or VIZ the descriptions should be enough for you to build your own similar scenes and examples.

Where can masks be applied?

Masking can occur at either the map or the material level. If masks are applied at the map level the effect is only for that particular material component; Diffuse Color, Opacity, Reflections, etc. The material masking allows all components of materials to be hidden or revealed by the mask.

Two examples of masking at map level would be the Mask map that allows one map and one mask that allows the underlying Diffuse Color to show through and the Mix map that allows two maps with an optional mask. Another map type called Composite can be used for masking effects that use image Alpha Channels that will act as the masking agent. Alpha Channels will be discussed later in the column.

At the material level my favorite is the Blend material that allows two materials with a mask. This allows you to reveal two separate complete materials with different color, bumps, reflections, for example, with the mask.

The depth of masking is unlimited, for example you can have a mask map within a mask map within a mask map or a Blend material made of a material plus another Blend material, each with it’s own mask. Like I said earlier, though, start simply and build on your knowledge as you become comfortable with the process.

Masking at map level

As mentioned, there are several methods for applying masks at the map level of a material and the one we’ll look at here will be the Mask map.

The scenario is a tile floor with solid red tiles alternating with marble pattern tiles and can be accessed by downloading Tile_viz4.max. (Download zip file at end of article) The red color will be set as the Diffuse and Ambient Color swatches of the material. A Mask map is applied to the Diffuse Color slot and is composed of a Perlin Marble map and a Checker mask. The white areas of the Checker mask are opaque and show the marble map. The black areas of the Checker mask are transparent and reveal the underlying solid red Diffuse Color. See Figure 1.



Figure 1: The Material Editor shows a Mask map in Diffuse Color slot that contains a map and a mask. The viewport and rendered image show the effect of black and white masking of the map. Perlin Marble shows in the white areas and diffuse red shows in black areas.


This example shows how the process works in a Diffuse Color example. In the next example I use a Mask map in conjunction with a Raytrace reflection map on a tile floor that can be found in Wall_viz4.max. The scenario here is a ceramic tile floor with Brick maps defining the color and the bump pattern and a Raytrace map that causes the material to reflect its surroundings.

In the Mask map of the Reflection slot I have disabled the Bricks mask by unchecking it in the Mask Parameters rollout causing the reflection to be the same for both the tiles and grout. See Figure 2.



Figure 2: The mask of the floor tile Reflection slot has been disabled and you can see the reflection of the cylinder is the same in the grout and tile.


By applying the same Brick map I used in the Bump slot of the material to a Mask map with a Raytrace map, the reflections only occur in the white areas of the mask. See Figure 3



Figure 3: Enabling the Bricks mask reveals reflections in the tile areas but not in the grout areas for a more convincing floor material.


Masking at the material component level offers a lot of possibilities for experimentation. The same Reflection masking as above could be used with Raytrace and a Noise mask to give the illusions of puddles on a road surface. A combination of Bricks map in the Bump slot with a Gradient Ramp mask could create the illusion of a knurled surface on a tool handle. Use your imagination and experiment.

Masking at the material level

Masking at the material level functions the same as at the map level but increases the control another notch. Each material can have widely varying attributes like color, shininess, and bumps, each revealed or hidden by the mask. In the example here I’ll use the Blend material with the optional mask.

The scenario will be a wall that needs a combination of brick and stucco. As in most projects the exact material placement will be held in secret by the designer right up to the last minute of the deadline. I want to be able to make last minute changes quickly and easily. This is also using the file Wall_viz4.max. (Download zip file at end of article)

Blend material with masking allows us to do this nicely. I create the Blend material with a Brick and a Stucco material, each with different patterns, colors, and bumps. I’ll use a Gradient Ramp mask that has been adjusted for solid bands of black and white to reveal the two materials exactly where I want them on the model.

This wall example also illustrates a powerful feature of max and VIZ called Map Channels. Because the patterns of the brick, the stucco, and the mask repeat differently over the wall surface I needed different mapping coordinates for each map. The wall has three UVW Map modifiers each set to a different Map Channel. The Gradient Ramp mask is set to use Map Channel 1, the Brick map uses Map Channel 2, and the Stucco map uses Map Channel 3 so that each pattern may be adjusted independently. The Map Channel in the UVW Map must match the Explicit Map Channel setting of the map in the Material Editor.

The Gradient Ramp map has been rotated in the W axis in the Coordinates rollout for proper orientation on the wall. An alternative would be to rotate the UVW Map modifier Gizmo.

Figure 4 shows the Gradient Ramp map and the rendered image shows the result of the masking. Each material has it’s own color and bump information.



Figure 5: By adjusting the position of the flags in the Gradient Ramp map used as the mask, you can quickly reposition the location of the materials.


This same wall material could have been used with a Noise map to simulate a stucco wall with sections of plaster fallen off to reveal bricks below. You could also create the illusion of rust coming through a metal panel or grassy areas with patches of rock and dirt.

Animated masks

Masks do not have to be static images or maps. Interesting effects can be created by using animated masks in the form of avi or mov files or as sequentially number still images. You might say that it sounds logical, but you don’t have a 2D animation program to create the animated maps. Don’t fear, it is easy to create animated masks in 3ds max or Autodesk VIZ.

In the file called Rope_viz4.max (Download zip file at end of article) is a section of coiled rope made by lofting a circle around a helix and applying a material to it. The task at hand is to make the rope disappear over time, not all at once, but from one end to the other.

The solution here is to use a Blend material and a mask again. In the Blend material is a rope material and a material that is completely invisible. The opacity and glossiness of the material have been set to 0. It is important to set the glossiness to 0 to avoid a highlight on the invisible portion of the rope.

The mask is created in VIZ 4 by assigning a pure white material to a flat plane and animating the plane moving from just off screen to filling the viewport of a camera view. In this case it is Camera02. The animation was rendered as an avi file and used in the Mask slot of the Blend material.

Figure 6 shows the Blend material level in Material Editor and the result of rendering frame 15 of 30 frames. Half the rope that you see in the Camera01 viewport is invisible in the rendered image. See Figure 6.



Figure 6


The same technique could have been used to reveal a shiny new material under an old crusty material over time or to make a surface appear to bubble from the heat by revealing the base material with same material with a bump map added.

Note that it is important in this case that the rope be created in max or VIZ by lofting. Lofted objects are the only objects that generate mapping coordinates that allow the patterns to follow the curvature of the objects. For example the rope material and the mask both follow the rope as it winds upward.

Alpha channel and masking

You will often hear the term Alpha Channel in conjunction with maps in max or VIZ. It refers to information that is stored in certain bitmaps that determine transparency. The most popular files types with alpha channels are tga, tif, and png.

Computer generated images are displayed in pixels, either on screen or when printed. Since the early days of computer graphics anti-aliasing has been used to smooth diagonal lines and edges caused by stair-stepping across squarish pixels.

Anti-aliasing is done by blending the pixels at the edges of contrasting colors to make the edge appear smoother. If a red diagonal line is applied to a yellow background then some pixels are quite red with a little yellow, some are half red, half yellow, and others are quite yellow with a little red. This smooths the transition when seen from a distance.

However, if the red line is lifted from the yellow background and composited onto a blue background the yellow remnants look terrible and are worse than no anti-aliasing. 32 bit files or files with 24 bits of color and 8 bits of alpha channel use transparency pixels instead of the background color to create the anti-aliasing effect. Now when the red line with varying transparent pixels are composited to another background there is no problem and everything has clean edges that appear smooth.

Max and VIZ both can take advantage of files with Alpha Channel in the masks for a cleaner blend at either the map or the material level. Workings on the examples in this column don’t require Alpha Channel to work, but keep it in mind if you are experiencing problems with detailed masks in your explorations.

Summary

Masking gives you control of materials you never thought possible. The concept and application are simple at its base level, but by combining masks at different levels you can create materials that are complex yet easily edited.

As a personal plug, if you are a 3ds max 5 user, my new 3ds max 5 Fundamentals book by New Riders Publishing is set to appear in late October or early November. It is somewhat different than my previous fundamentals book in that I focus on the many new max 5 features in a series of exercises that take you from a medieval village to building a personal transporter, and a trip to the fortune tellers. The exercises are designed to be an interesting and informative way to learn uses for max 5 features from modeling, to materials and radiosity lighting, to collision detection and scene editing and compositing.

In any case, good luck and have fun.

Ted




Read More......

Tuesday, January 29, 2008

RUNNING WATER

by Ted Boardman

You’ll often hear it said that you need 3ds max to create running water effects with Particle Systems and it can’t be done in VIZ. Well, true enough that VIZ doesn’t have Particle Systems, but that’s only one type of running water and the method I’ll cover in this months column is valid in any version of both max and VIZ.

The process is quite simple once you have the speed and scale of the animated map for the water worked out. There may be some formula that could be devised to figure the size of the maps and the motion necessary to produce the desired results, but I have found that just doing a few test renders for both the map and the final water material is the best method. Because the Noise map used is a Procedural map it has no real-world “size” and the dimensions of the surface Noise is mapped to and the size of the water surface the material is applied to a little experimentation is necessary.


This won’t be a step-by-step tutorial this month, but I’ll walk you through the process I used to Model the landscape and to set up the material for both the landscape and the water and will encourage you to use my example to create a scene of your own.



Figure 1 shows a still image from an animation of water running through a ravine on a sloping landscape.


The Landscape

The first thing to look at is the landscape itself. The modeling is done with the same method I covered in last month’s column. A Gradient Ramp map is used in the Displacement slot of one part of landscape material.

The whole material is a Blend material so that a Falloff mask can be used to reveal dirt on the sides of the ravine and grass on the flat surfaces of the landscape. This is the same method used for the snowy mountain with some adjustments for color and bump mapping. See Figure 2 for the Gradient Ramp displacement map on the left, the result of that map in the center, and the structure of the material in the Navigator on the right.



Figure 2: Gradient Ramp Displacement map settings and the Landscape material hierarchy in the Navigator.


The color and bump patterns of the landscape material are simply combinations of Smoke, Noise, and Speckle maps to provide a variety of shades and textures to enhance the randomness of natural materials. Be sure to open the viz file and experiment with the materials to get the look you want in your scenes and to see the settings in the Displacement mapping that will help optimize the landscape mesh.

The Water

What this column will focus more attention on is the water material itself. It’s really made up of two processes. One mesh and material are used to generate the animated maps that create the illusion of movement for the water in the ravine.

In the right-hand Top viewport of my Flowing_water_viz4. max file, I have created a Plane primitive object off to the left of the landscape. I then applied a material called Water map that contains a Noise map in the Self-illumination slot. See Figure 3 for the Noise settings and the resulting map.




Figure 3: Noise map settings for the Self-illumination slot of the Water map material that is applied to a flat plane.


TIP: you can view a large version of any map by toggling the Show End Result button in the Material Editor, then double-clicking on the Sample Window to show an enlarged window.

The Noise map is used in the Self-illumination slot because we want to generate a black and white animation to use as a map in the water material and do not want to have to adjust the lighting in the scene for this object. A black and white map causes the white areas to be fully self-illuminated and the black areas to have no self-illumination to render correctly with no variations caused by the scene lighting.

This new material is applied to the flat plane. In a Top viewport, zoom in so that an area of the flat plane fills the viewport. Right-clicking the viewport label and checking the Show Safe Frame option will ensure that what you see in the viewport is the area that will be rendered.

Now you can animate the flat plane moving past the viewport by turning on the Animate button, going to the last frame in the Time Slider, and moving the plane. This will cause the pattern to move as you render.

There is some trial and error required to get the size of the pattern and the movement of the plane to match the water flow that you want in your scene. I haven’t devised a reliable set of rules that states, “if you do X, you will always get Y” as a result. The overall size of the actual water surface object in the landscape, the amount of ripple you want, and the apparent speed of the current are all variables that come into play. I recommend you test with a short 15 frame example with only the flat plane and the water surface object visible until you get the speed the way you want, then render the whole sequence to be more efficient.

In the example file for this column I rendered the full 100 frames from the left-hand Top viewport (there are two Top viewports). I chose to the render images as individual PNG files at 24-bit color with Alpha channel. You could render as an AVI or MOV file as well, but you will get better results using Alpha channel when possible, especially for bump maps and masks. PNG files are highly compressed and load fairly quickly. The name of the rendered file was water.png and because it is 100 frames the individual files are actually named water0000.png through water0100.png.

Again, the Water surface material is a Blend material with a mask to vary the color and shininess for a more random look. Figure 4 shows the Navigator so you can see where the PNG files were used; as Bump and Mask maps.



Figure 4: The Water surface material is a Blend material that uses the rendered sequence of images as Bump and Mask maps.


TIP: the animated map is actually an ifl file that shows in the map slot. This file is automatically generated when you use one map of a sequentially numbered set of maps and check the Sequence option in the dialog. The ifl file is simply an ascii text file that lists all the files in the sequence. Max and VIZ then call the correct image for each new frame in the final animation.

The transparency of the water is not created by setting the Opacity lower, but by using a Thin Wall Refraction map in the Refraction slot. This automatically makes the material fully transparent and distorts surfaces behind the water surface. I then set the Refraction Amount in the Maps rollout to around 90 to reduce the transparency somewhat and allow the colors in the Diffuse slot to show.

Another important factor for water is to set the Specular level fairly high and to use a Falloff map in the Glossiness slot. This Falloff map has its Mix Curve adjusted to give hard-edged Specular highlights on the water surface. See Figure 5 for the Falloff Mix Curve. The Mix Curve points can be adjusted for different viewing angles and lighting scenarios.



Figure 5: Falloff map with Mix Curve to cause hard-edged Specular highlights on the water surface when the Specular level is set high.


Try a few variations of the materials and lighting in this example scene then try making your own from scratch.

The modeling of the water surface can also be important to the end result. As with any models, you want to be as efficient as possible and still get the amount of detail you need. I recommend lofting the water surfaces for several reasons; you can adjust the density of the mesh (face count) easily with Path and Shape Steps and, more importantly, lofted objects will generate mapping coordinates that allow the material to follow the curvature of the loft path. This would be very important for water that flowed around corners or spilled from a fountain spigot.

TIP: if the water map appears to be flowing in the wrong direction of the lofted surface you can edit the loft path at sub-object Vertex level and change the First Vertex to the opposite end of the path or at Spline sub-object level with the Reverse button.

You can also change the map itself by adjusting the W angle rotation in the Coordinates rollout.

In this example the water surface is a short Line shape lofted along a longer Line path that has been moved into position in the ravine. If, by chance, the lofted surface is not showing when you loft your own example it may be because the Face Normals are pointing in the wrong direction. Changing the First Vertex position on the shape Line will flip the normals or you can apply a Normal modifier to the loft object.

In this case I used a Noise modifier on the lofted surface to give it some extra bumpiness than that achieved with the Bump maps alone.

Enhancing the Contrast

Our perception of both water and glass (very similar properties for both) are often enhanced by increasing the sharpness and contrast of the rendered scene. I personally like contrasty images anyway so it works well for me.

One step you can try for overall sharpness is to change the filter that is used during rendering. In Figure 6 you can see that I have changed the filter from the default Area filter to a Catmull-Rom filter that gives sharper edges of dark and light areas. Another option would be to try the Mitchel-Netravali filter.



Figure 6: Changing the filter in the Render dialog from Area to Catmull-Rom can enhance the apparent contrast of water or glass.


While the filter affects the image when rendered another option that is seldom used is the Contrast adjustment on the lights themselves. In the Modify panel, Advanced Effects rollout, (see Figure 7) for a light you can adjust the Contrast setting to create radical changes in the rendered image. It may be helpful to light the water with a light that Excludes all other objects if you don’t want to increase the overall contrast in the scene.



Figure 7: Each light has a Contrast setting in the Advanced Effects rollout that can dramatically affect the lighting.


While you’re in the Advanced Effects rollout, try adjusting the Soften Diffuse Edge setting for scenes that have curved shaded surfaces. This setting will harden or soften the edge at the transition of lit to shaded areas and can be used to adjust the Specular highlights of glossy surfaces.

TIP: Use RAM Player to compare two images side by side when making adjustments to important materials and lighting setups.

Summary
Water is one of the most dynamic and difficult surfaces to render. This column gives you a possible starting point from which to experiment in your own scenes. Keep in mind that the position and quality of the lighting can make or break the appearance of materials like water and glass so always adjust each as you fine-tune your renderings.

Make sure that you take the time to look closely at water and glass in the real world in all lighting conditions so you can visualize what you must to in max and viz to achieve a certain look. You might even think about how an oil painter might approach the look and attack the problem from that perspective first.

In any case, good luck and have fun.

Ted

Read More......

Tuesday, May 15, 2007

STEP BY STEP









Concept your design in 2d autocad
















Change to 3d autocad













create solid in 3d autocad
































export to 3d Max and go to render






























Read More......

Monday, May 14, 2007

3D STUDIO MAX LESSON

3D Studio Max Lesson 1.1: A Basic Overview of 3DSMax's Main Tool Bar
From Adrien-Luc Sanders,
Your Guide to Animation.

Introduction



In this tutorial, we'll just be taking a look at parts of the environment of 3D Studio Max version 4.26, and helping you to get more familiar with the tool panels, how to navigate them, and how to use the sets of basic tools you'll need to begin animating; in this tutorial, we’ll only be looking at the viewports and the top toolbar, so that we can cover each set of tools in more detail in successive tutorals.
If you're using a version later than 4.26, don't worry; the basics still apply. Because we're covering the principle foundations of animating in three dimensions, we won't be looking at the more advanced plugins and automated functions that come with later versions of the program.


When you first open 3D Studio Max, it can look a little daunting, with dozens of buttons and tabs, screens and panels. But don't worry; just follow along, and we'll get started on figuring out just what's what.


Main Tool Bar


For this lesson, let’s look at the tools displayed below the File menu, above the viewports. This toolbar contains many tools and settings required to manipulate your scene and control how various point-and-click tools work. The toolbar actually contains so many buttons that you have to click and drag the right edge to pull the remaining objects into view, creating a sort of sliding/scrolling toolset that you’ll soon get used to when working in various areas. In the next pages, we’ll go over the individual buttons

Undo, Redo, Linking, and Space Warps

• Undo: Undoes your last action.
• Redo: Redoes an undone action.
• Select and Link: Groups any number of selected objects together so that they can be acted on as a whole.
• Unlink Selection: Breaks selected objects away from their link group to once more act as individual objects.
• Bind to Space Warp: Click this button, and then click and drag from a renderable object to an object modifier called a “space warp” to bind the two together so that the space warp’s forces will affect the object.

Selection Tools



• Select Object: Selects clicked objects to make them active for editing.
• Selection Region: Defines the shape of a click-drag-release selection region. It defaults to rectangular, but clicking on the small tick in the lower right corner of the button will expand it to allow you to select a circular region or a “fence” region outlined by your mouse selections.
• Selection Filter: Dropdown menu that allows you to define which classes of objects are affected by your selections. Defaults to all, but can be set so that only mesh objects, or lights, or other specific objects are selected.
• Select by Name: Opens a second dialogue with a list of all objects in your scene, allowing you to select them by name one at a time or in multiples.


Selection Tools



• Select Object: Selects clicked objects to make them active for editing.
• Selection Region: Defines the shape of a click-drag-release selection region. It defaults to rectangular, but clicking on the small tick in the lower right corner of the button will expand it to allow you to select a circular region or a “fence” region outlined by your mouse selections.
• Selection Filter: Dropdown menu that allows you to define which classes of objects are affected by your selections. Defaults to all, but can be set so that only mesh objects, or lights, or other specific objects are selected.
• Select by Name: Opens a second dialogue with a list of all objects in your scene, allowing you to select them by name one at a time or in multiples.

Centering and Axis and Coordinate Plane Restrictions



• Center Controls: Breaks down into “Use Pivot Point Center”, “Use Selection Center”, or “Use Transform Coordinate Center”. These settings define whether or not an object or group of objects rotate around the central pivot points of individual objects, the center of a group of objects, or the central pivot point of the axis that it/they are being rotated on.
• Restrict to X: Locks a transformation (move, rotate, scale) so that it occurs only on the X plane/coordinate.
• Restrict to Y: Locks a transformation (move, rotate, scale) so that it occurs only on the Y plane/coordinate.
• Restrict to Z: Locks a transformation (move, rotate, scale) so that it occurs only on the Z plane/coordinate.
• Restrict to Coordinate Plane: Instead of locking to a single coordinate, it locks transformations to a set of coordinates; can be the XY plane, the XZ plane, or the YZ plane.

Read More......