Monday 24 July 2017

3D MOUNTAIN IN 3DS MAX

In this 3ds Max tutorial we’re going to create a simple 3d mountain. The mountain geometry will be created from a simple plane with the displace modifier and it will be textured with a combination of procedural maps. The image will be finalized by strong sidelight and some volumetric clouds. I’m using 3ds Max 2011 but many older versions should work just as well.

Step 1 Mental Ray Renderer

We’re going to render the mountain with the Mental Ray. By default 3ds Max uses the Scanline renderer so we have to change that. Change the renderer to the Mental Ray ( Rendering > Render Setup… > Common tab > Assign Renderer > Production > mental ray Renderer ).

Step 2 3D Mountain Geometry

Create a Plane ( Create panel > Geometry > Standard Primitives > Plane ) in the top viewport . Modify the Plane ( Make a selection > Modify panel ) according to the following parameters :
  • Length: 200
  • Width: 200
  • length Segs: 200
  • Width Segs: 200
Plane object in 3ds Max
We need a dense (80k faces) mesh because we’re going to deform it with the displace modifier and Gradient Ramp map. )

Step 3 Mountains with the Displace Modifier

Add Displace modifier to the Plane ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > Displace ) and apply the following parameters:
  • Displacement
    • Strength: 100
  • Image
    • Map: Gradient Ramp
Open Material Editor ( Rendering > Material Editor > Compact Material Editor ). Drag and drop the Gradient Ramp map from the Displace modifier into a material slot in Material Editor and select ‘instance’ when asked. Apply the following parameters to the Gradient Ramp map:
  1. Double click on the Flag #1 and change the color to white
  2. Double click on the Flag #3 and change the color to black
  3. Gradient Type: Radial
  4. Noise: Amount: 0,3
  5. Noise: Size: 6
  6. Noise: Turbulence
  7. Noise: Levels: 10
Displacement map design
Finally go to the ‘Output’ section, click ‘Enable Color Map’ and adjust the color map according to the picture below. ( to adjust a point, right-click on it and change it to ‘Bezier-Corner’ point. )
Color map curve in Gradient Ramp map
Tip: To adjust the small details of the mountain you can change the ‘ Phase’ in the Noise settings.

Step 4 Mountain Material

We’re going to create a snowcapped mountain with snow also at the base. The material will be created from scratch and it will use only procedural maps found in 3ds Max. We’ll utilize Gradient Ramp diffuse map to create color variations and Composite bump map to create lots of small scale details. So let’s select an empty material slot and create the material. You can just copy the settings from the picture or read the explanations below the picture.
Complex mountain material design
  1. Select the mountain and click ‘Assign Material to Selection’
  2. Diffuse Color: Gradient RampFlag #1: Color: RGB 180, 180, 180 Position: 0Flag #2: Color: RGB 180, 180, 180 Position: 15
    Flag #3: Color: RGB 100, 100, 100 Position: 22
    Flag #4: Color: RGB 100, 100, 100 Position: 39
    Flag #5: Color: RGB 180, 180, 180 Position: 49
    Flag #6: Color: RGB 180, 180, 180 Position: 100
    Click on the color gradient to add a new flag. Right-click on a flag to modify or delete it. )
    Gradient Type: Radial
    Noise Amount: 0,1
    Noise Type: Turbulence
    Noise Size: 1
    Noise Levels: 10
    It’s a good idea to make a test render now to see how the diffuse map looks like )
  3. Bump: Composite ( The Composite map is used to combine several maps together )
  4. Add Smoke map to the first layer of the Composite Map ( large scale details )Size: 5# Iterations: 20
  5. Add second layer to the Composite map. Change the blending mode to Addition and Opacity to 70. Add Speckle map to the second layer ( medium scale details )Size: 4Color #1: white
    Color #2: black
  6. Add third layer to the Composite map. Change the blending mode to Addition and Opacity to 60. Add Speckle map to the third layer ( small scale details )Size: 0,003Color #1: white
    Color #2: black
We combined three different maps to create large, medium, and small scale details to the bump map. This method produces more realistic bump map than a single map would. )
Make a test render to see how the 3d mountain looks like with the diffuse and bump maps. At the moment there are several problems with the rendered image:
  • The mountain looks really boring and flat
  • Sampling quality isn’t high enough for the small scale details
  • There are some unnaturally sharp edges in the outline of the mountain
