مدل و ساخت کابل usb واقعی با Maya and Mental Ray / زبان اصلی

R0xanA

متخصص بخش گرافیک و مالتی مدیا
Model and Texture a Photorealistic USB Cable with Maya and Mental Ray: Part 1
FINAL_IMAGE_600px.jpg

In this tutorial you will go through the process of modeling and rendering a Photorealistic USB cable in Autodesk Maya. You will also learn to use Mental Ray, along with the new architectural materials, rendering layers, and Photoshop, to create a fast, accurate, and photorealistic depth of field.This is part 1 of the tutorial: the modeling process.
[h=2]Step 1
Create a primitive cube and scale it to match the size of a USB.
1.jpg
[h=2]Step 2
Under the “Polygons” menu, go to the “Edit Mesh > Insert Edge Loop Tool".
2.jpg
[h=2]Step 3
Create 2 edge loops.
3.jpg
[h=2]Step 4
Select 8 vertexes from the end of the geometry, and with the scale and move tools, modify the geometry to match the basic shape of a USB.
4.jpg
[h=2]Step 5
This is how it should look (depending on the type of USB cable you are trying model).
5.jpg
[h=2]Step 6
Select the front face of the USB.
6.jpg
[h=2]Step 7
With that same face still selected, go to “Edit Mesh > Extrude”, and create an inner face.
7.jpg


 

R0xanA

متخصص بخش گرافیک و مالتی مدیا
[h=2]Step 8
Once again, go to “Edit Mesh > Extrude”, and extrude the face inward a bit.
8.jpg
[h=2]Step 9
Go to “Edit Mesh > Insert Edge Loop Tool", and add some edges, to create a new face on the top of the USB.
9.jpg
[h=2]Step 10
Select the new face, then go to “Edit Mesh > Extrude”, and extrude the face slightly inward.
10.jpg
[h=2]Step 11
Go to “Edit Mesh > Insert Edge Loop Tool”, and create 16 edges on the side of the USB.
11.jpg
[h=2]Step 12
Select 16 faces from the 32 you just created (every other one).
12.jpg
[h=2]Step 13
With those faces selected, go to “Edit Mesh > Extrude”, and extrude the faces inward as shown.
13.jpg
[h=2]Step 14
Scale the shape of the faces to make them smaller on the vertical axis.
14.jpg
[h=2]Step 15
This is how it should look on both sides.
15.jpg
[h=2]Step 16
Go to “Edit Mesh > Insert Edge Loop Tool”, and create 2 edges on the sides of the USB. If you get a problem like the one in the image, just go to the next step.
16.jpg
[h=2]Step 17
Go to “Edit Mesh > Split Polygon Tool”, click on the beginning of the line you want to create, and once again at the end. Do this for both edges, and for both sides of the USB.
17.jpg
[h=2]Step 18
Select all of the small faces that you just created on the sides of the USB, then go to “Edit Mesh > Extrude”, and extrude those faces inward.
18.jpg
 

R0xanA

متخصص بخش گرافیک و مالتی مدیا
[h=2]Step 19
You should have something that looks like this.
19.jpg
[h=2]Step 20
Go to “Edit Mesh > Split Polygon Tool”, and to “Edit Mesh > Insert Edge Loop Tool”. Using both tools as necessary, create edges at every hard angle change of the USB (use the images as reference).
20.jpg

20a.jpg

20b.jpg

20c.jpg
[h=2]Step 21
When you are finished, select the USB object and simply press number 3 on your keyboard to smooth it. Then just sit back and watch how nice the smoothed USB looks.
21.jpg
[h=2]Step 22
Now, create a primitive cube, position it, and scale it to fit inside the USB.
22.jpg
[h=2]Step 23
Go to “Edit Mesh > Extrude”, and extrude the front face of the metal connector.
23.jpg
[h=2]Step 24
Once again, go to “Edit Mesh > Extrude”, and extrude the face inward.
24.jpg
[h=2]Step 25
Go to “Edit Mesh > Insert Edge Loop tool”, and create 2 edge loops through the middle of metal connector.
25.jpg
[h=2]Step 26
Select the small faces you just created, then go to “Edit Mesh > Extrude”, and extrude them slightly inward.
26.jpg
[h=2]Step 27
Go to “Edit Mesh > Insert Edge Loop tool”, and create some new edges to make 2 faces at the top of the connector.
27.jpg
[h=2]Step 28
Go to “Edit Mesh > Extrude”, and extrude the 2 faces inward.
28.jpg
[h=2]Step 29
Select the 2 faces and delete them to create 2 holes.
29.jpg
 

