Advertisement
  1. 3D & Motion Graphics
  2. Maya
Cgi

Create a Realistic Shark in Maya using Subdivision Surfaces: Part 2

by
Difficulty:IntermediateLength:LongLanguages:
This post is part of a series called Create a Realistic Shark in Maya.
Create a Realistic Shark in Maya using Subdivision Surfaces: Part 3

In this part of the tutorial, you'll learn how to unwrap and texture the shark model. This time we'll explore a different method of texturing inside Maya, which is called 3D paint. This is somewhat like painting in ZBrush or MudBox and allows for direct 3D painting in Maya's viewports.


Additional Files:


1. Unwrapping

Step 1

To start, let’s open the shark file which we saved in the previous part of the tutorial.

Maya_Shark_PT2_1

Step 2

In the previous part, we applied UVs to the shark's body before converting it into subdivision. So we now need to flatten each part so we can use the 3D Paint Tool in Maya. With the shark body selected and while in Polygon mode, go to the Edit UVs menu and select UV Texture Editor.

Maya_Shark_PT2_2

This will open the UV Texture Editor window.

Maya_Shark_PT2_2a

Step 3

Now press the F10 key to enter Edge Selection Mode, and then Double Click on both side fin edges to select the entire loop as shown.

Maya_Shark_PT2_3

Step 4

With the edge loops selected, go to the Polygon menu in the UV Texture Editor window and select the Cut UV Edges command to extract a separate shell.

Maya_Shark_PT2_4

Step 5

Now Right Click on the shark UVs in the UV Texture Editor, and select UV in the fly-out menu as shown in the following image.

Maya_Shark_PT2_5

Step 6

Select the UVs of the fin shell (which we cut in Step 4) and with the Control key pressed, Right Click on the fin shell and choose the To Shell command, to select all the UVs for the shell.

Maya_Shark_PT2_6

Step 7

Now move the shell away from the main body UVs and place it in a different location, as shown.

Maya_Shark_PT2_7

Step 8

Using the same technique, extract the fin shell and the other side. And also move it away as shown.

Maya_Shark_PT2_8

Step 9

While in Edge Selection Mode, Double Click on the edge that outlines the shark's mouth, to select the entire loop.

Maya_Shark_PT2_9

Step 10

With the edge loops selected, once again go to the Polygon menu in the UV Texture Editor, and select the Cut UV Edges command to extract the separate shell.

Maya_Shark_PT2_10

Step 11

Using the same procedure, I have extracted all the folded UV shells and arranged them separately as shown below.

Maya_Shark_PT2_11

Step 12

Next we need to relax and unfold all the UV shells. With one of the UV shells for the shark's body selected, go to the Polygon menu in the UV Texture Editor window, and click on the Relax options box.

Maya_Shark_PT2_12

Step 13

In the Relax UVs Options window, check on Pin UV Border and set the Maximum Iterations value to 2, and then click on the Relax button.

Maya_Shark_PT2_13

Step 14

You will see the selected UVs being relaxed into a proper flow.

Maya_Shark_PT2_14

Step 15

Following the same method, I have also relaxed the UVs for the other side.

Maya_Shark_PT2_15

Step 16

We now have to cut and separate the top and bottom faces of the shark's fins. So, press the F10 key to enter Edge Selection Mode, and then select the edge loops of both fins as shown.

Maya_Shark_PT2_16

Go to the Polygon menu in the UVs Texture Editor window and select Cut UV Edges.

Maya_Shark_PT2_16a

Step 17

Following the same process, I have extracted the shells for both fins properly.

Maya_Shark_PT2_17

Step 18

We now need to take care of the flipped faces. To see which faces are flipped, click on the Shaded UV Display button in the UV Texture Editor window. This will display the flipped UVs in red.

Maya_Shark_PT2_18

Step 19

Next select any of the flipped UV shells, go to the Polygons menu in the UV Texture Editor window and click on the Flip command to flip the selected UV shells.

Maya_Shark_PT2_19

You will see the selected UV shells are now flipped.

Maya_Shark_PT2_19a

Step 20

Repeating the same process, flip all the necessary UV shells one by one.

Maya_Shark_PT2_20

Step 21

After flipping the UV shells, we need to sew and flatten them. With one side of the border edge selected (highlighted below), go to the Polygon menu and select Move and Sew UV Edges. This will sew the corresponding edges together.

Maya_Shark_PT2_21

Step 22

After sewing the shells together, we need to relax and unfold them. So with a UV shell selected, go to the Tool menu and select the Smooth UV Tool.

Maya_Shark_PT2_22

Step 23

You'll see the Smooth UV Tool on the grid. Click on the Unfold and Relax buttons as required to flatten the UVs as shown.

Maya_Shark_PT2_23

Step 24