Next we’re going to fix these issues.
Flat and boring default rendering
Tip. If you’d like to create vegetation to the base of the mountain you could change the color values of Flags 5 and 6 ( in the Gradient Ramp map) to green.

Step 5 The Lighting

Soon we’re going to create more serious renders so let’s create a camera. Create a Target camera ( Create panel > Cameras > Target ) in the top viewport and place it according to picture below. Right-click on the Perspective view and press C in the keyboard to change it to the Camera view.
We rely heavily on the bump map so we desperately need more interesting illumination for the mountain. Create ‘mr Area Spot’ ( Create panel > Lights > Standard > mr Area Spot ) in the top viewport, place it according to picture below, and apply the following settings to it.
  • General Parameters
    • Shadows: ON
    • Shadows: Ray Traced Shadows
  • Intensity/Color/Attenuation
    • Multiplier: 2,5
    • Color: RGB 255, 248, 221
    • These settings create really strong light with warm yellowish color )
  • Spotlight Parameters
    • Hotspot/Beam: 15,2
    • Falloff/Field: 17,2
    • Just big enough to cover the mountain. Increase values if needed. )
  • Area Light Parameters
    • Type: Disc
    • Radius: 250
    • the higher the value, the softer the shadows. If you do a high resolution render and experience graininess in the shadows you can increase the ‘Samples’ values to fix it )
mr Area spot and camera placement in 3ds max
Render your mountain to see the effect of the Mental Ray area spotlight.
Effect of strong sidelight
Now the left side of the mountain is completely black and it fades into the background. Let’s fix that by adding a fill light. Create ‘Omni’ light and place it to the left side of the mountain and apply the following setting to it:
  • Intensity/Color/Attenuation
    • Multiplier: 0,7
Render a test image to see the effect of the fill light. Move the Omni light if necessary.
Unpolished rendering with low sampling values
Compare this to the render in step 4 to understand the importance of lighting.

Step 6 More Polished Look

Next we’re going to increase the quality of the mountain geometry and adjust the sampling settings to get more polished render. Go to the render setup and increase antialiasing quality by increasing Mental Ray’s sampling values ( Rendering > Render setup… > Renderer > Sampling Quality ):
  • Samples per pixel
    • Minimum: 4
    • Maximum: 64
  • Filter
    • Type: Mitchell ( For most scenes the Mitchell filter gives the best results. )
Select the mountain, go to the modify panel, and add TurboSmooth modifier to smooth out the hard edges of the model. Render your mountain to see the effect of these adjustments.
Polished 3d mountain render

Step 7 Volumetric Clouds Around the Mountain

As a final thing we’re going to add some clouds around the mountain to create more depth and better sense of scale. Create four sphere gizmos ( Create panel > Helpers > Atmospheric Apparatus > SphereGizmo ) in the top viewport. Apply the following settings to the gizmos:
  • SphereGizmo001
    • Radius: 61
    • Hemisphere: YES
  • SphereGizmo002
    • Radius: 47
    • Hemisphere: YES
  • SphereGizmo003
    • Radius: 79
    • Hemisphere: YES
  • SphereGizmo004
    • Radius: 50
    • Hemisphere: YES
Place the gizmos according to the picture below. SphereGizmo001 is on the left and SphereGizmo004 is on the right.
Sphere gizmo placement in top and front viewports
Let’s go to the atmosphere settings ( Rendering > Environment… > Atmosphere ) to add some clouds:
  • Click ‘Add…’ , select ‘Volume Fog’, and click OK.
  • Gizmos:
    • Click ‘Pick Gizmo’ and click on the SphereGizmo001. Repeat for all sphere gizmos.
    • Increase ‘Soften Gizmo Edges’ to 1.
  • Volume:
    • Color: RGB 255, 248, 221 ( The same as in the spotlight )
    • Max Steps: 200 ( Increases the quality of the effect )
  • Noise:
    • Type: Turbulence
    • Size: 40
Just hit render and your 3d mountain image is complete. I made some small adjustments in Photoshop:
  • Smart Sharpen Filter
    • Amount: 40%
    • Radius: 0,5 pixels
  • Contrast
    • +25
Mountain scene rendered in 3ds Max
I hope you enjoyed it! I’d love to hear how the tutorial is working for you!

Thursday 20 July 2017

3D MONEY – MILLION DOLLARS

