3D Studio MAX R4 - T4 - Materials |
| Stephen Peter, S.Peter@unsw.edu.au | |
| Introduction | Image from model by
Sook Hwai LEE.
|
| This tutorial will introduce Materials. You will open an existing model and then add materials to the objects. Once you've logged-on start 3D Studio MAX. | |||
| Open Sesame |
|||
| There is a proverb that goes something like
"risk only what you can afford to loose"
- it has many meanings ranging from Love to Money,
but it also applies to using computers!!! MAX has an "autosave" setting and I suggest that you use it! From the Customize menu, select Preferences... and the click on the Files tab. In the File Handling section make sure Increment on Save is checked. In the AutoBackup section make sure it is Enabled and set the Backup Interval to (for example) 5 minutes. To find out where the autosave files are stored select Customize and then Configure Paths.... My installation puts them in the AutoBack folder under MAX. If MAX crashes, copy the most recent |
Select Open from the File menu, change the drive to Resources on 'Emuwater' (R:), then choose Samples, benv, & 3D Studio MAX, finally select tut4.max and click on Open. Once you've opened the file, save it, using File - Save As...!! | ||
| If you don't have access to "Resources on Emuwater" - that is, if you're not at UNSW - right-click on the link tut4.max and save the file. | |||
| The scene also uses 2 images as magazine covers (on the coffee table), either substitute new images (I explain how later) or copy the images (by right-clicking on the links and selecting "Save Target as..." or similar) elle0693 and elle0793, place them in the same folder as the MAX file. | |||
| This file contains an almost complete model of a simple interior; but, as you can see, without the proper materials it doesn't look like much! | |||
![]() Figure 1 Plan. |
|||
| Let there be Light... |
|||
| Before we add the materials we must first put some lights in the space! | |||
| General Lighting | Firstly, we'll put general lighting and then we'll place some wall lights. | ||
| In the Right View you should see four semi-circular shapes; these are the light fittings in the spaces. Use Select by Name to select the 4 "Light Main" objects, then (using the Display tab) hide the unselected objects. | |||
| We will now insert lights into these fittings. In the Create tab, click on Lights and then Omni. Place an omni light inside one of the fittings - you will need to move it up or across depending on which View you use - don't use the Perspective View!! | |||
| After placing the light, zoom-in and to make sure the light object is - more or less - centred inside the fitting. One way to zoom-in easily is to select the Light fitting and then use "Zoom Extents All Selected". | |||
| Ray Traced Shadows
will make sure the light passing through the light fittings is modelled (more) correctly. When you do the zoom-all you will probably note that the exterior is quite dark! This is simply because, as yet, we haven't placed any lights outside the space. |
You'll need to set some of the parameters: in the Modify command panel, in the Attenuation Parameters rollout set Far Attenuation, Start value to 3500 and End value to 10000 and tick the Use checkbox under Far. In the Shadow Parameters rollout, make sure Object Shadows is ticked On, then change the shadow type from "shadow mapped" to Ray Traced Shadows. | ||
| After placing the first light, place instance-copies of the light inside the other three fittings, then fine-tune the position of the lights. Finally, unhide the rest of the model and do a zoom-all. | |||
| Wall Lights | If you look carefully, you'll see a number (5) of brown blobs on the walls, these are light shades. Put an omni light in one of these light shades - it will require a bit of fiddling to get it inside the shade. Set the Far attenuation to start at 80 and end at 2000, and check that shadows are turned ON, and Ray Traced Shadows are the set shadow type. | ||
| Check the position by zooming-in in both the Top and Front (or Left) views to make sure the light is inside the shade. | |||
| Then (instance) copy the omni light into the other wall mounted light shades! Once you've instanced the lights, zoom in to check the lights are centred inside the shade. Remember to check that the height is correct... | |||
| We live in a Material world |
|||
To assign a material to an object, select the object, select the material, and then click on "Assign Material to Selection". |
Now, the fun begins! Select Material Editor from the Render menu (or type M). You'll see a group of coloured spheres at the top and a swag of parameters down the bottom! The gray coloured spheres are "unused". Click on the first unused sphere, MAX will draw a border around it (to highlight it). | ||
Press the Select button after picking the objects. |
Click on Select by Name (from the main toolbar, not the Material Editor), then select Bedroom01 and Bedroom02. Click on Assign Material to Selection, hopefully the border on the sample sphere will change to include filled triangles at each corner - this is how VIZ displays materials that have been assigned to objects. | ||
| In the Blinn Basic Parameters rollout, click on the gray coloured rectangle to the right of Diffuse, a colour selection dialog will be displayed - choose a colour - then click Close. | |||
| When using
"Select by Name" the Shift key is used to select adjoining
items and the Ctrl key to select |
This process has assigned a "flat" colour to an object. | ||
| Use Select by Name to select the North Wall and South Wall and then assign the (same) material to them. | |||
| Glass creating a material... |
In the Material Editor. Select the next gray (empty/unassigned) material, change the Shader Basic Parameters setting from Blinn to Phong. Set the Diffuse colour to Black. Set the Opacity to 25. Set the Specular Level to 80. Set the Glossiness to 60. This will create a reasonable glass material. | ||
| Some explanations...! The Diffuse component controls the colour of areas receiving light, by setting it to black we are saying this material is without colour. Reducing the Opacity introduces transparencey into the material, setting it to 0 (zero) would make the object totally transparent (and so, close to invisible). The Specular Highlights section controls the "shiny" areas of the material. The higher the Glossiness the "sharper" the reflection. | |||
| When we created the Balcony in tutorial 3, I neglected to get you to "restructure" the Balcony objects. In the MAX file you loaded with this tutorial this has been corrected. The glass has been grouped into "BalconyGlass" and the frames into "BalconyFrame". | |||
| Use Select by Name to select [BalconyGlass] then click on Assign Material to Selection (in the Material Editor). | |||
| Before continuing, it would probably be a good idea to save what you've done! | Now that the windows are Glass it would be possible to rotate the perspective view so that you're looking into the space - from the "east" - and then render the view... | ||
| Timber If you render the scene now, you will see an error message! This is because the kitchen/dinning floor, was created using Boolean, and so MAX wants you to specify how the material is to be mapped. We will fix this later! |
Click on the next empty material sample and then Get Material. From the bottom of the list select Wood_cedfence (Standard). Use Select by Name to select [Steps], Dinning Floor, Floor Hall and Living Floor. Once you've selected the floor, go back to the Material Editor and select Assign Material to Selection to make the floor timber. | ||
| Cameras |
|||
| To really get the idea about how a space may look, you need to get inside the space(!) and to do that you need to create cameras! | |||
|
|||
| To insert a camera, click on the Camera icon in the Create command panel and click on the Target button. Move the cursor (in the Top view) to where you'd like the camera and then drag in the direction that you want the camera to look. You should notice (in the Front or Left views) that the camera is "sitting on the floor" and looking along the floor! | |||
| Click on Select and Move then move the camera and target point up - be careful that the cursor is the "move" cursor (which looks like a cross with arrows on each arm). | |||
| This technique can be used to change any of the views, for example you can change the Front view into a Back view! | Once you've set both positions, Right-Click on the label of the Perspective view, choose Views and then Camera01. This will change the perspective view into a camera view. Render the Camera01 view! | ||
| Scaling Materials |
|||
| The timber, as it is, appears too large when rendered, so we need to scale the material! To do this correctly, you need to study the material to determine its "size" and base the scaling on that information. | |||
| Bring up the material editor (if you've closed it); and if necessary, click on the timber material. Notice the material's name is listed as Wood_Cedfence! | |||
The M stands for "map" which is short for "texture map"! |
In the Blinn Basic Parmaters rollout, notice the small button with a M, beside the Diffuse colour... click on the button. This has the effect of selecting the material map associated with the diffuse colour and displaying its properties. Notice that the name listed (where the material name was) is now Map #1 (or similar)! | ||
| Look for the Bitmap Parameters rollout... within the Cropping / Placement section is the View Image button - click on it! | |||
| Many of the materials in MAX are simply pictures that are "tiled" over an object to create the effect of an object with a particular material. It is possible (and in-fact very easy) to replace the "standard" picture with a new one and thereby create a new material! | The key issue with making materials look believable is working out the size of the "object" in the image. You should be seeing a picture of 10 floor boards. If we assume each board is 100mm wide, then the whole view is 1m wide! Armed with this understanding of the "true" physical size of the material map we can calculate the correct scaling. | ||
| This image is simply "stretched" over the object using this material, so if the object is about 1000 wide the material will look OK, if on the other hand, the object is 4000 wide the material will look oversized. This is the situation with the Living Room floor. | |||
| Select the floor either by clicking on it or by using Select by Name. | Select the living room floor and click on the Modify tab in the Command Panel. Note the width of the box (the floor) is 5200mm. Uncheck Generate Mapping Coordinates - at the bottom of the Parameters rollout - because we're about to explicitly set the mapping... | ||
| So, in short, the technique is: (1) calculate the key dimension of the material image, (2) calculate the equivelent dimension of the object, and (3) divide "2" by "1" and the result is the tile setting! | Click on the Modifier List and select UVW Map button in the UV Coordinate Modifiers rollout. Change the U & V Tile settings in the bottom of the Mapping rollout to 5. | ||
| Re-render the camera view and you should see that the floor now looks like the floor of a space about 5m wide! | |||
| Have you saved recently? | Repeat this process for the Dinning Room floor, once this is done, the annoying message about this object requiring map coordinates will disappear! | ||
| Finishing... |
|||
| Create a few cameras in the space - looking in various directions... | |||
| Select them either by using Select by Name or by picking them! | Apply materials to the other objects in the scene! Either use a 'flat' colour by altering a sample material's diffuse colour or pick a sample material from the material library. | ||
| The second material is called "Magazine2". | At the beginning of this tutorial, the 2 image files on the coffee table were mentioned.
It was suggested that you could copy or replace them. If you want to repace them,
copy your replacement |
||
![]() |
|||
| Last Update :
Major Revision : 17 April 2002 SEARCH . FBE SITEMAP |
Disclaimer
. Webmasters Page Contact : Stephen Peter Email : S.Peter@unsw.edu.au |