Material Creation and Assignment

 < Day Day Up > 



First of all, group the entire spaceship together in the following way:

  • Select the propulsion module (we named it Cylinder01) and convert it to an Editable Mesh or Editable Poly object type — it does not matter which in our case:

    • Context menu à Convert to à Convert to Editable Mesh

  • Attach all the other objects to it:

    • Control panel à Edit Geometry à Attach List

  • Select all objects and press Attach.

  • Rename your spaceship as SpaceShip and the only material used thus far as SpaceShip_Test.

    click to expand

Now it is time to check the way textures will look on the surface of our model. To do so, most professionals use Checker.

  • Assign the Checker texture to the Diffuse channel:

    • Material editor à Blinn Basic Parameters à Diffuse Material/Map Browser à Checker

  • In the texture parameters, set the Tiling recurrence value for U and V coordinates to 5 (Fig. 2.13), and see how the texture looks in the viewports.

    click to expand
    Figure 2.13: Parameters of the Checker test texture

So, what do we have now? 3ds max did not apply the new texture to primitives that were modified. Also, texture coordinates were only retained for objects with modifiers supporting them (e.g., Lattice). The coordinates were destroyed if the Edit Mesh modifier was applied, and at least one sub-object was deleted — something you should keep in mind in the future.

In any case, the default coordinates are almost useless here. You can edit them using the UVW XForm modifier — give it a try if you like — but in this case it is easier to reassign them completely.

Now, let us look into the Material ID parameter. It defines which sub-material (of the aggregate set of materials defined by a Multi/Sub-object) each sub-object (polygon or plane) is assigned.

  • Switch to the polygon-selection mode:

    • Context menu à Sub-object à Polygon

  • Select the polygons with a material index of 1:

    • Control panel à Surface Properties à Material à Select By ID

    click to expand

  • Type "1" in the window's input field and press OK (Fig. 2.14).

    click to expand
    Figure 2.14: Select By Material ID window

Tip 

You can highlight the selected polygons (Shade selected faces) by pressing the <F2> key.

Try to select polygons with other indices. Their values will not be affected, but it doesn't do much for us either, because, in our case, it is difficult to identify the materials and surfaces.

Generally, automatic texture-coordinates generating and assigning the material index to various surfaces are not as useless as they may seem. On the other hand, familiarity with the manual procedure can be much more efficient when you create plain objects, especially several objects of the same geometry with different materials. However, when more complicated objects are modeled (the kinds of things found outside a spaceship), these functions are more of a hindrance than an assistance.

In our book "3ds max 4: From Objects to Animation," we described in detail how to create and assign materials in the "traditional" method used with the first version of 3ds max. Starting with version 3, however, 3ds max introduced the capability to "drag and drop" materials onto various sub-objects, with the composite set of materials created and updated automatically. The material indices are also assigned automatically, according to the sub-materials selected. We recommend that you use this method.

  • To begin, assign a material index of 1 to all polygons:

    • Context menu à Sub-objects à Polygon

    • Main menu à Edit à Select All or <Ctrl>+<A> key combination

    • Control panel à Surface Properties à Material à ID field à 1

Now define the materials. The main one will be used for the body of the spacecraft, but materials for the solar panels, portholes and the nozzle of the mid-flight engine are interesting as well. Materials for other, smaller details are not as important, except that they should adhere to the general style.

We looked at a lot of photographs of spacecraft and found that there are two main types of surfaces: bright and metallic (typical at the start of the space age), and dim white paint on metal. You can find the first type of material in the examples supplied with 3ds max (Apollo.max).

We recommend that you create a modern material, a white matte surface, with identification markings and a few other elements. Seams and rivets are out of the question, because they will never be seen. However, the skin of the spaceship is made up of metal sheets that cannot be painted absolutely evenly and, in addition to affecting color, reflect light at different angles and give a feeling of discontinuity. Let's create such a material:

  • Open the material editor and select any free preview window. Rename the material SpaceShip_Body.

  • Use the image in  ship_body-diffuse.tga as the texture for the Diffuse channel, and the image in  ship_body-gloss.tga for the Specular Level and Glossiness channels (Fig. 2.15, a).

    click to expand
    Figure 2.15: Texture assignment (a) and parameters of the Diffuse channel (b)

There are two ways to do this. The "traditional" one uses the Material/Map Browser in the material editor, the other uses the Asset Browser. In the first case, simply click the button next to the corresponding parameter, select Bitmap and load the file. In the second case, launch the browser:

  • Control panel à Utilites à Asset Browser

