3D Snow

07 Jan 2012

3D SnowIn this 3ds Max tutorial we’re going to create a 3d snow scene. The focus will be the snowy hills, snow on the branches of the tree, and snow flakes flowing in the air. Additionally we’ll learn about using fog, simple lens effects, and creating soft shadows. I’m using 3ds Max 2010 but many older versions should work just as well.

This post is a collaboration with Nicholas Mamo who had the idea for a 3d snow scene and who contributed the Particle Flow / BlobMesh setup (Steps 9-14).
Continue reading

Posted in 3ds Max Tutorial, Learn 3D by polygonblog


Abstract Background

28 Jan 2011

Abstract backgroundIn this tutorial we’re going to create an abstract background image in 3ds Max. It seems that bokeh backgrounds have been extremely popular during the last few years so we’re going to create one as well. There are many Photoshop tutorials available, but here I’m going to show you how to create bokeh background in 3ds Max. I think 3ds Max is perfect for creating abstract backgrounds because of it’s parametric nature. It’s really easy to change everything with parameters. I’m using 3ds Max 2011, but many older versions should work as well.

Step 1 Scanline Renderer

We’re going to render the bokeh effect with Scanline Renderer. If you are using mental ray renderer you have to change that ( Rendering > Render Setup… > Common tab > Assign Renderer > Production > Default Scanline Renderer ).

Step 2 Particle Cloud

Our abstract background will consist of two elements: particles and background. First, we’ll create the particles. I’m using Particle Cloud, but feel free to use Particle Flow if you want to. I think it’s just a little easier / faster to use Particle Cloud for our purpose here, because we don’t need any of those advanced features that Particle Flow has to offer. So let’s create a particle cloud in the front viewport ( Create panel > Geometry > Particle Systems > PCloud ). Select the particle cloud, go to the modify panel and apply the following settings:

  • Basic Parameters
    • Display Icon
      • Rad/len: 670
      • Width: 1200
      • Height: 900
    • Viewport Display
      • Mesh
  • Particle Generation
    • Particle Quantity
      • Use total: 500
    • Particle Timing ( We create all particles between frames -29 and 0 so that they are visible already at frame 0 )
      • Emit Start: -29
      • Emit Stop: 0
      • Display Until: 0
      • Life: 30
      • Variation: 0
    • Particle Size
      • Particle Size: 20
      • Variation: 100
      • Grow for: 0
      • Fade for: 0
    • Uniqueness
      • Seed: 704 ( Feel free to try different numbers here )
  • Particle Type
    • Standard Particles: Facing ( flat four sided polygons that will always face the camera )

Create a target camera ( Create panel > Cameras > Target ) in the top viewport. Right-click on the Perspective view and press ‘c’ in the keyboard to change it to a camera view. Position the camera target in to the middle of the particle cloud and the camera itself like in picture below.

Positioning the camera in 3ds Max 2011

Render your scene to make sure you get something like the picture below. I rendered with 700 x 438 px dimensions.

500 particles in the particle cloud

Step 3 The Particle Material

Next we’re going to create the material for the particles. This is the most complicated part of this tutorial, but don’t worry, nothing really hard here. Open Material Editor ( Press ‘m’ in keyboard ) and create the material for the particles:

  1. Select the Particle Cluod and assign the first standard material to it
  2. Face Map: YES ( map in material will be automatically applied to each face of the object )
  3. Diffuse: Light gray ( RGB 230, 230, 230) ( diffuse and ambient are locked by default so both will have this color )
  4. Opacity: 0
  5. Advanced Transparency: Type: Additive

Particle material's basic parameters

Apply an opacity map:

  1. Opacity Amount: 40 ( particle transparency )
  2. Opacity Map: Gradient Ramp ( Material/Map Browser > Maps > Standard > Gradient Ramp )
  3. Gradient Ramp Flags:

    Flag #1: Color: RGB 44, 44, 44 Position: 0

    Flag #2: Color: RGB 44, 44, 44 Position: 88

    Flag #3: Color: RGB 64, 64, 64 Position: 92

    Flag #4: Color: RGB 64, 64, 64 Position: 96

    Flag #5: Color: RGB 0, 0, 0 Position: 100

    ( Click on the color gradient to add a new flag. Right-click on a flag to modify or delete it. )

  4. Gradient Type: Radial

Gradient Ramp parameters

Let’s utilize Particle Age map to add some variation to the opacity of individual particles:

  1. In the Maps rollout, click on the ‘Gradient Ramp’ Map
  2. Click on the ‘Gradient Ramp’ again. ( Material/Map browser appears )
  3. Double-click on the ‘Particle Age’ map ( Maps > Standard > Particle Age )
  4. Select ‘Keep old map as sub-map?’ and click ‘OK’. ( Now we have Particle Age as opacity map and Gradient Ramp as a sub-map of Particle Age )
  5. Drag and drop the Gradient Ramp map from ‘Color #1 Map’ slot to ,Color #2 Map’ slot. Select ‘Copy’ when asked.
  6. Drag and drop the Gradient Ramp map from ‘Color #1 Map’ slot to ,Color #3 Map’ slot. Select ‘Copy’ when asked.
  7. Adjust the Gradient Ramp Flags in Color #2 slot:

    Flag #1: Color: RGB 66, 66, 66 Position: 0

    Flag #2: Color: RGB 66, 66, 66 Position: 88

    Flag #3: Color: RGB 96, 96, 96 Position: 92

    Flag #4: Color: RGB 96, 96, 96 Position: 96

    Flag #5: Color: RGB 0, 0, 0 Position: 100

    ( Click on the color gradient to add a new flag. Right-click on a flag to modify or delete it. )

  8. Adjust the Gradient Ramp Flags in Color #3 slot:

    Flag #1: Color: RGB 99, 99, 99 Position: 0

    Flag #2: Color: RGB 99, 99, 99 Position: 88

    Flag #3: Color: RGB 144, 144, 144 Position: 92

    Flag #4: Color: RGB 144, 144, 144 Position: 96

    Flag #5: Color: RGB 0, 0, 0 Position: 100

    ( Click on the color gradient to add a new flag. Right-click on a flag to modify or delete it. )

Particle Age parameters

Now infant particles are darker / more transparent than particles that have some age. The effect of the Particle age map is not drastic but in my opinion necessary to get some variation to the opacity and brightness of individual particles. Render your scene to make sure it looks similar to picture below.

Bokeh particles for abstract background

Our abstract bokeh background doesn’t look like much yet.

Step 4 Abstract Background Material

The next step is to create the environment (background) map for our image. Open Material Editor ( Press ‘m’ in keyboard ) and create the environment map:

  1. Select the second material slot
  2. Click on ‘Get Material’ button and select Composite map from the Map list ( Material/Map Browser > Maps > Standard > Composite ). Make sure you select Composite map and not Composite material!
  3. Click ‘Add a new layer’ to add a second layer to the composite map
  4. Add Gradient Ramp map to the first layer of the Composite Map:

    Coordinates rollout

    Environ: Selected

    Mapping: Screen

    Angle: W: 90

    Gradient Ramp Parameters rollout

    Flag #1 Color: RGB 139, 84, 5 Position: 0

    Flag #2 Color: RGB 255, 229, 192 Position: 100

  5. Add Noise map to the second layer of the Composite Map:

    Noise Parameters rollout

    Noise Type: Fractal

    Levels: 10

    Size: 20

    Color #1: RGB 100, 100, 100

    Color #2: RGB 255, 255, 255

  6. In the Composite Map, change the blending mode of the ‘Layer 2′ to ‘Color Burn’

Parameters for the environment map

Let’s apply the map to the environment:

  1. Open environment settings ( Rendering > Environment… )
  2. Drag and drop the environment map from the material editor slot to the Environment Map slot. Select ‘Instance’ when asked and click ‘OK’.

Render your scene to see how your abstract background looks.

Rendered abstract bokeh background

As you see the environment background brings a lot of life and color to the image. Feel free to change the color in the background map.

Step 5 Depth of Field

As a last thing, we’re going to make the image more interesting by adding real depth of field effect to it. Select the camera and go to the Modify Panel to apply the depth of field effect:

  • Parameters rollout
    • Multi-Pass Effect
      • Enable: YES ( Make sure ‘Depth of Field’ is selected in the drop down list )
  • Depth of Field Parameters
    • Focal Depth
      • Use Target Distance: YES ( particles near the camera target will appear sharp )
    • Sampling
      • Display Passes: YES
      • Use Original Location: YES
      • Total Passes: 100 ( try lower values if it takes a long time to render )
      • Sample Radius: 30
      • Sample Bias: 0,5

Render your image to see the difference.

Bokeh background with shallow depth of field

Finally, do some color correction in Photoshop if you like:

  • Brightness: 40

Abstract bokeh background

If you liked this, you might be interested in my other bokeh tutorial. That’s it. Thanks for reading!

Posted in 3D Tips, 3ds Max Tutorial by polygonblog


Character Rigging

25 Oct 2010

Character riggingThis is the fourth tutorial in my four part series dealing with character animation. These tutorials are targeted for beginners wanting to learn the basics of modeling, uvw mapping, texturing, rigging, and creating a cute 3d monster. In this fourth part we’re dealing with character rigging. You’ll learn the basics of using the Morpher and Skin modifiers to manipulate and deform a simple character. Character rigging can be a tough subject for beginners but I’ll do my best to keep things as simple as possible. I’m using 3ds Max 2011.

Step 1 What is Character Rigging?

In 3d animation, character rigging means the process of preparing the character for animation. The idea is to use special helper objects and modifiers to prepare a set of tools that make the animating process as easy as possible. We’re going to rig the character by using the Morpher modifier for the facial animation and the Skin modifier (in conjunction with bones) for the rest of the body. In the picture below you see a character pose you can be easily do after completing this tutorial.

Character rigging in 3ds Max

Step 2 Facial Animation and Morpher

The Morpher modifier is commonly used for lip sync and facial animation. The Morpher modifier deforms the original object according to predefined target objects. The biggest task is the creation of the target objects ( morph targets ). The modifier itself is really simple to use.

Step 3 Creating Morph Targets