This 3ds Max tutorial covers the modeling and texturing of one million dollars. We’re going to create pack of 3d money, make many clones of it, and create huge pile of money with the help of reactor. I am using 3ds Max 2010 but this should be doable with many older versions as well.

Step 1 Ten Thousand Dollar Label

Create a Box ( Create panel > Geometry > Standard Primitives > Box ) in the left viewport and apply ( Make a selection > Modify panel ) the following parameters to it:
  • Length: 7,9
  • Width: 31
  • Height: 15,3

Step 2 Modify the Box with Edit Poly

Add Edit Poly modifier to the box ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > Edit Poly ). Activate Polygon sub-object level and delete two polygons according to picture below.
Modeling with Edit Poly

Step 3 Geometry for the 3D Money Itself

Create a Box ( Create panel > Geometry > Standard Primitives > Box ) in the top viewport and apply ( Make a selection > Modify panel ) the following parameters :
  • Length: 30,8
  • Width: 73,44
  • Height: 7.7
  • Length Segs: 10
  • Width Segs: 24
  • Height Segs: 8
( We need lots of segments to the money object to be able to deform it later )

Step 4 Align the Money with the Label

Select the box you just created and use the Align tool ( Tools > Align > Align… ) to place the box into the center of the first box like in picture below. In the Align tool, just select all axis and click ok. The center of the selected object will be placed to the center of the target object.
Money geometry in 3d studio max

Step 5 Money Textures

Now the geometry of the 3d money pack is complete and we need some textures to the surface. We need front and back sides of a hundred dollar bill and some bump maps to the sides. Fortunately there are high resolution money textures available at Wikipedia.

Step 6 Create the Bump Map in Photoshop or Click Here to Download

To make believable render we also need a bump map to the sides of the money pack. Bump map for this purpose is really easy to create in Photoshop:
  1. Create a new image with 1×100 pixel dimensions.
  2. Apply Noise filter ( Filter > Noise > Add Noise… ):
    • Amount: 60%
    • Distribution: Uniform
    • Monochromatic: On
  3. Apply another Noise filter ( Filter > Noise > Add Noise… ):
    • Amount: 75%
    • Distribution: Uniform
    • Monochromatic: On
The bump map is ready. Save the file in png format.

Step 7 Label texture

The last texture we need is for the label surrounding the money pack. Just create something like this in Photoshop or just use my texture.
Label texture for $10,000 money pack

Step 8 Texturing the Money

Now we have all the textures we need. Open Material Editor ( Rendering > Material Editor… ) and create material for the money:
Money pack material in 3ds max
  1. Select the 3d money object and click ‘Assign the material to selection’
  2. Material Type: Multi/Sub-Object
  3. Click ‘Set Number’ and set the number of materials to 4
  4. Material 1
    • Diffuse Map: Bitmap: 100 dollar bill front texture here
  5. Material 2
    • Diffuse Map: Bitmap: 100 dollar bill back texture here
  6. Material 3
    • Bump Map: Bitmap: Bump texture here
  7. Material 4
    • Bump Map: Bitmap: Bump texture here
      • Coordinates > Angle > W: 180 ( the idea is to flip the bump map vertically so that it appears different in adjacent sides, makes sense in the next step when we apply material IDs )
Notice that we aren’t t using diffuse maps in the materials number 3 and 4. Therefore the color of these materials will be gray ( the default Diffuse color ). It’s just a pure coincidence that the default gray is close enough to what we need. In fact, changing the Diffuse color of these materials might produce a tad more realistic material.

Step 9 Apply Material IDs to the 3D Money Pack

Add Edit Poly modifier to the pack of money ( Modify panel > Modifier List > Object-Space Modifiers > Edit Poly ), activate Polygon sub-object level, and apply Material IDs according to picture below. ( material IDs of top and bottom polygons should be ok by default ).
Setting material IDs for polygons

Step 10 Activate Super Sampling and Render a Test Image

Change the background color to white ( Rendering > Environment > Common Parameters > Background > Color ) and render a test image. Pay special attention to the bump maps. They are not that pretty. A good rule of thumb is to activate SuperSampling whenever there are reflections or bump maps in use. SuperSampling is an antialiasing technique that enhances the rendering quality. So let’s turn it on:
  • Rendering > Render Setup… > Renderer > Global SuperSampling
    • Disable all Samplers: OFF
    • Enable Global SuperSampler: ON, Adaptive Halton
    • Quality: 1,0