Here you can see the selected UV shell unfolded and relaxed properly.

Maya_Shark_PT2_24

Step 25

Using the same techniques, I have unfolded and relaxed each and every UV shell. Now it’s time for painting and applying our texture map.

Maya_Shark_PT2_25

2. 3D Texture Painting: Color Map

Step 1

Before starting our 3D painting, we have to remember one thing. We already converted the mesh from polygons into subdivision earlier in part 1, but then converted it back into polygons, so the unwrapping could be completed properly and in detail.
Since we have now completed the unwrapping process properly, it’s time to convert the polygon mesh back to subdivision once again. So with the shark's body selected, go to the Modify menu on the main menu bar and select the Polygon to Subdiv command, from inside the Convert submenu.

Maya_Shark_PT2_26

Step 2

Now turn on Rendering mode (or press the F6 key on the keyboard.)

Maya_Shark_PT2_27

Step 3

Go to the Texturing menu and click on the 3D Paint Tool options box.

Maya_Shark_PT2_28

Step 4

This opens a new panel for the 3D Paint Tool inside the Attribute Editor.

Maya_Shark_PT2_29

Step 5

Inside the 3D Paint Tool attributes, open the File Textures drop down menu and set the Attribute to Paint option to Color, and then click on the Assign/Edit Textures button to assign the texture map. This step is necessary as you can’t paint without setting this up.

Maya_Shark_PT2_30

Step 6

Clicking on the Assign/Edit Textures button opens the Assign/Edit File Textures window. Here set the values for Size X and Size Y to 2048, and choose JPEG (jpg) as the Image Format. Then click on the Assign/Edit Textures button, to create and assign the texture to the selected mesh.

Maya_Shark_PT2_31

Step 7

Also expand the Stroke drop down menu, check on the Reflection option, with the Reflection Axis set to X. With this option turned on, you can paint on both sides of the mesh symmetrically.

Maya_Shark_PT2_32

Step 8

Now we'll start painting. First, choose a dark black Color with the Opacity value set to something like 0.21.

Maya_Shark_PT2_33

Step 9

Go to the Flood panel and set the Color to pure white, then click on Flood Paint button to apply the white color onto the entire shark mesh.

Maya_Shark_PT2_34

Step 10

You can see the result below.

Maya_Shark_PT2_35

Step 11

Now with the dark black color selected, start painting on the shark’s upper body. Something similar to what's shown below.

Maya_Shark_PT2_36

Step 12

Now we'll paint some dirt and dust patches on the shark's body. Change the Color to very dark black and increase the Opacity value to something like 0.32. Then click on the File Browser button.

Maya_Shark_PT2_37

Step 13

Clicking on the File Browser button opens the Open window. Here select dapple.jpg file (included with the default Maya install.)

Maya_Shark_PT2_38

Step 14

With the dapple.jpg image selected, start painting dust and dirt on the shark model.

Maya_Shark_PT2_39

Step 15

You can also use the Blur tool inside the Paint Operations panel.

Maya_Shark_PT2_40

Step 16

Now try to blur the patches in an artistic way, and also blur the paint seams if needed.

Maya_Shark_PT2_41

Step 17

Once again with the same texture brush selected, change the Color to pure white and increase the Opacity value to around 0.75. Also turn on the Paint Radio button, as shown in the image.

Maya_Shark_PT2_42

Step 18

Now paint some white patches as shown.

Maya_Shark_PT2_43

Step 19

To add more variety, change the texture brush file to hatch.jpg (also included with the default Maya install) to paint some scratches on the skin. You can also use your own textures.

Maya_Shark_PT2_44

Step 20

Take the white color and increase the Opacity value to something like 0.95.

Maya_Shark_PT2_45

Step 21

Now paint some scratches on the skin.

Maya_Shark_PT2_46

Step 22

We'll also paint some more patches, such as dotted spots. So first change the texture to sand.jpg (also included with the default Maya install.)

Maya_Shark_PT2_47

Step 23

This area should also have some color. Change the color to red, with an Opacity value of 1.0. Now if you paint the bottom of the fin, you'll see some red spots. Keep painting artistically according to your needs.

Maya_Shark_PT2_48

Step 24

Now we'll paint the gums of the shark. Pick a pink color with an Opacity value of 0.67, and start painting the gums as shown in the image.

Maya_Shark_PT2_49

Step 25

With the same brush, color and opacity values selected. Increase the brush size by pressing B and dragging the Left Mouse Button to the left and right, to increase or decrease the size. With an increased brush size, paint some patches on the bottom of the shark.

Maya_Shark_PT2_50

Step 26

We have completed the 3D painting on the shark's body. You can always choose your own colors and settings to further customize the look of your model.

Maya_Shark_PT2_51

Step 27