Let’s create the morph targets for our character:

  1. Go to the front viewport and clone the monster ( Press and hold SHIFT in keyboard and move the monster ). Make sure you make a normal copy ( not instance or reference). From now on we work on the copy.
  2. Remove Turbosmooth and both Unwrap UVW modifiers from the copy.
  3. Go to the Editable Poly or Edit Poly modifier ( Make a selection > Modify panel ) below the Symmetry modifier and activate the vertex sub-object level.
  4. Create a new facial expression like in picture below by moving vertices. You can freely move vertices around but make sure the vertex count stays the same at all times. If you add or remove even one vertex, it won’t work with the Morpher modifier ( Tip: Consider activating the polygon sub-object level and hiding part of the model to make it easier to select vertices around the mouth. If you hide the back of the model you don’t have to worry about accidentally selecting vertices there. )
  5. Give appropriate name for your morph target such as ‘mouth afraid’.

Morph target for facial animation

Now we have one morph target and that’s enough for the sake of this tutorial. If you are about to create some serious facial animation, you need more morph targets. Just create more copies from the original and create expressions like smile, amazement, blinking eyes and so on. It’s often a good idea to create separate targets for eyes and mouth and separate targets for the left and right side (like wink) as well to have maximum control over the expressions. The Morpher modifier lets you combine the expressions of several different morph targets.

Step 4 Using the Morpher Modifier to Animate Facial Expressions

Now select the original monster model and try the Morpher modifier:

  1. Apply the Morpher modifier ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > Morpher ) and move it just below the Turbosmooth modifier.
  2. Go to the ‘Channel List’ rollout and right-click on the first ‘- empty -‘ slot.
  3. Click on ‘Pick from Scene’ and then on the morph target (mouth afraid). Now the first morph channel is activated. Just use the spinner to morph between the original model and the morph target. If you modify the morph target, remember to reload it by clicking on ‘Reload All Morph Targets’ button.

Morpher modifier in character rigging

Tip: Turn ‘Use Limits’ off in the ‘Global Parameters’ rollout to go beyond the 0-100 range. Try for example negative values to get some interesting ( and maybe even useful ) results. Remember also that channel percentages can be mixed when you have multiple morph targets.

Step 5 Creating Bones for the Character Rig

While the Morpher modifier controls the facial expressions, the bones control the rest of the body. Let’s create the skeleton:

  • Turn the Turbosmooth modifier off ( to see the bones better )
  • Go to the front viewport and create three bones from top to bottom like in picture below ( Create panel > Systems > Bones ). When you have created three bones, just right-click to end the bone creation. Exiting the bone creation mode creates a small nub bone at the end of the chain, which will be used later with IK ( inverse kinematics ).

Now we have four bones that are linked to each other. The first bone is the parent of the second, the second is the parent of the third, and so on. If you move the first bone the whole chain follows. You can also double click on the parent to select it and all its children.

Leg bones in a character rig

Next we’re going to create bones for the spine and the head:

  • Create two new bones like in picture below. We’re not going to assign IK to the head and spine so delete the nub bone. Leave a little gap between the spine bone and first bone of the leg. ( We leave the gap to avoid linking the two bones in question. If we started creating the bones by clicking on an existing bone, they would be automatically linked.)

Spine bones in a rig

Open Bone Tools ( Animation > Bone Tools… ), activate the ‘Bone Edit Mode’ and move the spine bone to meet the first bone of the leg like in picture below. Close the Bone Tools.

Using Bone Tools to scale bones

Next we’ll create the arm bones. This time we want to link the arm bones to the spine so start creating the bones by clicking on the spine bone. Create four bones ( plus the nub bone) for the left arm like in picture below.

Arm bones in a character rig

Now we have all the bones we need and we just have to fit them inside the character. Go to the left viewport, select all the bones and move them to the center of the character. Rotate the bones like in picture below. Notice how the knee bends. We bend the bones now to make them work better with IK.

I wasn’t really sure how I should rig this weird monster character so I did the leg bones pretty much like I would for a human-like character (except for the fact that there is only one leg). You can also create two “legs” inside the monster if you want to make it “walk”. It all depends on how you want your character to move. Does it move by flying, jumping, crawling, walking, or by all these means?

Bones in 3ds Max

Go to the top viewport and rotate the arm bones so that they fit inside the character. Make sure the arm bends a little.

Aligning bones in 3ds Max

Select the whole arm by double clicking on the clavicle bone (the bone between the spine and the arm). Use the mirror tool ( The main toolbar > Mirror ) to make a mirrored copy of the arm ( make sure to make a standard copy, not instance or reference ). Position the new bones like in picture below.

Mirrored arm bones

We still have to link the right arm to the spine:

  1. Go to the front viewport
  2. Activate ‘Select and Link’ ( The main toolbar > Select and Link )
  3. Click and hold on right clavicle bone. Drag and release on top of the spine bone. ( To check that the linking was successful, select only the spine bone and try moving it. Both arms should follow. Undo the move. )

Linking bones

Now the skeleton is complete, but let’s create one more helper object to serve as a master that is used to move the whole skeleton. Create a dummy ( Create panel > Helpers > Dummy ) and position it exactly where the spine bone and the first leg bone meets. Check the position in both the left and front viewports.

Use the ‘Select and Link’ tool ( The main toolbar > Select and Link ) to link the spine bone and the first leg bone to the dummy. Now if you move the dummy, the whole skeleton should follow. Try this to make sure everything is ok and finally undo the move.

As a final step, link the eyes ( if you have them ) to the head bone. Now the eyes stay in place whenever the character moves.

Complete character rig

Step 6 Inverse Kinematics (IK)

Now the skeleton is complete and we go on with inverse kinematics. Inverse kinematics if often assigned in the character rigging process, especially for the legs. Let’s assign inverse kinematics to enhance our rig:

  1. Select the character, right-click on it, and click ‘Hide Selection’ in the menu. ( we hide the character to see the bones better )
  2. Go to the left viewport, select the first leg bone, activate HI solver ( Animation > IK Solvers> HI Solver ), and click on the nub bone of the leg. Now IK has been assigned to the leg and there is a new blue helper object in the end of the IK chain. The helper object is often called IK handle and is used to control the movement of the whole chain. Try to move it to see how it works ( undo the move afterwards ).

Assigning inverse kinematics to the leg

Next go to the front viewport and assign IK also for both arms. Make the IK chain from the first bone of the arm to the nub bone ( Don’t touch the clavicle bone ). Test how the arms work. They should work well in the top viewport.

IK HI solver in arm

Now all the IK solvers have been created. At the moment you can’t rotate individual bones in the IK chain. To be able to do that, select the IK handle, go to the motion panel, and click ‘Enabled’ in the IK Solver rollout. This is the on/off switch for inverse kinematics for the selected IK chain. This button can also be animated so the animator can easily switch between inverse kinematics and forward kinematics ( just rotating the bones in the chain) while animating the character. Leave it on for now.

As a final thing, try to move the green dummy to see how the character responds when inverse kinematics is in use ( undo afterwards ).

Step 7 Rotational Joint Limits

Next we’re going to enhance the rig even further to limit the rotational movement of the bones:

  1. Go to the left viewport and select the first leg bone
  2. Go to the Hierarchy panel and activate the ‘IK’ tab
  3. Go to the ‘Rotational Joint’ rollout.
  4. Deactivate the X Axis
  5. Deactivate the Z Axis
  6. Y Axis > To: 240
  7. Y Axis > From: 140( If these values don’t work in your case, try something different. Just click and hold on top of a spinner and move the mouse to easily try different values. The idea is to limit the bone’s movement without forcing it away from its original position. ‘Preferred’ should be between ‘From’ and ‘To’.)
  8. Y Axis > Limited: Yes
  9. Repeat steps 4-8 for the second leg bone, but use values: From: 0 To: 90
  10. Repeat steps 4-8 for the third leg bone, but use values: From: -140 To: -70

Now the leg bones can rotate only along Y axis and within limited range. Try to move the leg with the IK handle to see the difference. Now It’s up to you whether you want to set the limits for the arms as well or not. You might want to come back to this step after the skinning process to see the movement of the character while trying out different values.

Adjusting rotational joints

Step 8 Character Skinning / Vertex Weighting in 3ds Max

Character skinning is the process where we define how the model responds to the movement of the bones. We’ll use the Skin modifier for that purpose. Let’s unhide the character ( Right-click on the viewport and select ‘Unhide all’ from the menu ) and go on with the skinning process:

  1. Apply the Skin modifier on top the Morpher modifier ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > Skin )
  2. In the Skin modifier in the Parameters rollout, click ‘Add’, Select all the bones except for the nub bones, and click ‘Select’. Now the bones deform the character but it’s not pretty.
  3. Now is a good time to turn the Turbosmooth modifier back on to see how the final surface deforms.( Sometimes Turbosmooth gets messed up while working on the Skin. If this happens, just remove it and apply it again. )
  4. Activate the Envelope sub-object level.
  5. Select the head bone in either the viewport or in the bones list.( on envelope sub-object level we deal with envelopes. Each bone has a capsule-shaped envelope and each envelope has an inner and an outer bound. The shape and size of the envelope determines which and how vertices are affected when the bone moves. The influence of the bone is strongest inside the inner bound and it falls of as it approaches the outer bound. )
  6. Select the outer bound of the envelope at the top of the bone.
  7. Change the radius of the envelope bound to 85 either by moving it or by inserting the value with keyboard( This is not exact value. The suitable value depends on the size of your character. Just look at the picture below to size the envelope correctly ).
  8. Select the outer bound of the bottom of the bone and give it the same radius. ( The idea is to make the outer bounds of the envelopes so big that the whole width of the character falls inside of it ).

Vertex weighting

Let’s repeat the process and apply appropriate radius values for the rest of the bones ( Keep in mind that these are not exact values. Suitable values depend on the size of your character. Just look at the picture below to size the envelopes correctly ). Make sure you change only the radius values of the outer bounds. ( In my experience you can often get good results by adjusting only the outer bounds ):

  • All the leg bones, the spine bone, and the head bone: Radius: 85
  • Clavicle bones ( the bone between the spine and arm): Radius: 19
  • All arm bones except for the armpit/shoulder area: Radius: 40
  • Armpit/shoulder area: Radius: 19

Bone envelopes in the Skin modifier

Now the skinning/vertex weighting process is done. Deactivate the envelope sub-object level and try to rotate each bone to see how the character deforms. Try also the IK handles and the master dummy. I recommend undoing all the rotations afterwards to keep the neutral pose.

Step 9 Character Rigging Tip: Weighting Vertices Manually