Now render another test image to see how the bump map quality ( and rendering time ) increases.
$10,000 render

Step 11 Texture for the Money Label

Next we’ll create a material for the the label:
  1. Select the label object and assign material to it
  2. Click ‘Show map in viewport’
  3. 2-Sided: ON
  4. Diffuse Color: Bitmap: money label texture here
Material editor in 3ds max

Step 12 Adjusting UVW Mapping of the Label

Now we can see the label texture in the viewport but there are some problems. The text is squeezed and repeated on each side. Let’s fix those issues with the help of a UVW Map modifier.
  • Add UVW Map modifier ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > UVW Map )
    • Mapping: Cylindrical
    • Alignment: Fit
    • Activate Gizmo level in UVW Map modifier and rotate the gizmo 180 degrees
Rotating UVW mapping gizmo

Step 13 Render a Money Picture

It’s time to render another test image to make sure texturing is good.
money image

Step 14 Increase the Realism by Deformations

At the moment the geometry of money pack looks too perfect ( common problem of many 3d renders ). Let’s deform it a little to make it more believable. Select the 3d money and add Wave modifier to it ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > Wave ). Apply the following parameters to the Wave modifier:
  • Amplitude 1: 0,5
  • Amplitude 2: 0,5
  • Wave Length: 15,2
  • Activate Gizmo level in the Wave modifier. Rotate and move the gizmo to get the result in picture below.
Using wave modifier

Step 15 Deform the 3D Money Pack Even More

Let’s add yet another modifier to the 3d money pack. Add FFD 3x3x3 modifier to it ( Modify panel > Modifier List > Object-Space Modifiers > FFD 3x3x3 ). Activate the Control Points sub-object level in the FFD 3x3x3 modifier and move the control points in the front viewport according to the picture below.
Using FFD3x3x3 modifier
Render the image to see the result. The effect of FFD 3x3x3 modifier is subtle, but still important step of the process.
money picture

Step 16 Render Digital Money

Now the $10,000 money pack is complete. Let’s make a proper render:
  1. Create a big white Plane under the 3d money pack ( Create panel > Geometry > Standard Primitives > Plane )
  2. Create a Skylight ( Create panel > Lights > Standard > Skylight )
  3. Change the SkyColor to pure white ( Make a selection > Modify panel )
  4. Activate Light Tracer ( Menu > Rendering > Light Tracer… ) and apply the following settings:
Global illumination settings in 3d max
Render the money image and this is what you get:
money image

Step 17 Create Million Dollars

Now we have $10,000 and next we’re going to turn it into a million dollars.
  • Select the money object, add Edit Poly modifier to it, and use the ‘Attach’ function to attach the money object to the label object.
  • Make a 99 copies of the money pack. You can clone an object by moving it while pressing shift in keyboard.
  • Place the million dollars according to picture below. Avoid overlapping. Make sure to rotate half of the money about 180 degrees. We want to final money pile to be as random as possible.
  • Create RBCollection ( Create panel > Helpers > Reactor > RBCollection ) and add all the money packs and the plane object to it. ( This is just a helper object that tells which objects are included in physics simulation as rigid bodies. )
Adding rigid bodies

Step 18 Make Time for Simulation

Go to Time Configuration and increase the animation length to 300.
Increasing animation length in 3d studio max

Step 19 Define Physical Properties

Next step is to define some physical properties for the 3d money objects and make the simulation.
  • Choose Havok 3 as reactor solver ( Utilities Panel > Reactor > About )
  • Set Col. Tolerance to 0,05. ( Utilities Panel > Reactor > Havok 3 World )
Reactor settings
In Properties section you can define physical properties of your objects. First you select object(s) and then you define the properties. It’s like the Modify panel.
  • Select the plane and turn Unyielding on (Utilities Panel > Reactor > Properties)
  • Select all the money packs and apply the following properties (Utilities Panel > Reactor > Properties)
Defining properties of rigid bodies

Step 20 Calculate the Simulation and Render Million Dollars

Save your scene. Change the end time of the simulation to 300 and click ‘Create Animation’ to calculate the simulation (Utilities Panel > Reactor > Preview & Animation)! After the calculation is done there are only two things left to do:
  • Choose the frame you want to render
  • There is most probably some overlapping between objects, so fix that by moving the objects.
  • Render the million dollars and your are done!
million dollars render
That’s it for today! Happy rendering!