R0xanA

متخصص بخش گرافیک و مالتی مدیا
[h=2]Step 30
Now you are going to use a different method to smooth the object (this method can only be used with simple geometry).Go to “Edit Mesh > Bevel”, set the 'Width' to '0.6' (this will depend on how smooth you want the object to be, and also the size of the object). Also, set the 'Segments' to 1, the 'Offset type' to 'Fractional', the 'Offset space' to 'World', and the 'UV assignment' to 'Planar project per face'.
30.jpg
[h=2]Step 31
Now simply press number 3, and you should see some nice edges.
31.jpg
[h=2]Step 32
Make a primitive cube, and fit it inside the metal connector.
32.jpg
[h=2]Step 33
Go to “Edit Mesh > Bevel”, to smooth the cube.
33.jpg
[h=2]Step 34
Go to the “Create > EP Curve Tool”, and set the 'Curve degree' to '3 cubic' (this will create a nice curve).
34.jpg
[h=2]Step 35
Draw the cable as shown.
35.jpg
[h=2]Step 36
Select the control vertexes of the curve and adjust them to your liking.
36.jpg
[h=2]Step 37
This is how my curve looks, but you can make yours any way you like.
37.jpg
[h=2]Step 38
Make a primitive cylinder, and scale the diameter to match your cable.
38.jpg
[h=2]Step 39
Move the cylinder to the end of the curve.
39.jpg
[h=2]Step 40
Scale the cylinder to match the length of the cable.
40.jpg
 

R0xanA

متخصص بخش گرافیک و مالتی مدیا
[h=2]Step 41
Increase the 'Subdivisions Height' to at least 300.
41.jpg
[h=2]Step 42
Select the cylinder, press “shift”, and then select the curve (the order in which you select the objects is very important).Now, with the objects selected, go to “Animate > Motion Path > Attach to Motion Path" (in the “Animation” menu).
42.jpg
[h=2]Step 43
Move the time line to check if the object is moving properly.
43.jpg
[h=2]Step 44
Now we need to make the cylinder distort around the curve.So, with the cylinder selected, go to “Animate > Motion Paths > Flow Path Object”.
44.jpg
[h=2]Step 45
With the deformer you just created selected, change the 'T Divisions' to '400', and the cylinder should be following the curve smoothly.
45.jpg
[h=2]Step 46
To hide the deformers, go to “Show > Deformers” in the little menu on top of perspective view.
46.jpg
[h=2]Step 47
Now create a primitive plane for the floor.
47.jpg
[h=2]Step 48
To attach the cable to the USB, just create a primitive cylinder, and position it as shown.
48.jpg
[h=2]Step 49
In the “Polygons” menu, go to “Edit Mesh > Insert Edge Loop Tool”, and make some edges around the cylinder.
49.jpg
[h=2]Step 50
Select the faces that you want to extrude, then go to “Edit Mesh > Extrude”, and extrude them inward.
50.jpg
 

R0xanA

متخصص بخش گرافیک و مالتی مدیا
[h=2]Step 51
Create a primitive cylinder (this will be the thick portion of the cable).
51.jpg
[h=2]Step 52
Change the “Subdivisions Axis” to '50'.
52.jpg
[h=2]Step 53
Go to “Edit Mesh > Insert Edge Loop Tool”, and insert to 4 edges (2 on each side).
53.jpg
[h=2]Step 54
Select the vertexes at the end of the cylinder and scale them.
54.jpg
[h=2]Step 55
Do the same for the opposite side.
55.jpg
[h=2]Step 56
Go to “Edit Mesh > Insert Edge Loop tool”, and insert some edges at the hard angles of the cylinder.
56.jpg
[h=2]Step 57
Make sure it's the same for both sides.
57.jpg
[h=2]Step 58
Create small cylinders and position them were you want the holes to be.
58.jpg
[h=2]Step 59
Select the 4 cylinders, and go to “Mesh > Combine”.
59.jpg
[h=2]Step 60
Now you need to create some geometry for the holes (this is very important, because if you don´t do it, the hole could have some errors).
60.jpg
[h=2]Step 61
Select the big cylinder, press “shift”, and then select the small cylinders. Go to “Mesh > Booleans > Difference”.
61.jpg
 