This is an optional step. Just some theory and tips. If you are lucky you can get pretty good results just by adjusting the envelopes sizes, but there is often a need to fine tune the behavior of individual vertices as well. To weight vertices manually:

  1. Turn Turbosmooth off ( to make selecting vertices easier )
  2. Turn ‘Vertices’ on ( Skin > Parameters > Vertices )
  3. Now you can select vertices on your character so select the vertices you would like to adjust ( selected vertices are indicated by white small surrounding boxes )
  4. Select the bone ( either in the viewport or in the bones list ) for which you want to change the vertex weights
  5. Adjust the the ‘Abs. Effect’ value ( Skin > Weight Properties ) to set the new vertex weight

( The weight value of a vertex (Abs. Effect) always amounts to 1.0. This value can be divided between several bones. For example, vertex’s weight could be 0.7 for bone-1 and 0.3 for bone-2. In that case the bone-1 would have much higher influence on the vertex. In other words, the vertex would follow the movement of bone-1 much more than it would the movement of bone-2. )

Tip: The weighting/skinning process can be made easier by animating the bones. Just animate some natural bone movements. At first, the character will look ugly and distorted but keep in mind that as long as you keep the neutral pose in keyframe 0, nothing will break. You can always reverse everything by going to frame 0 and removing all the keyframes. The benefit of the animations is remarkable. You can see the deforming character while working on envelopes just by moving back and forth on the timeline.

Character animation

That’s my take on character rigging. Let’s continue in the comments! In case you’re wondering, I made the light and glow effects in Photoshop.

Posted in 3ds Max Tutorial, Learn 3D by polygonblog


Texturing

24 Sep 2010

TexturingThis is the third tutorial in my four part series dealing with character animation. These tutorials are targeted to beginners wanting to learn the basics of organic modeling, unwrapping, texturing, rigging, and creating a cute 3d monster. In this third part we’re dealing with texturing. You’ll learn how to create and apply textures with Viewport Canvas. I’ll do my best to keep things as simple as possible. I’m using 3ds Max 2011 and Photoshop.


Step 1 What is Texturing?

In 3d graphics, texturing means the process of creating and applying textures to the model. In fact, the term texturing consist of two things: UVW mapping and texture painting. UVW mapping was covered in my previous tutorial and this one will concentrate on the texture painting. We’re going to create the texture by using Photoshop and Viewport Canvas. Viewport Canvas is a 3D paint inside of 3ds Max. In the picture below you see the result of this tutorial.

Monster textured in 3ds Max 2011

Step 2 Mental Ray Renderer

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

Step 3 Prepare the Model for Texturing

We continue from the unwrapping tutorial. As a starting point we should have the unwrapped model with the Turbosmooth modifier applied. We don’t need the checker material anymore so let’s get rid of that:

  1. Open Material Editor ( Press ‘m’ in keyboard ).
  2. Select a new (empty) material slot.
  3. Click “Get Material” button and select ( doubleclick ) ‘Arch & Design (mi)’ from the list ( Materials > mental ray > Arch & Design ).
  4. Assign the new material to the monster ( drag and drop ).

3D model in 3ds Max

Step 4 Texturing with Viewport Canvas

Viewport Canvas is a new feature in 3ds Max. I think it was introduced in 3ds Max 2010 and in 2011 it has been completely upgraded. If you don’t have 3ds Max 2011 you unfortunately can’t really follow this tutorial. If you have Photoshop, you could render a UVW template ( Unwrap UVW > Parameters > Edit… > Tools > Render UVW Template… ) and try to apply the ideas on top of that. Anyway, let’s launch Viewport Canvas and start painting.

  1. Select the monster model.
  2. Open Viewport Canvas ( Tools > Viewport Canvas… ).
  3. Click on the ‘Paint’ tool ( to activate the paint mode ).
  4. Select ‘Diffuse Color Map: …’ from the menu ( Viewport Canvas needs to know which map channel we’re painting.). A new dialog appears.
  5. Set the size of the texture map to 2000×2000.
  6. Select the folder for your file, name your file, and select PNG as file format ( I recommend choosing RGB 24 bit as color depth. Alpha channel is not needed. ).
  7. Click ‘OK’ to save the file.

Texturing with Viewport Canvas

Step 5 Starting Texture Painting

Let’s use the Fill and Gradient tools to give some color to our monster:

  1. Go to the front viewport.
  2. Select green color ( R103 G132 B58 ).
  3. Active the Fill tool and click on top of your monster.
  4. Open the Layers dialog ( Layers work just like in Photoshop ).
  5. Create and activate a new layer.
  6. Select dark green color (R44 G56 B24).
  7. Activate the Gradient tool. Click and hold on the bottom of the monster, drag upwards, and release when you’re satisfied with the gradient.

Texture painting in Viewport Canvas

Step 6 Saving the Texture

Deactivate the Gradient tool ( or whatever paint tool you have currently activated ). A new dialog appears. At the moment there are two layers but layers cannot be saved in a PNG file so something has to be done. There are several options and they are all pretty self-explanatory. We select ‘Save as PSD and replace texture in material’. I think that’s usually the most preferred choice. Now the file is saved as PSD and applied to the diffuse color channel in the material. You might wonder why we didn’t save the file as PSD in the first place. Unfortunately 3ds Max doesn’t allow that at the moment but I’m guessing it will change soon.

Step 7 Working with Photoshop

Next we’re going to work with Photoshop to create some texture:

  1. Open this file in Photoshop
  2. Desaturate the image ( Image > Adjustments > Desaturate )
  3. Apply ‘Palette Knife’ filter ( Filter > Artistic > Palette Knife… ). I used values ( 15, 3, 0 ). The idea is to have a painted look to the texture.
  4. The image size should be the same as our texture size in 3ds Max. Adjust if necessary.
  5. Save the file and return to 3ds Max.

Step 8 Apply the Texture to the Model

Let’s apply the texture to our model. You could do it in Photoshop but I’m using Viewport Canvas:

  1. Select the monster model.
  2. Open Viewport Canvas ( Tools > Viewport Canvas… ).
  3. Activate any paint tool ( to activate the paint mode ) and Open the ‘Layers Dialog’.
  4. Create and select a new layer
  5. Apply the texture we just created to the new layer ( In the Layers Dialog: File >Load Bitmap Into Current Layer… )
  6. Change the blending mode of the new layer to Overlay
  7. Change the opacity of the new layer to 35%

Viewport Canvas workflow

Tip: If the texture is displayed in low resolution go to the display driver settings and and maximize the resolution ( Customize > Preferences… > Viewports > Configure Driver… > Appearance Preferences > Download Texture Size > Match Bitmap Size as Closely as Possible ).

Step 9 Removing Texture Seams

Now the monster has a nice painted look but unfortunately the texture seams are clearly visible. Next we’re going to do something that would be really difficult in Photoshop but really easy in 3d paint. We’re going to use the Clone tool to paint over the seams:

  1. Activate the Clone tool.
  2. Orbit around the model to get a good view of a seam.
  3. Select suitable brush radius ( I recommend using a pretty large brush ). Tip: The shortcut to brush radius is CTRL + SHIFT + Left click & drag.
  4. Set the sampling point by positioning the pointer to suitable area on the monster and ALT-clicking.
  5. Paint over the seam.
  6. Use this method to remove all the seams. You must set the sampling point again several times until you are done. Convincing cloning takes usually some time. Experiment with the hardness of the brush as well.

Cloning seams

Step 10 Creating Details

Let’s create more details by adding another texture to our layer stack ( just like in step 6 ):

  1. Load this file.
  2. Create and select a new layer ( Make sure the new layer is the topmost layer. You can change their order by dragging and dropping ).
  3. Apply the texture to the new layer ( In the Layers Dialog: File >Load Bitmap Into Current Layer… )
  4. Clone the seams away
  5. Change the blending mode of the new layer to Overlay
  6. Change the opacity of the new layer to 30%

Now we have more small details in our texture. As you see this is very fast method of adding some random details to the surface. Now our diffuse map is complete. Next we’re going to create and apply texture maps to bump and reflection channels as well.

Step 11 Applying Reflection Color Map

Let’s apply a reflection color map to the material:

  1. In Viewport Canvas, deactivate any paint tool you might have active ( this is done to deactivate the paint mode).
  2. In Viewport Canvas, go to the ‘Options’ rollout and change ‘Paint On:’ from Diffuse Color Map to Reflection Color Map. A new dialog appears.
  3. Set the size of the texture map to 2000×2000.
  4. Select the folder for your file, name your file, and select PNG as file format ( I recommend choosing RGB 24 bit as color depth. Alpha channel is not needed. ).
  5. Click ‘OK’ to save the file.

Texture painting workflow

Step 12 Painting on the Reflection Color Map

Now there is a blank texture in the reflection color channel. In reflection color channel we paint matte areas with black and shiny/reflective areas with white. Let’s paint some drool:

  1. Activate the Paint ( brush ) tool.
  2. Select white color.
  3. Select rather large Radius ( CTRL + SHIFT + Right-click and drag. Suitable radius depends on the zoom level ).
  4. Make sure Hardness is set to zero.
  5. Open the ‘Layers Dialog’
  6. Create and select a new layer.
  7. Paint around the mouth to create some drool.
  8. Activate the Fill tool.
  9. Select black color.
  10. Select the Background layer
  11. Click on the model to paint it black. ( keep in mind that in the paint mode you see just the paint. The final reflection effect is seen only in rendering. )
  12. Deactivate the Fill tool ( to deactivate the paint mode ). A new dialog appears. Select ‘Save as PSD and replace texture in material’. Now the file is saved as PSD and applied to the reflection color channel in the material.

Painting reflection map

Step 13 Reflection Glossiness Map and Bump map

Let’s make the texture more interesting by adding a reflection glossiness map and a bump map:

  1. Open Material Editor ( Press ‘m’ in keyboard )
  2. Go to the ‘General Maps’ rollout and drag and drop the texture we just created from ‘Reflection Color’ to ‘Reflection Glossiness’. Select ‘Instance’ when asked.
  3. Go to the ‘Special Purpose Maps’ rollout and set the bump value to 0,05.
  4. Now we’re going to create the bump texture in Photoshop. Go to Photoshop and open the diffuse texture we created earlier (PSD).
  5. Make a duplicate of the diffuse texture ( Image > Duplicate… ).
  6. Close the original and work with the duplicate. Delete all layers except the one we created and applied in steps 7-8. Change the blending mode of the layer from Overlay to Normal and Opacity to 100. Save it as PNG file.
  7. Go back to 3ds Max and add the new file to the Bump channel ( Maps > Standard > Bitmap > bump.png ).

Creating material

Now the material is complete and we go on with the lighting and rendering.

Step 14 Lighting and Rendering Setup

We’re going to use a basic three-point lighting setup to illuminate the monster. Since this is essentially a texturing tutorial I’m not going to go through the lighting in detail but I’ll give you the exact settings you can use:

  1. Key light: Mental Ray Area Spot ( Create panel > Lights > Standard > mr Area Spot ).
    Intensity/Color/Attenuation > Multiplier: 1,5
    Area Light Parameters > Height: 200
    Area Light Parameters > Width: 200
  2. Rim Light: Mental Ray Area Spot ( Create panel > Lights > Standard > mr Area Spot ).
    Intensity/Color/Attenuation > Multiplier: 1,4
    Area Light Parameters > Height: 200
    Area Light Parameters > Width: 200
  3. Fill Light: Skylight ( Create panel > Lights > Standard > Skylight ).
    Multiplier: 0,4
    Sky Color: pure white
  4. Drool Light: Omni ( Create panel > Lights > Standard > Omni ).
    Advanced Effects > Diffuse: Off

Three point lighting

Let’s adjust the sampling settings to get a 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. ).

Finally change the background color to black ( Rendering > Environment… > Common Parameters > Background > Color) and hit render. Below you see the final rendered image. I made some color correction in Photoshop as well:

  • Brightness: 40
  • Contrast: 20

Texturing tutorial

Thanks for reading!

Posted in 3ds Max Tutorial, Learn 3D by polygonblog


Unwrapping

26 Aug 2010

Waving 3d monsterThis is the second tutorial of my four part series dealing with character animation. These tutorials are targeted for beginners wanting to learn the basics of organic modeling, unwrapping, texturing, character rigging, and creating a cute 3d monster. In this second part we’re going to unwrap the character. You’ll learn about UVW texture coordinates and unwrapping. I’ll do my best to keep things as simple as possible. I’m using 3ds Max 2011.

Step 1 What is Unwrapping?

In 3d graphics, mapping coordinates ( often called UVW coordinates or just UVWs ) define how the texture is wrapped around the model. Unwrapping means laying out the mapping coordinates so that texture painting can be done. While unwrapping a model one should pay attention to two things: stretching and seams. Naturally there must be seams when a 2d texture is wrapped around a 3d model. However, during the unwrapping process, one can define the amount and position of the seams. The goal is to have as few seams as possible and to hide them as well as possible (in the back of the model, under arms etc.).

The UVW mapping coordinates can ( and often do) make the texture stretch. During the unwrapping, the stretching should be minimized by moving the mapping coordinates. Often when there are lot of seams there aren’t that much stretching and vice versa. One must make a compromise between these two issues. In my opinion seams is the lesser evil and can be fixed easily with a 3d paint as you’ll see in my upcoming texture painting tutorial.

In the picture below you see the result of this tutorial. There are the unwrapped UVW coordinates on the left and the model with the UVWs and a checker texture on the right.

UVW Unwrapping

Step 2 Preparing the Model for Unwrapping

It’s always easier to unwrap a low poly model than a high poly model because there are just as many mapping coordinates as there are vertices. Therefore, it’s often a good idea to do the unwrapping before applying the Turbosmooth modifier. However, there is a one problem with our monster model. It changes pretty much when the first Iteration of the Turbosmooth modifier is applied. In fact, the arms change so much that there’d be some visible stretching in the final model if we unwrapped the low poly version. Fortunately there is an easy solution. We can set the Iterations value in the Turbosmooth modifier to 1. That’s a good compromise – polygon count isn’t yet high and the model is very close to it’s final form. Additionally, we want to do the unwrapping before applying the Symmetry modifier. The Symmetry modifier saves our time by mirror both the geometry and the mapping coordinates. Let’s prepare the model for the unwrapping:

  1. The starting point should be a 3ds Max file with just one object in it: Half of the monster with the Turbosmooth modifier applied.
  2. Set Iterations value to 1 in the Turbosmooth modifier.
  3. Add the Edit Poly modifier on top of the Turbosmooth modifier.
  4. Activate the polygon sub-object level in the Edit Poly modifier and delete the right half of the model in the front viewport ( see the image below ).
  5. To keep things simple, collapse your modifier stack ( right-click on the modifier stack and select collapse all from the menu ). If you want to keep your stack you can, but we’re going to add several new modifiers to it.

Low polygon model

Step 3 Checker Texture

Usually a checkerboard texture is applied to the model before the unwrapping. The checker texture makes it really easy to notice stretching. Open Material Editor ( Press ‘m’ in keyboard ) to create the checker texture for our model:

  1. Select your monster and assign a new material to it.
  2. Add Checker as a diffuse map ( Maps > Standard > Checker ).
  3. Set U and V Tiling to about 20 ( Stretching is easier to see in small squares ).
  4. Enable “Show Standard Map in Viewport” ( Makes the texture visible in shaded viewports ).
  5. Self-Illumination: 25 ( Makes it easier to see the checker pattern in dark areas such as inside the mouth. Change this as you see fit).

UV checker texture settings in 3ds Max

Now that the checker texture is applied, our goal is to organize the UVW coordinates so that all squares in the checker pattern are equal in size and are as square as possible.

Step 4 Unwrap UVW

The Unwrap UVW modifier is a powerful tool that let’s you apply many different mapping types to different face selections and you can even tweak individual mapping coordinates. In our workflow we make a face selection, apply the most appropriate mapping type to it, and tweak the mapping coordinates in the ‘Edit UVWs’ dialog. Let’s make a selection to be unwrapped:

  1. Apply the UVW Unwrap modifier to the model ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > Unwrap UVW ).
  2. Activate the face sub-object level in the Unwrap UVW modifier.
  3. Select everything except the arm ( Turn ‘Ignore Backfacing’ off to speed up the selection process. You can name your face selection using the ‘Named Selection Sets’ function on the main toolbar. It makes it easy to return to your selection. ). Orbit around the model to make sure you haven’t missed anything.

Selecting torso in UVW Unwrap modifier

Step 5 Pelt Mapping

In this tutorial we’re going to use Pelt mapping. Pelt mapping is a special mapping type that is well suited for organic models. Pelt mapping tools let us define the texture seams and stretch out the UVW coordinates into a flat, unified map:

  1. While the torso is still selected, click ‘Pelt’ ( Unwrap UVW> Map Parameters > Pelt ). In the ‘Edit UVWs’ dialog you see the UVW coordinates in the middle and a circular stretcher around it. The points in the stretcher are connected to the UVW map seam. The job of the stretcher is to pull the UVW map flat. The stretcher can be manipulated but in this case there’s no need.
  2. Look at the checker pattern in your model. There is serious stretching at the top and at the bottom of the model.
  3. Click ‘Start Pelt’ , let the simulation run for a few seconds, and click ‘Stop Pelt’.
  4. Look at the checker pattern in your model. It looks better, but there is still stretching and and squares aren’t uniform in size.
  5. Click ‘Start Relax’ and let the simulation run some time but stop it before the UVW vertices in the corner of the mouth overlap too much ( see the image below ).
  6. Look at the checker pattern in your model. If it looks ok click ‘Commit’.

Pelt mapping interface

Step 6 Edit UVWs Dialog

The face selection in the Unwrap UVW has been translated to a UVW coordinate selection in the ‘Edit UVWs’ dialog. Before manipulating the UVWs, let’s apply a few settings to make things a little simpler:

  1. Activate ‘Filter Selected Faces’ in the bottom of the dialog. ( Hides all UVWs except the ones we have selected ).
  2. Click ‘Options…’ in the bottom of the dialog to expand the options panel.
  3. Turn ‘Tile Bitmap’ off in ‘Bitmap Options’. ( Makes the whole dialog easier to understand ).
  4. Turn ‘Constant Update’ on in Viewport Options. ( Enables real time updates when moving UVWs ).
  5. Use the Move and Scale tools to fit the selected UVWs inside the texture boundaries. Also, rotate the UVW map so that the right side is as vertical as possible ( It makes the stitching in step 11 a little easier. ).

Edit UVWs dialog

Step 7 Dealing with Overlapping UVW Coordinates

The checker pattern should look really good, but unfortunately there might be some overlapping UVW coordinates or inverted faces. Let’s run two automatic error checking routines to find these problems:

  1. Select Inverted Faces ( ‘Edit UVWs’ Dialog > Select > Select Inverted Faces ).I didn’t find any but if you do, fix it ( see steps 3 -4 ).
  2. Select Overlapped Faces ( ‘Edit UVWs’ Dialog > Select > Select Overlapped Faces ).In my model there is one overlapped face in the corner of the mouth ( Overlapping UVW coordinates are a problem because they use the same portion of the texture ). Let’s zoom to the problem area and fix it.
  3. Activate the vertex sub-object level in the Unwrap UVW modifier.
  4. Move the vertices so that the problematic UVW faces look more like rectangles ( See the image below ). Check your model to make sure the checker pattern didn’t get messed up. When you’re done just close the ‘Edit UVWs’ dialog.

Moving UVW coordinates

Step 8 Defining UV Seams for Pelt Mapping

Now the unwrapping of the body is complete and we go on with the arm. By default the only seam in the arm is at the edge of our selection. That isn’t enough. The stretcher wouldn’t be able pull the UWV map flat. Try to visualize it in your head: It’s like trying to turn a sock into a flat piece of fabric without any cutting. But with just one cut we could do it, right? So let’s define one seam:

  1. Activate the face sub-object level in the Unwrap UVW modifier and select the faces of the arm. Orbit around the model to make sure you haven’t missed anything.
  2. Activate ‘Point to point Seam’ ( Unwrap UVW > Map Parameters > Point to Point Seam ) and define the seam for pelt mapping. Just click on vertices and a seam is traced between them. Defined seams are shown in blue color (See the image below ). There should be 10 edges in your seam. Make the seam under the arm, not on top of it. If you make a mistake you can activate ‘Edit Seams’ ( Unwrap UVW > Map Parameters > Edit Seam) and remove unwanted seams by clicking on them while pressing Alt in keyboard.

Defining UV seams

Step 9 Unwrapping the Arm

From now on the pelt mapping process is exactly the same as with the torso except there probably won’t be any overlapped nor inverted faces.

  1. While the arm is still selected, click ‘Pelt’ ( Unwrap UVW > Map Parameters > Pelt ).
  2. Click ‘Start Pelt’, let the simulation run for a few seconds, and click ‘Stop Pelt’.
  3. Look at the checker pattern in your model. There is probably stretching and the squares aren’t uniform in size.
  4. Click ‘Start Relax’, let the simulation run for a few seconds, and click ‘Stop Relax. ( see the image below ).
  5. Look at the checker pattern in your model. If it looks ok click ‘Commit’.
  6. Move and scale your UVW selection so that it doesn’t overlap with the UVWs of the torso.
  7. Scale the UVWs of the arm until the size of the squares is the same as in the torso ( you can choose whether you work in face, edge, or vertex level. Personally I prefer the vertex level )
  8. Arrange to UWV coordinates for example like in image below ( you can easily select a whole cluster of UVWs by activating ‘Select Element’ under ‘Selection Modes’ in the bottom of the dialog ) and close the dialog.

UV coordinate layout

Step 10 Mirroring the UV Coordinates and the Geometry

Now the unwrapping is done and we’re ready to apply the Symmetry modifier:

  1. Go to the front viewport and apply the Symmetry modifier ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > Symmetry ). If the model disappears, activate Flip ( Symmetry > Mirror Axis > Flip ).
  2. Activate the mirror sub-object level in the Symmetry modifier and align the mirror plane to the right side of the model. The vertices in the middle are welded together. Deactivate mirror sub-object level.

Mirror UV coordinates with the Symmetry modifier

Step 11 Tweaking the UVW Coordinates

Add another Unwrap UVW modifier on top of the Symmetry modifier ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > Unwrap UVW ). Click ‘Edit…’ in the Unwrap UVW modifier to open the ‘Edit UVWs’ dialog ( UVW Unwrap > Parameters > Edit… ). The UVW layout looks exactly the same as before the Symmetry modifier, but it’s not. The UVW coordinates of the both sides are exactly on top of each other and therefore use the same portion of the texture. This would be ok if we wanted the texturing to be perfectly symmetrical. Usually you want to separate the coordinates to avoid perfect symmetry:

  1. Activate ‘Select Element’ in the ‘Selection Modes’ at the bottom of the ‘Edit UVWs’ dialog.
  2. Click on the UVW map of the arm and move it to the right. Now you have separated the UVW clusters of the arms. Click ‘Mirror Horizontal’ in the top of the dialog ( this isn’t necessary but in my opinion a logical way of arranging the UVW coordinates ). Move the UVW clusters of the arms as you see fit. Just make sure to keep them separated and inside the texture boundaries.
  3. Click on the UVW map of the torso and move it to the right.
  4. Click ‘Mirror Horizontal’ in the top of the dialog to mirror the selected UVWs horizontally.
  5. Move the UVW clusters of the torso close the each other so that the middle vertices overlap ( see the image below ). These UVW coordinate clusters have a common seam in the middle and therefore can be welded together.
  6. Deactivate ‘Select Element’ in the ‘Selection Modes’ at the bottom of the dialog and weld the vertices on the common seam together ( see the image below ): select two vertices at a time, double click on them, and select ‘Weld selected’ from the menu. If the weld doesn’t work, the vertices are too far apart and you must increase the ‘Weld Threshold’ in the ‘Unwrap Editor Options’ at the bottom of the dialog.
  7. If the welding caused stretching in the middle, go ahead and move UVW vertices to fix it.
  8. It’s possible that one or more UVW clusters are inverted which might cause problems with bump mapping. Activate the face sub-object level and click ‘Select Inverted Faces’ ( ‘Edit UVWs’ Dialog > Select > Select Inverted Faces ). If any of the UVW clusters turns red, just mirror it horizontally and you’re done.
  9. Move and scale the UVW coordinate clusters so that they fill as much of the texture area as possible. There is a tool for that called ‘Pack UVs’ ( Edit UVWs Dialog > Tools > Pack UVs… ) but let’s do it by hand. Move and scale the UVW clusters as you see fit but whenever you scale, scale everything to keep the coordinate resolution uniform.

Weld UV coordinates

Step 12 Good to Know

If you just want to finish this, skip to step 13, but if you’d like to learn about the other mapping types, read on. In this tutorial we used Pelt mapping. Pelt mapping works well but sometimes there is a need also for the traditional mapping types: planar, cylindrical, spherical, and box. The workflow with these mapping types is a little different:

  1. You make a face selection.
  2. You apply the appropriate mapping type ( depends on the form of the selection, for example cylindrical selection like an arm works well with the cylindrical mapping type ).
  3. You move, scale, and rotate the mapping gizmo to minimize stretching and to position seams ( With these mapping types you can’t define seams like we did with Pelt mapping. Instead, seams are derived from the mapping gizmo. You can just manipulate the gizmo to affect the placement and the amount of seams ).
  4. You continue in the ‘Edit UVWs’ Dialog and move UVWs to minimize stretching and weld them to get rid of seams. Sometimes you must move UVW vertices one by one but often the Relax tool ( Edit UVWs Dialog > Tools > Relax… ) solves stretching automatically. The Relax tool works like the Relax in the Pelt mapping dialog. First you select UVWs in the problematic area ( and maybe little around it ) and then you run the Relax to modify the spacing of the selected UVWs for the purpose of minimizing stretching. Trial and error method works well with the Relax tool. Just try different selections and different settings.

Step 13 Turbosmooth

Now the UVW Unwrapping is complete. Add the Turbosmooth modifier to the model and set the Iterations value to 1-2 depending on your needs.

Unwrapped UVs

Let’s continue in the comments and stay tuned for the texturing tutorial!

Posted in 3ds Max Tutorial by polygonblog


3D Monster

14 Aug 2010

Waving 3d monsterThis is the first tutorial of my four part series dealing with character animation. These tutorials are targeted for beginners wanting to learn the basics of organic modeling, uvw mapping, texturing, rigging, and creating a cute 3d monster. In this first part we’re going to create the geometry and you’ll learn about polygon modeling and subdivision surfaces. I’ll do my best to keep things as simple as possible.

Continue reading

Posted in 3ds Max Tutorial, Learn 3D by polygonblog


Mental Ray Lighting

06 Jul 2010

Mental Ray IlluminationIn this beginner’s tutorial we’re going to illuminate a simple warehouse interior in 3ds Max. We’ll explore techniques to illuminate the interior through windows only. To keep things simple we’ll concentrate on lights that work with Final Gather and leave Global Illumination out of the discussion. I’m using 3ds Max 2011.


Step 1 Mental Ray Renderer

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

Step 2 Warehouse Geometry

This tutorial is about Mental Ray lighting but first we’ll create a really simple warehouse interior. Create a box ( Create panel > Geometry > Standard Primitives > Box ) in the top viewport . Modify the box ( Make a selection > Modify panel ) according to the following parameters:

  • Length: 20
  • Width: 20
  • Height: 10
  • Length Segs: 5
  • Width Segs: 1
  • Height Segs: 3

Creating box in 3ds Max

Step 3 Creating Windows

Next we’re going to create the windows. Add Edit Poly modifier to the box ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > Edit Poly ). Activate the polygon sub-object level, and delete two polygons in the right viewport.

Deleting polygons with Edit Poly

Activate the vertex sub-object level and move the vertices to change the size and shape of the windows according to the picture below. ( Click and drag to select a row or column of vertices at once. )

Warehouse windows

Now the geometry is complete, but since we’re going to render the interior we should flip the normals of all the polygons:

  1. Activate the polygon sub-object level
  2. Select all polygons ( CTRL + a )
  3. Go to the modify panel and click ‘Flip’ in the Edit Poly modifier ( Modify Panel > Edit Poly > Edit Polygons > Flip )
  4. Deactivate the polygon sub-object level

Step 4 Creating Camera

Create a target camera ( Create panel > Cameras > Target ) in the top viewport and apply ( Make a selection > Modify panel ) the following parameters:

  • Parameters
    • Lens: 20 ( wide angle lens is needed to get a good view of the interior )

Right-click on the Perspective view and press ‘c’ in the keyboard to change it to camera view. Move the camera inside the box to get a view like in the picture below.

Default rendering with Mental Ray in 3ds Max

Step 5 Warehouse Material

Open Material Editor ( Press ‘m’ in keyboard ) and create the material for the warehouse:

  1. Click “Get Material” button and select ( doubleclick ) ‘Arch & Design (mi)’ from the list ( Materials > mental ray > Arch & Design ).
  2. Select the warehouse and assign the material to it.
  3. Reflectivity: 0 ( perfectly matte surface )

Designin Mental Ray material

Apply diffuse and bump maps:

  1. Bump map: Composite ( Maps > Standard > Composite )
  2. Add Smoke map to the first layer of the Composite Map ( large scale details )

    Size: 0,5

    # Iterations: 20

    Color #1: Black

    Color #2:
    Dark Gray ( RGB 50, 50, 50 )

  3. Add second layer to the Composite map. Change the blending mode to Addition. Add Speckle map to the second layer ( small scale details )

    Size: 0,4

    Color #1: Light gray ( RGB 180, 180, 180 )

    Color #2: Black

  4. Add this file as a diffuse map ( Maps > Standard > Bitmap > concrete-texture-high-resolution.jpg )

Material settings for a concerete wall

And here is how the rendered interior with default lighting looks like:

Default illumination

Step 6 The Main Light Source

Now it’s the time to create the lighting. Let’s start with the main light source (sun). Create Mental Ray area spot ( Create panel > Lights > Standard > mr Area Spot ) in the front viewport. Place the spot light according to the picture below. Modify the spotlight ( Make a selection > Modify panel ) according to the following parameters:

  • Spotlight Parameters
    • Hotspot/Beam: 24
    • Falloff/Field: 26
  • General Parameters
    • Shadows: On (Ray Tracted Shadows)

( Tip: If you’d like to make the light more directional, just move the spotlight farther away from the warehouse. )

Spot light positioning

Render the image to see the lighting:

Effect of a single spotlight

Step 7 The Environment

At the moment we can’t even see the windows because the background color is black (by default). Let’s go to the environment settings ( Rendering > Environment… ) and change the background color:

  1. Click ‘None’ and select Glow ( Maps > mental ray > Glow ) from the Material / Map Browser
  2. Open Material Editor ( Press ‘m’ in keyboard ). Drag and drop the Glow shader from environment settings to an empty material slot in Material Editor ( make sure to select ‘instance’ when asked ). Make the following adjustments to the Glow shader:

    Glow: White

    Brightness: 4

Glow shader settings

Render the scene to see the effect:

light through windows

Now that we can see the windows, let’s apply a glow around them. Apply Glare Camera Shader ( Rendering > Render Setup… > Renderer > Camera Effects > Camera Shaders > Output > Glare ) Just turn the output shader on, the glare shader should be selected by default. Render the image again to see the difference. ( The use of Glare shader is the reason for using Glow shader in the background instead of just white color. )

Effect of Mental Ray Glare shader

(The glow effect might seem really strong at the moment but in my opinion it works well in the final image. You can adjust the strength of the glow by adjusting the brightness of the glow shader or by adjusting the glare shader itself.)

Step 8 Indirect Lighting

At the moment we have only the spot light (sun). The image is very dark and there is no indirect light. Create a skylight ( Create panel > Lights > Standard > Skylight ) to simulate the indirect light coming from the windows. Apply ( Make a selection > Modify panel ) the following settings to the skylight:

  • Multiplier: 1,5

Render the scene to see the lighting:

Effect of skylight

Some light reaches the ceiling over the windows but as a whole the image still looks about the same. We need to drive more light inside the warehouse. Fortunately there is an easy way to do just that. Go to the right viewport and create two sky portals ( Create panel > Lights > Photometric > mr Sky Portal ) that are slightly larger than the windows and position them immediately outside the openings. Apply ( Make a selection > Modify panel ) the following parameters to the sky portals:

  • Multiplier: 1,5 ( The strength of the light )

Mental Ray sky portal positioning

( Sky portal needs a skylight to work. It gathers existing sky lighting into the interior scene. The arrow shows the direction of light flow. ) Let’s render the scene to see how the sky portals affect the lighting:

Lighting effect of the sky portals

Let’s add bounced light to the equation to see if it makes any difference. Go to the Final Gather setup and apply the following settings ( Rendering > Render setup… > Indirect Illumination > Final Gather ):

  • Basic
    • Multiplier: 2 ( the strength of the effect )
    • Bounces: 5 ( a number of bounces indirect illumination does )

Render the scene to see the effect of indirect illumination.

Interior lighting in 3ds Max

Now there is noticeably more light inside. If you look carefully you can even see each corner of the room.

Step 10 Volume Light

Let’s make the image more interesting by adding some volumetric light rays coming from the windows. Go to the Atmosphere settings ( Rendering > Environment… > Atmosphere ) and add Volume light effect:

  1. Click ‘Add…’ button, select ‘Volume Light’ from the list and click ‘OK’
  2. Click ‘Pick Light’ and click on the mr area spot we created earlier
  3. Density: 20 ( strong effect )

Volume light settings in 3d Max

Let’s render to see the effect of the volume light:

Volumetric light

Step 11 Completing the Lighting and Rendering with Mental Ray

The Volume light seems to bring too much light into the scene. Let’s fix it by decreasing the Final Gather multiplier:

  • Rendering > Render setup… > Indirect Illumination > Final Gather > Multiplier: 1,4

Let’s also adjust the sampling settings to get a 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. )

Mental Ray lighting and rendering

That’s it for today. Thanks for reading!

Posted in 3ds Max Tutorial by polygonblog


Bokeh Effect in 3ds Max

01 Jun 2010

Bokeh effectIn this beginner’s tutorial we’re going to create a bokeh effect in 3ds Max. The term bokeh is familiar from photography. When depth of field is shallow, part of the photo is blurred. Bokeh refers to that blur or the quality of it. There are a few different methods of creating shallow depth of field in 3ds Max, but this time we concentrate on the ‘Depth of Field / Bokeh’ camera shader which is a new feature in 3ds Max 2011. The Bokeh shader gives us nice tools to control the quality and the look of the out of focus areas.

Step 1 Mental Ray Renderer

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

Step 2 The Background

We’re going to create a simple 3d scene and finally add the bokeh effect to it. If you are just interested about the bokeh effect itself, go ahead and skip to step 13.

We’re going to create a simple scene with some text in it but first we create a background. Create a Plane ( Create panel > Geometry > Standard Primitives > Plane ) in the front viewport . Modify the Plane ( Make a selection > Modify panel ) according to the following parameters:

  • Length: 200
  • Width: 300
  • length Segs: 1
  • Width Segs: 1

Plane object

Step 3 The Material for the Background Plane

Open Material Editor ( Press ‘m’ in keyboard ) and create the material for the plane:

  1. Click “Get Material” button and select ( doubleclick ) ‘Arch & Design (mi)’ from the list ( Materials > mental ray > Arch & Design ).
  2. Select the plane and assign the material to it.
  3. Color: dark gray ( RGB 0,16 0,16 0,16 ).
  4. Roughness: 0,2 ( smoothens the highlights )
  5. Reflectivity: 0 ( perfectly matte surface )

Matte material settings

Step 4 Text

Create a Text shape ( Create panel > Shapes > Splines > Text ) in the front viewport . Modify the text ( Make a selection > Modify panel ) according to the following parameters:

  • Interpolation
    • Steps: 14 ( the default value is probably enough is you do only a low resolution render )
  • Parameters
    • Font: Century Gothic
    • Alignment: Center
    • Size: 60
    • Text: bokeh effect

Feel free to select different font or write something different. I chose Century Gothic because those round shapes are good at catching highlights.

Text shape in 3ds Max

Step 5 3D Text

At this point the text is just a shape and can’t even be seen in renderings. Let’s turn it to a 3d surface. Add Bevel modifier to the text ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > Bevel ). Apply the following parameters ( Make a selection > Modify panel ) to the Bevel modifier:

  • Parameters
    • Surface
      • Curved Sides: YES
      • Segments: 10 ( 3 is probably enough if you do only a low resolution render )
      • Smooth Across Levels: YES
  • Bevel Values
    • Level 1
      • Height: 4
    • Level 2
      • Height: 1,1
      • Outline: -0,6

3d text

Step 6 Material for the Text

Open Material Editor ( Press ‘m’ in keyboard ) and create the material for the text:

  1. Click “Get Material” button and select ( doubleclick ) ‘Arch & Design (mi)’ from the list ( Materials > mental ray > Arch & Design ).
  2. Select the text and assign the material to it.
  3. Color: beige/brown ( RGB 0,734 0,655 0,5 ).
  4. Glossiness: 0,7
  5. Metal material: YES

Settings for a shiny arch & design material

Step 7 Prepare the Scene for Rendering

Let’s prepare the scene for rendering:

  • Place the text into the center of the plane like in picture below.
  • Create a Target camera ( Create panel > Cameras > Target ) in the top viewport.
  • Right-click on the Perspective view and press ‘c’ in the keyboard to change it to the Camera view.

Rendering text in 3ds Max

Step 8 First Test Render

Now is a good time to render the scene for the first time so hit render ( Main toolbar > Render Production ) and you should see something like the picture below.

default render of text

This is our first render so obviously there are some problems:

  • First of all the image is boring, there is nothing interesting
  • There are some rough edges because of low sampling values

Let’s adjust the sampling settings to get a 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. )

Now the aliasing issues are fixed and it’s time to illuminate the text. By the way, if rendering time is an issue you could use the default sampling values for now and use these high quality settings only in the final rendering.

Step 9 Illumination

Create Mental Ray area omni ( Create panel > Lights > Standard > mr Area Omni ) in the front viewport and apply the following parameters to it ( Make a selection > Modify panel ):

  • Intensity/Color/Attenuation
    • Multiplier: 1,5 ( the intensity of the light )

Place the omni light according to the picture below.

Mental Ray area omni placement

When you render the scene you should get something like the picture below. Move the light if necessary.

illuminated with one omni light

The illumination is improved but the text is too dark and therefore merges with the background. Let’s address these issues with soft shadows and glare. Modify the omni light ( Make a selection > Modify panel ) to get softer shadows:

  • Area Light Parameters
    • Radius: 10

Apply Glare Camera Shader ( Rendering > Render Setup > Renderer > Camera Effects > Camera Shaders > Output > Glare ) Just turn the output shader on, the glare shader should be selected by default. Open Material Editor ( Press ‘m’ in keyboard ) and drag and drop the Glare shader from Camera Shaders to an empty material slot in Material Editor ( make sure to select ‘instance’ when asked ). Make the following adjustments to the Glare shader:

  • Quality: 4
  • Spread: 6

Render the scene the see the effect of these changes. Now shadows are softer and the text is brighter and has a nice glow.

Effect of mr area omni and glare shader

Step 10 Creating Particles

At the moment our scene is really flat so there is no point in adding a bokeh effect just yet. First we’ll create something that will be out of focus in the final rendering. Let’s add some sparkles to the scene. Create a super spray ( Create panel > Geometry > Particle Systems > Super Spray ) in the top viewport and apply ( Make a selection > Modify panel ) the following parameters to it:

  • Particle Generation
    • Particle Quantity
      • Use Total: 1000
    • Particle Motion
      • Speed: 4
    • Particle Timing:
      • Emit Start: -500
      • Emit Stop: 0
      • Life: 500
    • Particle Size
      • Size: 0,5
  • Particle Type
    • Standard Particles: Sphere

Step 11 Path for the Particles

Next we’re going to create a spline and force the particles to travel along it. Create the spline:

  • Activate the Line tool ( Create panel > Shapes > Splines > Line ) and create a line with 4 vertices in the top viewport. The first vertex should be farthest from the camera and the last vertex should be closest to the camera.
  • Select the spline, go to the modify panel, and set ‘Steps’ to 40 ( Interpolation > Steps ).
  • Activate Vertex sub-object level.
  • Select all four vertices, right click on them, and select ‘Bezier’ from the menu.
  • Move the vertices and adjust the bezier handles to create a spline like in the picture below.

    ( For the sake of this tutorial it’s not required to create exactly the same kind of line. However, to be able see
    the effect of a bokeh shader, at least some part of the spline should be close to the camera.
    )

  • Place the super spray to the starting point of the line.

Spline in 3ds Max

Create a path follow object ( Create panel > Space Warps > Forces > Path Follow ), go to the modify panel, and apply the following parameters to it:

  • Current Path: Click ‘Pick Shape Object’ and select the spline we just created
  • Motion Timing
    • Start Frame: -500
    • Travel Time: 500
    • Variation: 20 ( Some variation to the travel time )