click to expand

Find the file and drag it onto the corresponding button.

Now let's consider the images contained in these files.

Even though the image in  ship_body-diffuse.tga has a white background, we are not going to use the coloring, because it is more convenient to control the color with 3ds max. This file also uses the transparency channel (alpha-channel). Let's make use of that fact.

  • Switch to texture-editing mode and enter the parameters shown in Fig. 2.15, b..

Note 

In the Bitmap Parameters menu, set the Alpha Source to Image Alpha.

Uncheck the Premultiplied Alpha flag, because the texture was made in Adobe Photoshop with the usual transparency channel.

Select Summed Area in the Filtering group. This algorithm is rendered slower, but its smoothing effect is of higher quality than that of Pyramidal. This is especially important if you use the alpha channel.

Leave the rest of the parameters unchanged. Briefly, they are used as follows. The Mono Channel Output parameter specifies what part of the image will be interpreted as monochrome, e.g., when the texture is transparent or represents a Bump. On the other hand, the RGB Channel Output parameter enables you to choose the part of the image that should be in color. The Cropping/Placement group allows you to trim and position the image.

The  ship_body-gloss.tga file does not use the alpha channel. As you can see, it simply contains the "sheets of metal" of which the body of the spaceship is built. In addition, darker areas correspond to identification signs and elements applied to the Diffuse texture. This is done to create the illusion that the signs were made with another color on top of the main paint.

We will consider the rest of the parameters later. Right now, we must assign a material to the objects comprising the body of the spaceship and orient the textures.

  • Switch to polygon-editing mode:

    • Context menuà Sub-object à Polygon

  • Progressively select the polygons constituting the body of the spaceship by holding the <Shift> key (Fig. 2.16).

    click to expand
    Figure 2.16: Polygons that will use the SpaceShip_Body material

    Tip 

    If you work with Editable Mesh objects, it is often convenient to check the Ignore Visible Edges flag in the Control panel. This will allow you to select several polygons simultaneously, if the angle between them is less than the Planar Threshold. Unfortunately, there is no such option when working with Editable Poly objects. However, in both cases, you can easily select polygons in side projections with the Crossing method. See details in Lesson 12.

    It can also be useful to highlight the selected polygons by pressing the <F2> key: They will be shown in red.

  • Apply the SpaceShip_Body material from the material editor to the selected polygons, or simply press the Assign Material to Selection button.

    Test the rendering by pressing the <F9> key. As you can see, the material has been applied to the spaceship, but it looks strange. The problem is with the texture coordinates.

  • Use the UVW Map modifier without deselecting the polygons:

    • Control panel à Modifier List à UVW Map

    Note 

    There are many ways to access commands in 3ds max. For example, UVW Map can also be found at Main menu à Modifiers à UV Coordinates or at Tab panels à Modifiers. From here on, we will not stick to a single method, but will use the most convenient one in each situation.

    The Tab Panel and Floating Toolbars deserve special attention. 3ds max is constantly evolving toward greater convenience. These panels appeared in 3D Studio MAX 3, and the ability to edit their contents was, undoubtedly, a step in the right direction. 3ds max 4 has since introduced more options, such as editing the Quad Menu and Main menu, making the toolbars less useful. Do not hesitate to use them if you like but, in the future, we will refer to them only when necessary.

  • Activate the Smooth+Highlight viewport by pressing the <F3> key.

  • Show the material in the viewport:

    • Material editor à Show Map in Viewport

    Note 

    When the Diffuse texture uses the alpha channel, sometimes the viewport displays the material incorrectly. If so, temporarily switch it off in the Diffuse texture's parameters, but do not forget to reselect it later.

    click to expand

  • Set the UVW Mapping parameters shown in Fig. 2.17 in order to get the right image.

    click to expand
    Figure 2.17: UVW Mapping parameters for the spaceship body

    Explanation 

    We deliberately made the textures inaccurate, so that you could become familiar with the UVW Map modifier.

  • Select Cylindrical mapping for the texture.

  • Select the Gizmo and rotate it along the longitudinal axis so that the exhibition's logo is visible:

    • Context menu à Sub-object à Gizmo

    • Context menu à Rotate

  • Try different values for recurrence on the U axis until the logo is round.

We will now set the final material parameters. In order to do so, you will need to determine approximately where the camera and sources of light will be located.

First, get rid of the Ambient light, because we don't need it:

  • Main menu à Rendering à Environment à Global Lighting à Ambient à Black

