sábado, 8 de outubro de 2011

[Tutorial] Modelar um edificio em 3DS Max Design (2º Parte, Inglês)

Este tutorial apresenta uma forma muito simples e eficaz de modelar um edificio em 3ds Max Design.

Começemos pela 2ª parte do Tutorial que explica a iluminação e mapeamento dos objectos.

(Veja a 1º Parte)


In this second part of the tutorial we will look at lighting the scene, texturing the model and rendering an image using 3ds max. We’ll use a mental ray daylight system and mr sky portals for the lighting, use photoshop to create tileable textures and I’ll show you how to create an ambient occlusion pass to lay over the render to bring out detail shadows.


Daylight system

Go into the tools toolbar and click “Daylight system”, it will ask you a few questions, answer yes to them. Now click anywhere in the top view to place the sun, it doesn’t really matter where you put it but it’s important you rotate the compass because that defines the orientation of your scene.

Viewport lighting

In the perspective view you will see some text, right-click the text next to the [perspective] and activate the properties as shown in the screenshot. This will give you real time lighting in the viewport but remember that this will demand more from your computer and it all depends on your graphics card so turn it off after you’ve positioned the sun. This feature will give you some feedback to position the sun.

Date and time

When you select the sun you’ll see a button “setup”, if you click it you can set up the time,date and location if you’re working with real life location. 

You can choose manual controls, realistic sun angle based on location and time and a weather data file. 


When you render this (F9) you’ll notice that the direct sunlight is okay but the floor near the camera is very dark. To let more indirect light in through openings we’ll use sky mr portals. A sky portal collects the direct light from its environment and sends it in a direction. 

Sky portal

Go to the create – lights – photometric panel and select mr sky portal. Now draw one large sky portal in the front view. No you’ll probably have to reposition it in front of the building. 

Sky portal position

It’s important that the sky portal is outside and the arrow is pointing to the interior.

Roof lights

Now do the same for every roof window. When you select a sky portal there is the multiplier option, the default is one but you should try out a couple of values . I used a value of 10 for every sky portal but we’ll have to change them once we’ve got it textured because the interior will look darker if we put in a lot of dark textures but for now this will do. 

Test render

You’ll notice when we render again it looks a lot lighter but the render time also increased! That’s about it for the lighting, daytime scenes are fairly simple as long as you remember to use the sky portals. Next step is texturing. I will show you quickly how I made the textures in photoshop but I won’t explain every button in photoshop, the emphasis of this tutorial is on the 3ds max part. 

Tileable pattern

I drew a basic tileable pattern in photoshop. You can create potoshop guides by clicking on the ruler and dragging them into your image, you’ll notice the guides snap to the middle. After drawing the pattern select all layers and hit CTRL + E, this will flatten the image. Now select the entire image and go to edit -> define pattern. Now create a new image and make sure it’s a multiple of the pattern resolution. For example If your pattern was drawn as a 500x500 image create a new image of 2500x2500 pixels. 

Adding concrete

I filled a new image with the pattern and copied a couple of non tileable concrete textures into the image. You’ll have to transform (Ctrl + T) them a bit to make them fit until you’ve got something like the screenshot. I’ve used about 5 different concrete textures because I wanted different panels. 

Bump map

Now save the texture as a jpg. In photoshop go to image-> adjustment -> levels. In the levels dialog you can drag 3 pointer, drag the upper pointer down en the lower pointer up until you’ve got a very high contrast. Save this image as a jpg, this will be our bump map. If you have color in your texture make sure you desaturate because bump maps are grayscale. 


I found a very basic tileable woud texture on the internet without bump map. I opened the image in photoshop and adjusted the levels again and drew black lines on where the planks end to create more depth. The floor will be a pretty basic tile floor. 

Material in 3Ds max

Now we will apply the textures. Hit M to opend the material editor in 3ds max. Use the basic arch & design (mi) template and under diffuse – color hit the slot and select bitmap. Now select the concrete texture. 

Now the material editor will show you the properties of the texture and click the show material in viewport button… this will make sure you can see the texture on your model and how it’s positioned. Now under special purpose maps select bump, use the concrete bump map and give it a value of 0,7. 


Now apply the texture on the main building by dragging it. It will look like the screenshot, that’s normal because the software doesn’t know how you want to apply the texture or how big it is. 

UVW modifier

Select the main building and apply a UVW mapping modifier.

UVW settings

Under the UVW mapping properties select BOX as mapping type and uncheck real-world map size. Now you can fill in the length, width and height values. I want my panels to be 75 cm wide and 150 cm long. My texture is 6 panels wide so that means my texture represents 450 cm x 450 cm so I fill in 450cm for every value. 

UVW gizmo

Now in de modifier list click on the plus sign next to UVW mapping and then click on Gizmo. Hit F3 to change the view to wireframe, you’ll notice there is a box in your model, the box is 450x450x450 and if you’ve got the gizmo selected you can transform it, play around with it to see the effect. 

I’ve changed one of the viewports to the camera view to see the effect. 

Rotate gizmo

I have rotated the gizmo 90 degrees and you’ll notice the panels are now horizontal. I’ve moved the gizmo to line up the textures with the building. 

Test render

After a test render I noticed the bump map was too strong so I changed it 0.6 . And turned off the reflectivity . I change the sky portals to a value of 12. Now the wood texture is the same process as the concrete but I used a bump map value of 0,3 and uvw mapping of 140 cm. It’s still a bit dark but I’m going to wait until I apply the floor texture because that will define how much light gets reflected. 


Go to the render dialog (F10) and change the diffuse bounces to 4, if rendering takes too long lower this value… this value defines how much a ray of light bounces of the walls. Now render the image to a decent resolution, I used 1600x1200 pixels. 

Photoshop adjustments

In photoshop I changed the levels of the render to create some extra contrast and lighten it up because we will be adding shadows.

New material

Create a new material, select the mental ray template. 

Hit the Surface map button and select ambient/reflective occlusion. This material will generate shadows based on the distance between two surfaces, for example in a corner two surfaces are closer and this will generate a darker shadow. This technique doesn’t require a lot of computer power but it does bring out the details in a render. 

Ambient occlusion

Now in the material properties change samples to 64 ( this defines the quality), spread to 1,2 ( you could say this is the amount of shadows), max distance to 450 cm. 

Material override

Go to the environment and effects menu ( !/8 key) and disable use map and change exposure control to “no exposure control”. Go to the mental ray renderer processing menu (F10) and check material override enabled and drag the ambient occlusion material we made to the slot… this will override all the materials in the scene and change them to this material. 

Render AO

Now render the image (F9). It should be all black and white. 


I changed the levels to add dramatic effect to the shadows. 


The Ambient occlusion layer is on top of the render layer, change the ambient occlusion layer to Multiply. Multiply means white parts don’t show but black shows so this will add the shadows to the render. Remember to save the renders to .png if you want a transparent environment… I added an extra background layer in photoshop as the environment. 

Final render

The source files contain: The 3D model (.max), concrete texture and bump map, the environment background photo and the final render. 

Para saber mais contacte-nos via datech@techdata.pt

Sem comentários: