Wednesday, 14 August 2013

Create a Human Face in 3d Max

Create reference pictures in 3D Studio MAX according to picture below . Change Left view to Right view.

Start the modeling by creating a plane object in the Front view. Change the width and height segments in the plane object to one. Turn the plane object into Editable Poly (right-click the plane object in modify panel and choose Editable Poly from the menu) Now the object is Editable Poly so you can freely edit it by working in sub-object modes. Activate vertex sub-object mode and move the vertices of the polygon approximately according to picture 1.
Every time you move vertices, segments or polygons or you create new polygons, make sure you check their location both in Front and Right views.
pic-1

Create 8 new polygons by copying edges:
Activate edge sub-object mode in Editable Poly
Choose the edge you want to copy
Press shift in keyboard and move the edge
Place the new polygons approximately according to picture 2. Remember that you can move polygons in several different ways:
in vertex sub-object mode you can move vertices (the most flexible way)
in edge sub-object mode you can move edges
in polygon sub-object mode you can move polygons
pic-2

Add symmetry modifier to the model. If necessary adjust the settings of the symmetry modifier. The Symmetry modifier is used to mirror the object horizontally. We still continue to work on the left side of the 3D model and the right side is constructed automatically because of the Symmetry modifier. Now the 3D model should look like in the picture 3.
pic-3

Choose Editable Poly from the modifier stack and turn on "Show end result on / off toggle ". Now you can see the effect of the Symmetry modifier even when you are working in Editable Poly section.
Add Meshsmooth modifier on top of Symmetry modifier and set iterations to 2. Now you see what the complete surface will look like. While working it's often recommended to turn off the Meshsmooth modifier but turn it on every time you want to see the final surface. If meshmooth modifier is on, the model can be too complicated for hardware and the modeling might slow down.
Create new polygons by copying edges. Activate edge sub-object mode in Editable Poly. First choose 9 edges surrounding the lips and copy them by pressing shift in keyboard and using the scale function in 3DS MAX. (You can always copy objects by pressing shift key and using move, rotate or scale functions). Place the new polygons according to picture 4. Repeat the operation and create another ring of polygons to the mouth according to picture 5. Now the outer side of the mouth is complete.
pic-4

pic-5

Activate the polygon sub-object mode and choose any polygon of the mouth. Press shift in keyboard and copy the polygon under the eye according to picture 1. While copying you are asked whether you want the new polygon to be a separate object or part of the current object. Choose the default option (clone to element). Now the new polygon is part of the same object you have been working on so far.
pic-1

Create 9 new polygons by copying edges and place them approximately according to picture 2.
At the moment there is a small gap between two polygons under the eye. Remove the gap by using Editable Poly's Target Weld function in edge sub-object mode:
Activate the edge sub-object mode
Activate Target Weld mode
Click and hold on top of another edge and move it on top of the edge you want to weld it with. Two edges are welded into one.
pic-2

Activate the border sub-object mode in Editable Poly. In the border mode you can select all edges that circle the element by one click. Click one of the outer edges to select all outer edges (border) of the eye. Create new polygons by scaling with shift key pressed and place them according to picture 3.
Now the socket for the eye is complete. Later you might be interested about how to create eyes in 3DS MAX.
pic-3

Create new polygons by copying edges according to picture 4. Start from the corner of the eye and remember to check location of each polygon both in Front and Right views. Use Editable Poly's Target Weld if necessary.
pic-4

Create four new polygons according to picture 5 by using Editable Poly's Create function. Creating four sided polygons with Create function: Click Create button
Click on top of the first vertex
Click on top of the second vertex
Click on top of the third vertex
Double click on top of the fourth vertex
pic-5

Divide the two upper polygons into three parts according to picture 1 by using Editable Poly's Cut function. Using the Cut:
Click Cut button in polygon sub-object mode.
Click on the left edge of the left polygon.
Click on the shared edge of the polygons.
Click on the right edge of the right polygon.
Click the right mouse button twice to stop using the Cut.
After cutting the polygons place them according to picture 1.
pic-1

Fill the hole in the nose by creating 9 new polygons according to picture 2. Create the new polygons by copying edges and using Editable Poly's Create function. Use Target Weld to weld vertices together when necessary.
pic-2

Create two new polygons by copying edges and place them according to the picture 3.
pic-3

Always remember to weld edges or vertices of adjacent polygons by using Editable Poly's Target Weld function. There should never be duplicate vertices or edges in a 3D model.
Fill the hole in the lower part of the nose by creating 7 new four edged polygons according to picture 4. There will be a hole in the middle of the new polygons for the nostril.
pic-4

Fill the hole with one three sided polygon and one four sided polygon. Select the two new polygons and create the nostril by using Editable Poly's Extrude function according to picture 5:
Find a view like in picture 5
Click on the Extrude button
Click and hold on top of the selected polygons and move the mouse
pic-5

Create 8 new polygons by copying edges and place them according to picture 1. Remember to use Editable Poly's Target Weld when necessary.
pic-1

Create 6 new polygons by copying edges and place them according to picture 2. Like you notice the location of the polygons doesn't exactly follow the profile in the reference picture. The less polygons there are in the model, the more the form must be exaggerated.
In this tutorial the goal is to use as little polygons as possible but still to create reasonably realistic head. Remember that the final surface is formed only when the Meshsmooth modifier is turned on. You should try the effect of the Meshsmooth modifier every now and then.
pic-2

Create new polygons by copying edges and place them according to picture 3. Remember to use Editable Poly's Target Weld when necessary.
pic-3

Fill the hole in the face by creating new polygons according to picture 4. Now the face is complete and it should look approximately like in picture 4. This is a good stage to fix characteristics of the face if necessary. Next you will model the back of the head, the neck and the ear.
pic-4

Create 10 new four sided polygons to the lower part of the jaw and place them according to picture 5.
pic-5

Create 10 new polygons by copying edges according to picture 1. A hole will be left to the location of the ear at this stage. The ear is modeled and attached to the model later as a separate object because of its complexity.
pic-1

Create 12 new polygons by copying edges according to picture 2. Remember to use Editable Poly's Target Weld when necessary.
pic-2

Create 20 new polygons to the back of the head by copying edges according to picture 3. Remember to use Editable Poly's Target Weld when necessary.
pic-3

Create 6 new polygons to the neck by copying edges and place them according to picture 4. Remember to use Editable Poly's Target Weld when necessary.
pic-4

3D model of the head is now complete besides the ear. This is a good stage to fix characteristics of the head if necessary. Finalizing the forms of the head is easier now that the model is complete. The model should look like approximately like in picture 5.
pic-5

Hide the 3D model of the head and create a new plane object in the Right view. Change the width and height segments in the plane object to one.
Turn the plane object into Editable Poly and create new polygons by copying edges according to picture 1.
Remember to use Editable Poly's Target Weld function to weld polygons together when necessary.
pic-1

Create 4 new polygons by copying edges and place them according to picture 2. Remember to check the location and orientation of the polygons both in the Right and Front views.
pic-2

Select 8 edges and create 8 new polygons by copying the selected edges inwards according to picture 3.
pic-3

Create 8 new polygons to the deepest part of the ear according to picture 4. Notice that all 8 polygons are four sided (quads) even though some of them might look like three sided.
pic-4

Select 11 edges and create new polygons by copying selected edges inwards according to picture 5. Notice that two vertices must be welded by using Editable Poly's Target Weld in the location marked with yellow circle.
pic-5

Select 10 edges and create new polygons inside the ear by copying edges according to picture 1. Notice, that in three places (marked with yellow circles) vertices have to be welded by using Editable Poly's Target Weld.
pic-1

Select 11 edges and create new polygons by copying edges according to picture 2.
pic-2

Finalize the inner part of the ear by creating new polygons according to picture 3. I count 15 new four sided polygons. Don't worry if you create more or less than 15 polygons. At this stage it's not that important how many polygons there are but how the ear looks like.
pic-3

Select 14 edges and create new polygons by copying edges towards the head according to picture 4. Notice that in four places (marked with yellow circles) vertices have to be welded by using Editable Poly's Target Weld.
pic-4

Select 13 edges in the back of the ear and create new polygons by copying edges according to picture 5.

Create 8 new polygons to the back of the ear according to picture 1. The idea is to decrease the amount of polygons so that it would be easier to attach the ear to the 3D-model of the head.
pic-1

Now the ear is complete and next you will attach it to the 3D model of the head. Activate the border sub-object mode and select all the edges surrounding the hole according to picture 2.
pic-2

 After that click Editable Poly's "Create Shape From Selection" button. Choose Linear as a Shape Type and click OK. You just created a new spline object. Hide the ear and unhide the head. The situation should now be similar to picture 3.
pic-3

Activate vertex sub-object mode and use Editable Poly's Attach button to attach the spline object to the head. Spline object will disappear and its vertices are now part of the 3D-model of the head. Activate polygon sub-object mode and use Editable Poly's Create function to create 13 new polygons according to the picture 4. Now there is a hole in the head which matches exactly to the hole in the ear.
pic-4

Unhide the ear and attach it to the head by using Editable Poly's Attach function. Now the head and the ear are the same object but there are duplicate vertices in the seam which must be welded. Select all the vertices (24) in the seam and click Editable Poly's settings button next to the Weld button. Rise the Weld threshold value big enough so that the amount in After is 12 less than the amount in Before. Click OK.
Move vertices in the ear and around it to make the ear look as natural as possible. Also fix other parts of the head if necessary.
Activate border sub-object mode and select all edges surrounding the eye hole and create new polygons by copying edges inwards according to picture 1.
pic-1

Select 9 edges surrounding the hole in the mouth and create new polygons by copying edges inwards according to picture 2.
pic-2

Activate polygon sub-object mode and use Editable Poly's "Hide Selected" and "Hide Unselected" buttons to hide all polygons except the ones surrounding the mouth. Create new polygons inside the mouth according to picture 3.
pic-3

Unhide all polygons and finalize the head. The head is now easier to finalize because all polygons have been created. The complete 3D model could look for example like in picture 4.
pic-4

3DS MAX Mental Ray using...

I use my diamond models but you could just use the Hedra primitive (Create > Extended Primitives > Hedra) to create some jewels in seconds. Just create two Hedra objects and place them on a Plane object to create something similar to my scene. Change the color of the Plane object to white. Create a camera and make sure that you don't see the edges of the Plane object in the view. Change the size of the Plane object when necessary. If you would like to create a 3D diamond model I suggest the following: use Google to find diamond blueprints and model a diamond using poly modeling techniques.



Let's change the renderer from Scanline Renderer to Mental Ray renderer:
Open rendering settings (Rendering > Render...).
Expand Assign Renderer group on Common tab.
Change the Production renderer from Default Scanline renderer to mental ray renderer
You could try to render an image. At this stage the Mental Ray rendering will look almost exactly like the rendering with the Scanline renderer. Actually the Mental Ray rendering looks a little worse because of the jagged edges.

Let's start by creating Mental Ray material for the diamonds. Open material editor (Rendering > Material Editor...) and assign the first material to the diamonds. The goal is to create a material that would be suitable for a diamond. Let's make the following adjustments to the material: Main Material Parameters
Change the material from Standard to Arch & Design. Arch & Design is a very powerful Mental Ray material which can be applied to many different situations (For example ambient occlusion is achieved with Arch & Design material)

Change the Transparency to 1,0 to make the material fully transparent
Change the IOR to 2,42. This is actually a value that 3DS MAX suggests for a diamond in a tool tip
Change the Reflectivity to 1,0 to make the material fully reflective.

Illumination plays a big part in diamond rendering. Luckily you can use standard 3DS MAX lights also with Mental Ray. Let's illuminate the whole scene by using Skylight:
Create Skylight (Create > Lights > Standard Lights > Skylight)
Change the color of the Skylight to pure white. (By default the color of the Skylight is light blue).
In order to use Skylight with Mental Ray, you have to use Final Gather. Enable Final Gather (Rendering > Render... > Indirect Illumination > Final Gather > Enable Final Gather)

Render the scene with Mental Ray to see how your diamonds look like. The rendering should look similar to picture below.
Diamonds look already better but there are still some problems:
Diamonds are too black
There are no specular highlights
Let's fix these issues to achieve more realistic Mental Ray rendering.

Change the background color to pure white (Rendering > Environment...). Render the scene with Mental Ray to see the effect of changing the background color. As a result the diamonds are brighter. The rendering should now look like in picture below.

Now the surrounding is pure white color and therefore the diamonds look little too bright and flat. Let's create some dark objects around them to achieve more interesting reflections:
Create a grid of 25 boxes like in picture below and place them on top of the diamonds.


Change the color of the boxes to black
Render a test image. Now the rendering should look similar to picture below. Diamonds should look more real.


There are some pretty light spots in the diamonds but real specular highlights are still missing. When you see diamonds in real life there are always several light sources around that produce specular highlights. Let's add more light sources to our scene:
Create an Omni light and make 7 instance copies of it. Now you have 8 Omni lights.
Change the multiplier of the Omni lights to 0,2 (Omni > Intensity/Color/Attenuation > Multiplier)
Turn the diffuse effect off so that the lights affect only the specular characteristic of the materials (Omni > Advanced effect > Affect Surfaces > Diffuse)
Place the Omni lights randomly around the diamonds like in picture below. Just make sure that light comes from many different directions. Avoid symmetrical arrangement.

Make a test renderings with Mental Ray and adjust the placing of the lights if necessary. The rendering should be similar to picture below.

Let's increase the realism by using Mental Ray to create caustics effect with the diamonds. Caustics have to be enabled in three separate locations: lights, geometry and Mental Ray rendering settings:
Select all Omni lights and all diamonds. Right click on them and select Object Properties... from the menu. Select mental ray tab and turn 'Generate Caustics' on.
Go to Mental Ray rendering settings and enable caustics (Rendering > Render... > Indirect Illumination > Caustics and Global Illumination (GI) > Caustics > Enable).
Make a test rendering using Mental Ray to see how the caustics look like. If you can't see any effect your geometry is probably too large. Try changing the diameter of the diamond to around 0,1. (I use metric system and the diameter of my diamond is about 0,07. That's a huge diamond;) By default my caustics look like in picture below.)

At the moment the caustics effect is far too strong. Let's make a few adjustments to it:
Change the Multiplier to 0,03. (Rendering > Render... > Indirect Illumination > Caustics and Global Illumination (GI) > Caustics > Multiplier) Change 'Average Caustic Photons per Light' to 40000 to make caustics more defined. (Rendering > Render... > Indirect Illumination > Caustics and Global Illumination (GI) > Light Properties > Average Caustic Photons per Light)
Render the final image. Now the Mental Ray rendering should look similar to picture below.
If you are rendering a large picture I recommend increasing the sampling quality (Rendering > Render... > Renderer > Sampling Quality) by increasing Samples per Pixel minimum and maximum values a few steps.