There are two main sources of light in our scene. One of them simulates sunlight — very bright, giving contrast between lit and unlit areas. The second simulates light reflected by the Moon — dimmer and softer. Light from distant stars pales in comparison with that from the Sun and Moon and will not be used as a source of illumination. In our example, the Earth is almost in line with the Sun and therefore will also not be used. It is much more important to consider the light reflected off various parts of the spaceship onto other constituent elements. To that end, we suggest you use several low-power point sources.

Note 

It may seem that ambient light could be used for that purpose. Such light uniformly highlights objects from all sides. Unfortunately, because it highlights all objects without exception, it cannot be used in our scene.

  • Create the camera and sources of light as shown in Fig. 2.18, a:

    • Tab panel à Lights & Cameras

    click to expand
    Figure 2.18, a: Camera and light-source positions

    Explanation 

    Since both the Sun and Moon are a great distance from the spaceship, their rays are considered parallel. Therefore, the type of source is parallel (Direct). You can use either a Free Direct or Target Direct source in each case; we prefer the second type. By making the center of the lit object the target, it is easy to move the source without being afraid that the object will no longer be illuminated.

    Shine the beam of light so that the whole object is lit, but not more. This is easy to do using the view from the light source (<Shift>+<4> keys) and the Light Hotspot and Light Falloff tools. If there are several directional light sources in the scene, 3ds max will ask you to select one from a list.

    Note 

    You will need to test the rendering many times while choosing the light and material parameters. If your computer is powerful enough, interactive rendering (Viewport context menu à Views à ActiveShade) in one of the viewports can be extremely helpful. Unfortunately, it does not react to all changes in the scene. You may want to use the Initialize command in the ActiveShade context menu on those occasions.

    Tip 

    While adjusting an object's parameters (e.g., a source of light), you often have to select and move other objects. To avoid having to reselect the original object sev-several times, you can Pin its parameters on the control panel with the Pin Stack button.

  • Rename the sources of light as Direct01_Sun_SpaceShip and Direct02_Moon_SpaceShip. Such long names are needed to avoid ambiguity when selecting objects by name, as there will be at least five light sources in the spaceship flight scene: three for the Sun and two for the Moon.

  • Parameters for Direct01_Sun_SpaceShip and Direct02_Moon_SpaceShip are shown in Fig. 2.18, b and c, respectively.

    click to expand
    Figure 2.18, b and c: Parameters of light imitating the Sun (b) and the Moon (c)

    Explanation 

    You can leave the moonlight white, but the color of the sunlight should be given a yellow cast. To change the color, adjust the HSV (Hue-Saturation-Value) representation, wich allows you to work with understandable terms, such as "light yellow" and "bright red."

    Light in space is very bright due to the absence of an atmosphere, making the border between lit and unlit areas very sharp. Furthermore, since the Sun is so far away and its angular size is so small, its shadows are similarly very sharp. These characteristics are simulated by the Multiplier, Contrast, Soften Diff. Edge, and Ray Traced Shadows parameters of the Direct01_Sun_SpaceShip light source.

    Moonlight is not as bright and softer and, since its angular size is so large, it can not be treated as a point source of light. We suggest your shadows be of the Shadow Map type. Select values for Size and smoothing (Sample Range) so that they are a little bit blurred and do not have any "steps." In the process, you will need to test the rendering many times using the <F9> key. ActiveShade can not display such subtlety. We also selected the Absolute Map Bias flag to prevent the shadows from shaking during animation, which is typical for those of this type.

    Try adjusting the light parameters for yourself. You will undoubtedly notice two more shadow types: Advanced Ray Traced and Area Shadows. These types appeared in 3ds max 5, and are based on the Ray Traced algorithm. The first type enables you to blur shadow borders, whereas the second is used to obtain so-called Soft Shadows. The results of these algorithms are extremely realistic, but require considerably longer to render. If that is not an issue, then experiment with them — "soft shadows" usually work quite well for the moonlight. You should be aware that shadows of this type sometimes cause strange artifacts to appear on object surfaces — blurred lines along objects' ribs. This is because the shadows are being drawn in front of the object. The solution is simple: the shadow's Bias should be a quarter more than the Spread.

  • Place several omnidirectional (Omni) point sources of light around the body of the spaceship (Fig. 2.19, a), copying each one as an Instance of another. This will give you the ability to edit the parameters for all of them simultaneously. Use a small Multiplier and pale-blue color. Also, turn off shadows and Specular surface reactions to the light (Fig. 2.19, b).

    click to expand
    Figure 2.19: Additional sources to simulate light reflected by various parts back onto the spaceship— positioning (a) and parameters (b)