Bind the super spray to the path follow object:

  1. Activate ‘Bind to Space Warp’ ( Main toolbar > Bind to Space Warp )
  2. Click and hold on top of the super spray
  3. Release over path follow object

Particles should immediately follow the path like in the picture below.

Binding to space warp

Tip. If you’d like the particles to stray away from the spline, try increasing the particle speed in super spray and/or adjusting Particle Motion settings in the path follow object.

Step 12 Material for the Particles

Open Material Editor ( Press ‘m’ in keyboard ) and create the material for the sparkles:

  1. Click “Get Material” button and select ( doubleclick ) ‘Arch & Design (mi)’ from the list.
  2. Select the super spray and assign the material to it.
  3. Turn self illumination on
  4. Orange (RGB 0,996 0,737 0,459)
  5. Luminance: 2

Glowing material with Mental Ray

Render the scene the see the particles. The glow is really strong but wait till you see it with the Bokeh effect.

Glowing sparkles

Step 13 The Bokeh Effect

Apply ‘Depth of Field / Bokeh’ Camera Shader ( Rendering > Render Setup > Renderer > Camera Effects > Camera Shaders > Lens > Depth of Field / Bokeh ). Open Material Editor ( Press ‘m’ in keyboard ) and drag and drop the bokeh shader from Camera Shaders to an empty material slot in Material Editor ( make sure to select ‘instance’ when asked ). Make the following adjustments to the Bokeh shader:

  • Focus Plane: The distance from the camera to the text ( 301 in my case ). The easiest way to measure the distance is to align the camera target with the text and check the camera target distance from the camera parameters ( Select the camera > Modify panel > Parameters > Target Distance ). Focus plane is the area of the scene that’ll appear sharp in the rendering.
  • Radius of Confusion: 2 ( The amount of blurriness )
  • Samples: 32 ( The quality of the blur. ) This value has a dramatic effect to the rendering time. If the rendering takes too long, decrease this value. I rendered my image with 256 samples to get silky smooth noise free bokeh. The downside was the 7h rendering time with my quad core 2,33GHz Q8200.

Depth of Field / Bokeh settings

Now we’re ready to render the final image with the bokeh effect. I made some adjustments in Photoshop as well:

  • Brightness: +25
  • Contrast: +40

Bokeh effect in 3ds Max

Let’s continue in the discussion. Patience with the rendering!

Posted in 3ds Max Tutorial by polygonblog


3D Underwater Scene

14 May 2010

Underwater 3d sceneIn this tutorial we’re going to create an underwater scene in 3ds Max. We’re going to create a deep blue sea with light rays and bubbles. Creating convincing underwater scene is a challenging task and I’m not even trying to create a physically accurate simulation. Rather I’m using my artistic freedom to neglect some real world rules to get the look and feel I’m going for.


Step 1 Mental Ray Renderer

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

Step 2 The Basic Geometry for the 3D Water

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: 1000
  • Width: 500
  • Length Segs: 200
  • Width Segs: 200

Plane object in the top viewport

( We need a dense (80k faces) mesh because we’re going to deform it with the displace modifier. )

Step 3 Water Surface 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: 17
  • Image
    • Map: Noise

Open Material Editor ( Rendering > Material Editor > Compact Material Editor ). Drag and drop the Noise map from the Displace modifier into a material slot in Material Editor and select ‘instance’ when asked. Apply the following parameters to the Noise map:

  • Noise Parameters
    • Noise Type: Turbulence
    • Levels: 10
    • Size: 300

Displacement map settings and effect on the plane

Step 4 Water Material

Now the water geometry is complete so let’s apply a material to it. Open Material Editor ( Press M in keyboard ), click on the second material slot, and create the material:

  1. Click “Get Material” button and select ( doubleclick ) ‘Arch & Design (mi)’ from the list.
  2. Select the water plane and assign the material to it.
  3. Select template from the drop-down list: Water, Reflective Surface
  4. Transparency: 1,0

Mental Ray water material

In the material settings, go to the ‘Advanced Rendering Options’ rollout and set the following parameter:

  • Advanced Trasparency Options
    • Glass / Translucency treat objects as…: Thin-walled (can use single faces)

Finally we’re going to change the bump map settings to get smaller and steeper waves. In material settings, go the ‘Special Purpose Maps’, click on the Ocean shader, and apply the following parameters:

  • Largest: 100
  • Smallest: 1
  • Quantity: 20
  • Steepness: 5

Parameters of the Ocean shader

Step 5 The Environment for Underwater Scene

Since we have highly reflective and refractive material we desperately need effective environment as well. Without environment, the rendered water surface would just appear black. Next we’re going to cheat in 3ds Max. We’re going to create a highly unrealistic environment. However, it just happens to produce the kind of reflections and refractions I’m going for. So let’s create the environment. Go to the environment settings ( Rendering > Environment… ) and apply the following parameters:

  • Background
    • Use Map: YES
    • Environment Map: Gradient Ramp

Open Material Editor ( press M in keyboard ). Drag and drop the Gradient Ramp map from the background settings into a material slot in Material Editor and select ‘instance’ when asked. Apply the following parameters to the Gradient Ramp map:

  • Coordinates rollout
    • Mapping: Spherical Environment
  • Gradient Ramp Parameters rollout
    • Flag #1: Color: RGB 0, 16, 67 Position: 0
    • Flag #2: Color: RGB 189, 225, 240 Position: 100
    • ( delete the middle Flag by right-clicking and selecting ‘delete’ from the menu )
    • Noise
      • Amount: 1
      • Type: Fractal
      • Size: 2
      • Levels: 10
  • Output rollout
    • Output Amount: 3

Environment map parameters

Step 8 Prepare the 3D Underwater Scene for Rendering

Let’s prepare our underwater scene for the first rendering. Create a Target camera ( Create panel > Cameras > Target ) in the top viewport. Right-click on the Perspective view and press C in the keyboard to change it to the Camera view. Create ‘mr Area Spot’ ( Create panel > Lights > Standard > mr Area Spot ) in the front viewport. Move the camera and spotlight around to get something like the picture below.

Camera and spotlight placement

Apply the following parameters to the area spotlight ( Make a selection > Modify panel ):

  • General Parameters
    • Shadows: OFF
  • Intensity/Color/Attenuation
    • Multiplier: 2

Now it’s a good time to make a test render to see how the water looks like.

Water test render

Some kind of watery effect but it doesn’t look much like an underwater scene yet. Let’s add Fog to make all the difference.

Step 9 Underwater Fog

Go to the Atmosphere settings ( Rendering > Environment… > Atmosphere ) and add the Fog:

  1. Click ‘Add…’ button, select ‘Fog’ from the list and click ‘OK’.
  2. Use Map: YES
  3. Environment Color Map: Gradient Ramp
  4. Open Material Editor ( Press M in keyboard ). Drag and drop the Gradient Ramp map from the Fog settings into a material slot in the Material Editor and select ‘instance’ when asked.
  5. Mapping: Screen
  6. Angle W: 90
  7. Flag #1: Color: RGB 0, 11, 45 Position: 0
  8. Flag #2: Color: RGB 70, 144, 255 Position: 100( delete the middle Flag by right-clicking and selecting ‘delete’ from the menu )
  9. Output Amount: 1,5

Settings for underwater fog

Before we render, let’s adjust environment ranges. Select the camera, go to the modify panel, and apply the following settings:

  • Parameters
    • Environment Ranges
      • Show: YES
      • Near Range: 200
      • Far Range: 810

Now we see the environment range in the viewport. It’s the area between beige and brown line. The fog will appear between these lines. By default the density of the fog is 0% at near range and 100% at far range. Adjust the values or camera position if necessary.

Scene with environmental ranges

Render the scene and you should get something like the picture below. Fog works well in underwater scenes. This time it serves two purposes. It fades the water edge to the background and creates the nice blue gradient color.

You could also try different camera angles to get different kind of water surface.

Basic 3d underwater scene

Step 10 Underwater Light Rays

And of course we’re going to create some light rays to enhance the mood of our underwater scene. Go back to the Atmosphere settings ( Rendering > Environment… > Atmosphere ) and add Volume light effect:

  1. Click ‘Add…’ button, select ‘Volume Light’ from the list and click ‘OK’.
  2. Click ‘Pick Light’ and click on the area spot we created earlier
  3. Density: 7

default volume light settings

If you are not familiar with volume lights, I suggest you render now to see how the effect looks by default (so far we’ve just increased the density a little). The next step is going to have a dramatic effect to the volume light. We’re going to use projector map to block most of the light and to use attenuation to fade the light to the background. Select the area spot, go to the modify panel and apply the following parameters:

  • Intensity/Color/Attenuation
    • Color: RGB 32, 137, 255
    • Far Attenuation
      • Use: YES ( Now you can see the attenuation ranges appearing as lens-shaped sections of the cone )
      • Start: 430 ( Sets the distance at which the light begins to fade out. )
      • End: 650 ( Sets the distance at which the light has faded to zero. )
  • Advanced Effects
      • Projector Map
      • Map: Noise

Open Material Editor ( Press M in keyboard ), drag and drop the Noise map from the projector map slot into a material slot in the Material Editor, and select ‘instance’ when asked. Apply the following parameters to the Noise map:

  • Coordinates
    • Source: Explicit Map Channel
  • Noise Parameters
    • Noise Type: Turbulence
    • Levels: 10
    • Size: 0,05
    • Low: 0,35 ( Decrease this if you need more rays and increase this if you need less rays. )

Light rays with projector map

Render your underwater scene to see the light rays.

3d underwater

Step 11 Underwater Bubbles

Our unrealistic environment might not be perfect for underwater bubbles but let’s see how they look anyway. Create a particle cloud in the left viewport ( Create panel > Geometry > Particle Systems > PCloud ). Select the particle cloud, go to the modify panel and apply the following settings:

  • Basic Parameters
    • Display Icon
      • Rad/len: 230
      • Width: 700
      • Height: 480
  • Particle Generation
    • Particle Quantity
      • Use total: 1000
    • Particle Timing
      • Emit Start: -10
    • Particle Size
      • Particle Size: 1,5
      • Variation: 100
      • Grow for: 0
      • Fade for: 0
  • Particle Type
    • Standard Particles: Sphere

Place the particle cloud so that it fills the view underwater. ( You can also change the size of the emitter if necessary. )