R0xanA

متخصص بخش گرافیک و مالتی مدیا
Step 62

This is how it should look (little holes without glitches). If you do get any problems, just move the edges around until they disappear.
62.jpg
Step 63

Now position the cylinder where you want it to be.
63.jpg
Step 64

Select the front faces from both sides.
64.jpg
Step 65

Go to “Edit Mesh > Extrude”, and extrude the faces to make a smaller circle.
65.jpg
Step 66

Select the new faces, go to “Edit Mesh > Extrude” and extrude them inward.
66.jpg
Step 67

This is how it should look (I have hidden the floor so you can see the results better).
67.jpg
Step 68


For the background, I used a cloth included in a tutorial from the “Digital Tutors” series. You can check it out here:



.
68.jpg
 

R0xanA

متخصص بخش گرافیک و مالتی مدیا
In this tutorial you will go through the process of modeling and rendering a Photorealistic USB cable in Autodesk Maya. You will also learn to use Mental Ray, along with the new architectural materials, rendering layers, and Photoshop, to create a fast, accurate, and photorealistic depth of field.
[h=2]Step 1
This is where we left off at the end of Day 1.
1.jpg
[h=2]Step 2
Go to “Window > Rendering Editors > Hypershade”.
2.jpg
[h=2]Step 3
Go to “Window > Settings/Preferences > Plug-in Manager”, and locate “Mayatomr.mll". Check off both "Loaded", and "Auto Load" (do this step only if mental ray is not already loaded).
3.jpg
[h=2]Step 4
With the “Hypershade” window open, change the type of nodes from Maya to Mental Ray, and create a new “mia_material_x”
4.jpg
[h=2]Step 5
Go to the attribute editor for the new material, name the material, and adjust the attributes as shown.
5.jpg
[h=2]Step 6
Scroll down to the "Bump" selection, click on the little check board square at the right of "Standard Bump" (this will open a new window). Now scroll to the "3D Textures", and select “Rock”.
6.jpg
[h=2]Step 7
With the “Bump” attribute editor open, change the “Bump Depth” to '0.062', and click on the door at the right of “Bump Value”.
7.jpg
[h=2]Step 8
Change “Color 1” to a white grey.
8.jpg
[h=2]Step 9
In the “Hypershade” editor, create 3 “mia_material_x” materials.
9.jpg
[h=2]Step 10
Open the attribute editor of one of those materials, name it "mia_cable", and adjust the attributes as shown.
10.jpg
 

R0xanA

متخصص بخش گرافیک و مالتی مدیا
[h=2]Step 11
Scroll down to the bump section, click on the check board square next to "Overall bump" (this will open a new window), scroll down to 3D textures and select "Brownian".
11.jpg
[h=2]Step 12
With the "Bump" attribute editor opened, change “Bump Depth” to "0.372", and click on the little door next to “Bump Value”.
12.jpg
[h=2]Step 13
Name the texture "brownian_cable" and modify the settings as shown.
13.jpg
[h=2]Step 14
Open the attribute editor for another one of the “mia_material_x” materials, name the material "mia_MetalConnector", and adjust the attributes as shown.
14.jpg
[h=2]Step 15
Don´t forget to check the “Metal Material” option, at the bottom of the "Reflection" section.
15.jpg
[h=2]Step 16
Scroll down, open the “Anisotropy” section, and change the “Anisotropy” value to "0.100".
16.jpg
[h=2]Step 17
Open the last “mia_material_x” material, name it "mia_whitePlastic", and adjust the attributes as shown.
17.jpg
[h=2]Step 18
Now assign every material to corresponding polygons in the scene. This is how it should look.
18.jpg
[h=2]Step 19
Select the white box inside of the metal connector, and go to “Window > UV Texture Editor”.
19.jpg
[h=2]Step 20
Go to “Create UV´s > Planar Mapping”.
20.jpg
[h=2]Step 21
 