Generally, adjusting light parameters is laborious and largely a matter of personal preference. If you do not like our result, feel free to adjust them as you see fit. Also, do not forget that we have not finished with the material parameters yet. It is time to return to them.

As mentioned before, the composite material created by the "drag and drop" method is created and automatically updated as sub-materials are added. Let's verify that this is true:

  • Open the material editor and select any free preview window.

  • Load the spaceship's material using the "dropper" (Pick Material From Object).

As you can see, it consists of two sub-materials: the one used in the beginning (SpaceShip_Test) and the current one (SpaceShip_Body) (Fig. 2.20). Rename the composite material as SpaceShip and edit the SpaceShip_Body sub-material by pressing the button.

click to expand
Figure 2.20: SpaceShip composite material

Note 

Atternatively, you could edit the SpaceShip_Body material through the corresponding preview window (Material Slot). Changes will be reflected in the composite material because the materials are linked.

In order to see the result of your changes without rendering, set the light in the preview windows to correspond to the light in the scene.

  • Open the material-editor settings with the Options button.

  • Make the color and multipliers of the light sources match the parameters of the Sun and Moon (Fig. 2.21). At the same time, activate the BackLight.

    click to expand
    Figure 2.21: Making the sources of light in the material editor match those in the scene

Now the working model looks similar to what will be seen after rendering.

Tip 

If your computer is powerful enough, you can open a larger preview window with the Context menu à Magnify command, or double-click on the current preview window.

And so the magic begins! Although not complicated, our only difficulty was in the unusual nature of our lighting conditions and we spent about an hour looking at the alternatives. That is enough for this lesson, but further refinements could be made with additional textures or the use of another Shader. Still, we managed to obtain an acceptable result with the parameters shown in Fig. 2.22.

click to expand
Figure 2.22: Parameters of the SpaceShip_Body material

Explanation 

We never changed the Shader to be anything other than the Blinn type. You can try other ones, e.g. Oren-Nayar-Blinn, for finer control, but they are also more complicated.

We made the Ambient light black even after we specified to Unlock it from the Diffuse light. That measure was more preventative than practical. We did not use the Ambient Light, so its parameters would not affect anything.

We made the Diffuse light the same color as the Specular light — white.

Several light parameters depend on the Specular Level and Glossiness channels of the textures. We set the Specular Level to 150 for demonstration purposes only. When textures are used that have a channel with the Amount equal to 100 or more, 3ds max ignores all the base parameters of the material. You can see this for yourself by changing the Specular Level — the material will appear the same.

Now let's look at other materials. First of all, make the material for the ends of the propulsion module:

  • Copy the SpaceShip_Body material by moving it into any preview window.

  • Rename it SpaceShip_Back.

  • Deactivate all textures. You can do this by applying the None texture type from any blank texture button, or switch to texture-editing mode, press the Bitmap texture button and select NONE in the material and texture browser.

  • Change the material type from Standard to Blend by clicking on the appropriate button.

  • Save the current material as a sub-material.

  • Rename the new material SpaceShip_Back_Blend.

  • Use the image in  Ship_body_back-mask.tga as a mask for material blending.

    click to expand

  • Go back to editing the SpaceShip_Back_Blend material:

    • Material editor à Go to Parent

  • Swap materials 1 and 2 so that they are in the right place. The material should be as shown in Fig. 2.23.

    click to expand
    Figure 2.23: SpaceShip_Back_Blend material structure

    click to expand

  • Edit the first material, rename it SpaceShip_Back_Metal, and set its parameters according to Fig. 2.24.

    click to expand
    Figure 2.24: SpaceShip_Back_Metal material parameters

    Explanation 

    Select the Strauss shader type. This type enables you quickly to create simple materials simulating plastic and metal.

    Set the parameters so as to have a metallic shine. You may want to deactivate the final resulting image temporarily in the preview window by pressing the Show End Result button.

    Apply the  ship_body_back-bump.tga file to the Bump channel. Since this image is in black and white, you must make the Amount negative in order to obtain protrusions and not indentations.

    Edit the second sub-material and reduce its Specular Level. To navigate between sub-materials and textures, it is often convenient to use Go Forward to Sibling.

  • Use the Edit Mesh modifier and select the polygons corresponding to the end surfaces as shown in Fig. 2.25, a.

    click to expand
    Figure 2.25: Polygons comprising the end surface of the propulsion module (a) and parameters of the UVW Map modifier (b)

  • Assign the SpaceShip_Back_Metal material to those surfaces.

  • Maintain the same selection and apply the UWV Map modifier with the parameters shown in Fig. 2.25, b. Everything should be self-explanatory. The only remaining option is to Fit the modifier's Gizmo more precisely on the surface.