As a final thing we’re going to use a glass material for the bubbles. Press M in keyboard to open the Material editor, select a material slot, and create the material:

  1. Click ‘Get Material’ button and select ( doubleclick ) ‘Arch & Design (mi)’ from the list.
  2. Select the particle cloud and assign the material to it.
  3. Select template from the drop-down list: Glass (Solid Geometry).

Arch & Design glass material

Render the scene to see the bubbles. Some bubbles look ok while some look too bright. Furthermore, these bubbles are perfect spheres so they are not really realistic as underwater bubbles, but at least they are fast and easy to create!

3d underwater scene

Step 12 The Final Render of the 3D Underwater Scene

If you look closely you’ll see some jagged edges in the bubbles. Let’s adjust the sampling settings to get a 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. )

Beware, rendering time might be an issue with all these effects and sampling settings (about 1½h with quad core 2,33GHz Q8200). Render your scene to see the final image. I did some adjusting in Photoshop as well:

  • Contrast: +80
  • I removed a few overly bright bubbles from the lower left corner

Underwater scene

That’s it. Happy rendering!

Posted in 3ds Max Tutorial by polygonblog


Japanese 3d Zen Stones

04 May 2010

Pile of 3d japanese Zen StonesIn this tutorial we are going to create a serene japanese style 3d image in 3ds Max. We’re going to model a shiny dark pebble stones and create a balanced pile out of them. This is a simple tutorial where emphasis is on the lighting and materials. I am using 3ds Max 2011 but several older versions should work as well.


Step 1 Mental Ray Renderer

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

Step 2 3d Stones

Create five geospheres ( Create panel > Geometry > Standard Primitives > GeoSphere ) in the top viewport. Modify the geospheres ( Make a selection > Modify panel ) according to the following parameters :

  • GeoSphere001
    • Radius: 58
    • Segments: 12
    • Geodesic Base Type: Octa
  • GeoSphere002
    • Radius: 44
    • Segments: 12
    • Geodesic Base Type: Octa
  • GeoSphere003
    • Radius: 30
    • Segments: 12
    • Geodesic Base Type: Octa
  • GeoSphere004
    • Radius: 38
    • Segments: 12
    • Geodesic Base Type: Octa
  • GeoSphere005
    • Radius: 14
    • Segments: 12
    • Geodesic Base Type: Octa

Five spheres with varying sizes

Step 3 Scaling the Stones

Go to the front viewport and scale the stones ( Make a selection > Main toolbar > Select and Uniform Scale ) about the Y axis according to the values below. ( While the scale tool is activated, Click and drag from the Y axis of the transform gizmo to scale an object about an Y axis. While scaling, you can see the scaling % in the bottom of the screen. ).

  • GeoSphere001: 21
  • GeoSphere002: 46
  • GeoSphere003: 59
  • GeoSphere004: 15
  • GeoSphere005: no need to scale this one

You don’t have to create exactly the same kind of stones. Feel free to experiment and to be creative.

Effect of the scale operation

Step 4 Deforming with the Noise Modifier

Add Noise modifier, one at a time to each stone except the first one ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > Noise ). By right-clicking you can copy and paste modifiers. Apply the following parameters ( Make a selection > Modify panel ) to the Noise modifiers.

  • GeoSphere002
    • Noise
      • Seed: 11
      • Scale: 690
      • Fractal: YES
    • Strength
      • X: 40
      • Y: 40
      • Z: 40
  • GeoSphere003
    • Noise
      • Seed: 11
      • Scale: 700
      • Fractal: YES
    • Strength
      • X: 60
      • Y: 60
      • Z: 60
  • GeoSphere004
    • Noise
      • Seed: 6
      • Scale: 750
      • Fractal: YES
    • Strength
      • X: 40
      • Y: 40
      • Z: 40
  • GeoSphere005
    • Noise
      • Seed: 6
      • Scale: 560
      • Fractal: YES
    • Strength
      • X: 60
      • Y: 60
      • Z: 60

Deforming 3d zen stones with the Noise modifier

( If you need more segments I suggest you add TurboSmooth above the Noise instead of raising the segments value. This method produces smoother surface. )

Step 5 Pile of Japanese 3d Stones

Create a pile of stones balancing on top of each other. It’s a typical arrangement of stones seen in many zen-like photos and illustrations. Move and rotate the stones as you see fit.

Pile of balanced stones in 3ds max

Step 6 The Water Around the Stones

Next we’re going to create a water surface and some ripples around the pebbles to make the scene more interesting. 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: 10000
  • Width: 10000
  • Length Segs: 20
  • Width Segs: 20

Add Edit Poly modifier to the plane ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > Edit Poly ) and activate the Polygon sub-object level. Select one polygon approximately in the middle of the plane and delete it ( Press delete in keyboard ). Deactivate the Polygon sub-object level.

Deleting polygon

Step 7 The Ripples Around the Stone

Now we’re going to create a dense mesh for the ripple effect. Create another Plane ( Create panel > Geometry > Standard Primitives > Plane ) in the top viewport and apply the following parameters ( Make a selection > Modify panel ):

  • Length: 500
  • Width: 500
  • Length Segs: 130
  • Width Segs: 130

Place the new plane into the hole of the large plane. Add TurboSmooth modifier ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > TurboSmooth ) and then Ripple modifier to it ( Make a selection > Modify panel > Modifier List > Object-Space Modifiers > Ripple ). Go to the modify panel and apply the following parameters to the Ripple modifier:

  • Amplitude 1: 2
  • Amplitude 2: 2
  • Wave Length: 25
  • Decay: 0,02

Tip. If you need more polygons to your object you can just increase the iterations value in the Turbosmooth modifier.

Effect of the Ripple modifier in 3d max

Step 8 Prepare the Scene for Rendering

Let’s prepare the scene for rendering:

  • Place the pebbles into the center of the ripple.
  • Create a Target camera ( Create panel > Cameras > Target ) in the top viewport. Right-click on the Perspective view and press C in the keyboard to change it to the Camera view.
  • Move the pebbles and the camera around to get something like pictures below.

camera placement

Hit render ( Main toolbar > Render Production ) and you should see something like the picture below.

balanced stones

The colors of the objects don’t matter because we’re going to create materials for them.

Step 9 Material for the 3D Zen Stones

Press M in keyboard to open Material Editor ( Rendering > Material Editor > Compact Material Editor ) and create the material for the stones:

  1. Click ‘Get Material’ button and select ( doubleclick ) ‘Arch & Design (mi)’ from the material list.
  2. Select all the stones and assign the material to them.
  3. Reflectivity: 0,6
  4. Glossiness: 0,1 ( very blurry reflections )
  5. Glossy Samples: 16 ( quality of the blurry reflections )
  6. Add ‘Composite’ as diffuse color map ( Composite map is a container that lets you combine several maps as layers )
  7. Add Smoke map to the first layer of the Composite Map ( large scale details )Size: 40# Iterations: 20

    Color #1: black ( RGB 0, 0, 0 )

    Color #2: dark gray ( RGB 15, 15, 15 )

  8. Add second layer to the Composite map. Change the blending mode of the second layer to Addition. Add Speckle map to the second layer ( small scale details )Size: 0,2Color #1: dark gray ( RGB 10, 10, 10 )

    Color #2: black ( RGB 0, 0, 0 )

Material for japanese 3d stones

Step 10 Water Material

Select a new slot in the Material Editor and create the water material:

  1. Click ‘Get Material’ button and select ( doubleclick ) ‘Arch & Design (mi)’ from the list.
  2. Select both water planes and assign the material to them.
  3. Select template from the drop-down list: Water, Reflective Surface.
  4. Turn Bump map off ( we’re going to create calm water with just the ripple effect so we don’t need any additional waves ).

Arch & Design water material without waves

Now materials are ready. However, there’s no point in rendering the scene now because everything we have is almost black. Let’s create illumination and environment first.

Step 11 Illumination and Environment

We’re going to illuminate the scene with the Daylight system and use Mental Ray’s physical sky as environment map. Daylight is a system that mimics a real world sun. Create the Daylight system ( Create panel > Systems > Daylight ) in the top viewport. A new dialog appears. 3ds Max suggests that you use mr Photographic Exposure Control with EV=15. Just click YES. ( If the dialog doesn’t appear, apply the setting manually ( Rendering > Exposure Control )). Select the daylight, go to the modify panel, and apply the following parameters:

  • Daylight Parameters
    • Sunlight: mr Sun
    • Skylight: mr Sky(A new dialog appears. 3ds Max suggests that you use mr Physical Sky. Just click YES. If the dialog doesn’t appear, apply the setting manually ( Rendering > Environment… > Common Parameters > Background > Environment Map ))
    • Position: Manual ( this setting allows us to place the sun manually, instead of using a real world location and time )

Place the daylight according to the picture below.

Placing the daylight

Render your scene to see something like the picture below.

3d zen stones

Let’s examine our 3d zen render for a while. There are several problems that need to be addressed.

  • The whole image is very dark
  • Some ground can be seen in the horizon
  • The bluish coloring isn’t appealing

( Note that these are artistic observations and your taste might be different. Feel free to experiment. )

Step 12 Tuning the Settings for Better Impact

Select the Daylight, go to the modify panel, and apply the following parameters:

  • mr Sun Basic Parameters
    • Multiplier: 10 ( really strong sunlight )
    • Shadows
      • Softness: 20 ( softens the edges of the shadows )
  • mr Sky Parameters
    • Multiplier: 5 ( brightens the sky )
  • my Sky Advanced Parameters
    • Horizon
      • Height: -0,1 ( lowers the horizon )

Render the scene to see the effect of these adjustments.

3d zen stone in the water

Look closely and you’ll see the color variations in the stones. Smoke map produces the large scale variations and Speckle map produces the small scale variations.

Personally I think that black and white image works better in this case. Let’s go to the mr Photographic Exposure Control settings ( Rendering > Exposure Control > mr Photographic Exposure Control ) to make the image black and white:

  • Image Control
    • Color Saturation: 0 ( saturation of the colors of the whole image )

Render your scene to see the image in black and white.

3d zen

Step 20 Render the Final Japanese 3d Zen Image

If you look closely you’ll see some jagged edges. Let’s adjust the sampling settings to get a 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. )

japanese pebbles in 3d

Render the image and you’re done. That’s it for today. Let’s continue in the comments!

Posted in 3ds Max Tutorial by polygonblog