Get a free year on Tuts+ this month when you purchase a Siteground hosting plan from $3.95/mo
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.
Create a primitive cube and scale it to match the size of a USB.
Under the “Polygons” menu, go to the “Edit Mesh > Insert Edge Loop Tool".
Create 2 edge loops.
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.
This is how it should look (depending on the type of USB cable you are trying model).
Select the front face of the USB.
With that same face still selected, go to “Edit Mesh > Extrude”, and create an inner face.
Once again, go to “Edit Mesh > Extrude”, and extrude the face inward a bit.
Go to “Edit Mesh > Insert Edge Loop Tool", and add some edges, to create a new face on the top of the USB.
Select the new face, then go to “Edit Mesh > Extrude”, and extrude the face slightly inward.
Go to “Edit Mesh > Insert Edge Loop Tool”, and create 16 edges on the side of the USB.
Select 16 faces from the 32 you just created (every other one).
With those faces selected, go to “Edit Mesh > Extrude”, and extrude the faces inward as shown.
Scale the shape of the faces to make them smaller on the vertical axis.
This is how it should look on both sides.
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.
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.
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.
You should have something that looks like this.
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).
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.
Now, create a primitive cube, position it, and scale it to fit inside the USB.
Go to “Edit Mesh > Extrude”, and extrude the front face of the metal connector.
Once again, go to “Edit Mesh > Extrude”, and extrude the face inward.
Go to “Edit Mesh > Insert Edge Loop tool”, and create 2 edge loops through the middle of metal connector.
Select the small faces you just created, then go to “Edit Mesh > Extrude”, and extrude them slightly inward.
Go to “Edit Mesh > Insert Edge Loop tool”, and create some new edges to make 2 faces at the top of the connector.
Go to “Edit Mesh > Extrude”, and extrude the 2 faces inward.
Select the 2 faces and delete them to create 2 holes.
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'.
Now simply press number 3, and you should see some nice edges.
Make a primitive cube, and fit it inside the metal connector.
Go to “Edit Mesh > Bevel”, to smooth the cube.
Go to the “Create > EP Curve Tool”, and set the 'Curve degree' to '3 cubic' (this will create a nice curve).
Draw the cable as shown.
Select the control vertexes of the curve and adjust them to your liking.
This is how my curve looks, but you can make yours any way you like.
Make a primitive cylinder, and scale the diameter to match your cable.
Move the cylinder to the end of the curve.
Scale the cylinder to match the length of the cable.
Increase the 'Subdivisions Height' to at least 300.
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).
Move the time line to check if the object is moving properly.
Now we need to make the cylinder distort around the curve.
So, with the cylinder selected, go to “Animate > Motion Paths > Flow Path Object”.
With the deformer you just created selected, change the 'T Divisions' to '400', and the cylinder should be following the curve smoothly.
To hide the deformers, go to “Show > Deformers” in the little menu on top of perspective view.
Now create a primitive plane for the floor.
To attach the cable to the USB, just create a primitive cylinder, and position it as shown.
In the “Polygons” menu, go to “Edit Mesh > Insert Edge Loop Tool”, and make some edges around the cylinder.
Select the faces that you want to extrude, then go to “Edit Mesh > Extrude”, and extrude them inward.
Create a primitive cylinder (this will be the thick portion of the cable).
Change the “Subdivisions Axis” to '50'.
Go to “Edit Mesh > Insert Edge Loop Tool”, and insert to 4 edges (2 on each side).
Select the vertexes at the end of the cylinder and scale them.
Do the same for the opposite side.
Go to “Edit Mesh > Insert Edge Loop tool”, and insert some edges at the hard angles of the cylinder.
Make sure it's the same for both sides.
Create small cylinders and position them were you want the holes to be.
Select the 4 cylinders, and go to “Mesh > Combine”.
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).
Select the big cylinder, press “shift”, and then select the small cylinders. Go to “Mesh > Booleans > Difference”.
This is how it should look (little holes without glitches). If you do get any problems, just move the edges around until they disappear.
Now position the cylinder where you want it to be.
Select the front faces from both sides.
Go to “Edit Mesh > Extrude”, and extrude the faces to make a smaller circle.
Select the new faces, go to “Edit Mesh > Extrude” and extrude them inward.
This is how it should look (I have hidden the floor so you can see the results better).
For the background, I used a cloth included in a tutorial from the “Digital Tutors” series. You can check it out here: http://www.digitaltutors.com