The last material with a texture from a raster file is the one for the solar panels — Lessons\Lesson02\scenes\ship-cell.tga. As you can see, the texture is very simple: It consists of a black rectangle with white edging 1 pixel wide. 3ds max also has a standard texture type called Bricks that is used to create excellent regular textures (Fig. 2.26). We often use it and it would work well in this case. You might want try it, but we recommend using the raster file instead. It renders faster because the processor does not have to generate the texture and, more importantly, rendering with a raster file is more predictable.

click to expand
Figure 2.26: Examples of Brick textures

  • Select a free preview window and rename the material SpaceShip_Cells.

  • Make the type of shader Strauss, although in this case it is not very important and any other would do.

  • Use the raster file specified above for the Color channel (Diffuse, if another type of shader is used) and  ship-cell.tga for the Bump channel (Fig. 2.27, a).

    click to expand
    Figure 2.27: SpaceShip_Cells material parameters (a) and how it appears in the zoomed preview window (b)

  • Check the Face Map and Faceted flags in the material parameters. Note how the material image changes in preview window (Fig. 2.27, b).

    Explanation 

    The Face Map flag applies the texture to every polygon. In our case, this is a very useful feature. For this reason, we recommended you create the solar panels from strongly segmented blocks. You can also achieve this by simply increasing the Tiling of the texture, but there is another reason to use this flag, which will be considered in Lesson 5.

    The Faceted checkbox keeps the individual facets on surface of the object.

  • Select the polygons corresponding to the surfaces of the solar panels and assign the SpaceShip_Cells material to them.

At this point, we think you can create the rest of the materials and assign them to the corresponding parts of the spaceship on your own. We will only make a few notes here:

  • Try to name the materials reasonably. It is not necessarily that they are as long as ours, but you should be able understand them.

  • Materials for one-sided surfaces (those that have no thickness, such as the aerials) should be double-sided, with the 2-Sided flag set in the parameters of the material. (Don't confuse it with the DoubleSided composite material, which is completely different!)

  • For some materials, it would be a good idea to assign a large texture of standard Noise type as the Diffuse texture, and blend it with the Diffuse color by setting the Amount parameter to approximately 10. By default, standard texture types are defined so that they do not need texture coordinates to be assigned. Keep in mind that you are working in millimeters and, although the units are not displayed in the material editor, standard textures use them. So it is up to you to set reasonable dimensions in comparison to the size of your spaceship.

  • There are 24 preview windows in the material editor and it is quite possible that you will run out of them. Beginners tend to get very upset with this, and often address their dismay to various fora. The solution is simple: select any material and press the Reset Mtl/Map to Default State button. Then select Affect only mtl/map in the editor slot? in the window that appears (Fig. 2.28). There is also another way to do this: You can create a new material and substitute an existing one with it in the material editor by pressing the Get Material button and selecting the type of New material or texture.

    click to expand
    Figure 2.28: Reset Mtl/Map Params window

  • In order to select polygons easier, it is often convenient to hide the polygons that have already been assigned a material. Once you have finished assigning materials, don't forget to unhide them:

    • Control panel à Selection à Hide, Unhide All (for Editable Mesh)

    • Control panel à Edit Geometry à Hide Selected, Unhide All (for Editable Poly)

  • It is also useful to hide the camera and light sources while you are working:

    • Control panels à Display à Hide by Category

    click to expand

  • When you are done, minimize the stack of modifiers and convert all objects to an Editable Mesh or Editable Poly. It should be noted that the second type is not very stable and may present surprises, so, after everything else is done, we recommend that you convert the objects to an Editable Mesh:

    • Context menu à Convert to à Convert to Editable Mesh, Editable Poly

  • Save your work to the lesson02-final.max file.



 < Day Day Up > 



Advanced 3Ds Max 5[c] Modeling and Animating
Advanced 3Ds Max 5[c] Modeling and Animating
ISBN: 1931769168
EAN: N/A
Year: 2005
Pages: 136

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net