After completing the texture painting, we need to save the texture for retouching in Photoshop, so we can get a much better look for the texture and colors. Scroll down in the 3D Paint Attributes and go to the File Textures option, and click on the Save Textures button to save the texture file.

Maya_Shark_PT2_52

3. 3D Texture Painting: Bump Map

Step 1

Now we'll generate the bump map. Open the Attribute to Paint drop down menu and select BumpMap, as shown in the image.

Maya_Shark_PT2_53

Step 2

After selecting Bump Map, select the shark and click on the Assign/Edit Textures button to assign the bump map to the selected shark mesh. When we apply a bump map for painting, the color texture may not display in the viewport.

Maya_Shark_PT2_54

Step 3

After clicking on the Assign/Edit Textures button, it will open the Assign/Edit Textures settings box. Here set the Size X and Size Y values to a 2048 resolution, and then click on the Assign/Edit Textures button.

Maya_Shark_PT2_55

Step 4

Now click on the File Browser button in the 3D Paint Attributes, and select the sand.jpg file for the texture brush profile. Finally click on the Open button.

Maya_Shark_PT2_56

Step 5

Paint the bump wherever you want to have it. You can’t see the bump in the viewport, only in a rendered frame.

Maya_Shark_PT2_57

Step 6

Render a frame to see how it looks. There is excess bumpiness, which is not looking good.

Maya_Shark_PT2_58

Step 7

To adjust the bump depth, go to Window > Rendering Editors > Hypershade to open the Hypershade window.

Maya_Shark_PT2_59

Step 8

In the Hypershade window, apply the Blinn 3 shader node (which is a bump texture node.) Select it and drag it inside the Work Area, as shown in the image below.

Maya_Shark_PT2_60

Step 9

To rename the shader node, Right Click on it and select Rename from the fly-out menu.

Maya_Shark_PT2_61

In the Rename node box, type Shark Texture and click OK.

Maya_Shark_PT2_61a

Step 10

Again Right Click on the same Shark Texture node and choose Graph Network from the fly-out menu, to extract the node connection.

Maya_Shark_PT2_62

Step 11

Now you can see the extracted graph nodes as shown in the image. Double Click on the Bump node to open the bump Attribute Editor.

Maya_Shark_PT2_63

Step 12

In the Attribute Editor, under 2d Bump Attributes, set the Bump Depth value to 0.020.

Maya_Shark_PT2_64

Step 13

Now render the frame again and you'll see the bumpiness has been reduced.

Maya_Shark_PT2_65

4. 3D Texture Painting: Specular Map

Step 1

Let’s now apply a specular color texture map, just like we did for the color and bump. Go to the 3D Paint Attributes Editor and choose SpecularColor, from the Attribute to paint drop down menu, inside the File Textures section.

Maya_Shark_PT2_66

Step 2

After clicking on the Assign/Edit Textures button, it will open the Assign/Edit Textures settings box. Again set the Size X and Size Y values to a 2048 resolution, and click on the Assign/Edit Textures button.

Maya_Shark_PT2_67

Step 3

After assigning the texture, select the Artisan Smooth Blur Brush and a white color, and start painting the specular around the top surface of the shark mesh.

Maya_Shark_PT2_68

Step 4

After painting the specular color, the rendered scene will look like this.

Maya_Shark_PT2_69

Step 5

To see the texture in viewport, change the Attribute to paint option to Color, from inside the File Textures section of the 3D Paint Attribute Editor.

Maya_Shark_PT2_70

5. Applying Shaders

Step 1

Now with both eyeballs selected, Right Click and select Assign Favorite Material > Blinn.

Maya_Shark_PT2_71

Step 2

In the Blinn Attribute Editor, change the color to a dark blue as shown in the image.

Maya_Shark_PT2_72

Step 3

Scroll down to the Specular Shading panel and change the Eccentricity value to 0.150, the Specular Roll Off value to 0.800 and the Specular Color to white, to add glossiness to the eyeballs.

Maya_Shark_PT2_73

Step 4

We now need to apply a shader to the teeth mesh group. First go to Window > Outliner. We have already grouped all the upper and lower teeth in the Outliner window, so select the Teeth group.

Maya_Shark_PT2_74

Step 5

With the Teeth group selected, apply a new Blinn shader node and change its color to pure white.

Maya_Shark_PT2_75

Step 6

We have now completed the shark texturing process. Be sure to Save the file to use in the next part of the tutorial.

Maya_Shark_PT2_76

Conclusion

This is the final result of our well textured shark.

Maya_Shark_PT2_77

After doing some lighting and compositing in Photoshop, it looks like this.

Maya_Shark_PT2_77a

Advertisement
Advertisement
Looking for something to help kick start your next project?
Envato Market has a range of items for sale to help get you started.