R0xanA

متخصص بخش گرافیک و مالتی مدیا
[h=2]Step 21
With the top view active, scale the mapping so it only covers the 2 holes on the metal connector.
21.jpg
[h=2]Step 22
With the “UV Texture Editor” open, go to “Polygons > UV Snapshot” (this will open a new window).
22.jpg
[h=2]Step 23
Modify the settings as shown.
23.jpg
[h=2]Step 24
Open up the UV snapshot file you just saved in Photoshop.
24.jpg
[h=2]Step 25
Make a White layer.
25.jpg
[h=2]Step 26
Add some dirt to the image and save it out.
26.jpg
[h=2]Step 27
Open the attribute editor for the white material, click on the little check board square next to color, and in the new window, click on “File”.
27.jpg
[h=2]Step 28
Select the image you made with Photoshop, and change the “Filter Type” to off.
28.jpg
[h=2]Step 29
Go to “Create > Lights > Area Light”, and create 2 lights.
29.jpg
[h=2]Step 30
Position the lights as shown.
30.jpg
 

R0xanA

متخصص بخش گرافیک و مالتی مدیا
[h=2]Step 31
Open the light attribute editor and change the “Intensity” to "0.744".
31.jpg
[h=2]Step 32
Scroll down to the “Shadows” section, check the “Use Ray Trace Shadows” option, and change “Shadow Rays” to "30".
32.jpg
[h=2]Step 33
Make the same adjustments for the other light.
33.jpg
[h=2]Step 34
Go to “Create > Cameras > Camera”.
34.jpg
[h=2]Step 35
In the little menu on top of the perspective view, go to “Panels > Perspective > Camera”.
35.jpg
[h=2]Step 36
Move the camera to a good position.
36.jpg
[h=2]Step 37
Open the “Rendering Settings”, and change “Render Using” to "Mental Ray".
37.jpg
[h=2]Step 38
Go to the “Quality” tab, and adjust the settings as shown.
38.jpg
[h=2]Step 39
Go to the “Indirect Lighting” tab and activate “Final Gathering”.
39.jpg
[h=2]Step 40
Go to the “Common” tab, change “Renderable camera” to your main camera, and the image size to "720P".
40.jpg
[h=2]Step 41
Now render the scene. As you can see, we are only missing the depth of field.
41.jpg
 

R0xanA

متخصص بخش گرافیک و مالتی مدیا
[h=2]Step 42
Go to the "Rendering" layers editor, create a new layer named “Depth of Field”, and add all the objects in the scene to it.
42.jpg
[h=2]Step 43
With the new render layer selected, go to the camera attributes, scroll down to “Depth of Field”, right click the option, and select “Create Layer Override” (the words should change to orange).
43.jpg
[h=2]Step 44
Adjust the settings of the depth of field as shown.
44.jpg
[h=2]Step 45
Go to the "Depth of Field Tab", click on "Presets", and select "Luminance" map (everything should turn black).
45.jpg
[h=2]Step 46
This is how the scene should look.
46.jpg
[h=2]Step 47
Render the layer. Now we have depth of field information for Photoshop.
47.jpg
[h=2]Step 48
In the “Render View” menu, go to “File > Save Image” and save the image.
48.jpg
[h=2]Step 49
Now render the master layer, and save the image.
49.jpg
[h=2]Step 50
Open Photoshop, make 2 layers (1 with the USB, and the other with the depth of field information). Select the depth of field layer and copy it.
50.jpg
[h=2]Step 51
With the “Channels” tab active, create a new channel, and go to “Edit > Paste”.
51.jpg
 

R0xanA

متخصص بخش گرافیک و مالتی مدیا
[h=2]Step 52
Hide the depth of field layer, and select the USB layer.
52.jpg
[h=2]Step 53
Go to “Filter > Blur > Lens Blur” (this will open a new window).
53.jpg
[h=2]Step 54
Change the source to “Alpha 1”, and adjust the other settings to match you preferences. Click on OK.
54.jpg
[h=2]Final Result
Now save the image and you are done!!!
55.jpg
 
بالا