Model and Texture a Photorealistic USB Cable with Maya and Mental Ray, Day 1

Tutorial Details
  • Program: Mental Ray
  • Difficulty: Intermediate
  • Completion Time: 1-2 hours
Share

Final Product What You'll Be Creating

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 tutorial is Day 1 in a series – Go to Day 2

This is part 1 of the tutorial: the modeling process.


Step 1

Create a primitive cube and scale it to match the size of a USB.


Step 2

Under the “Polygons” menu, go to the “Edit Mesh > Insert Edge Loop Tool”.


Step 3

Create 2 edge loops.


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.


Step 5

This is how it should look (depending on the type of USB cable you are trying model).


Step 6

Select the front face of the USB.


Step 7

With that same face still selected, go to “Edit Mesh > Extrude”, and create an inner face.


Step 8

Once again, go to “Edit Mesh > Extrude”, and extrude the face inward a bit.


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.


Step 10

Select the new face, then go to “Edit Mesh > Extrude”, and extrude the face slightly inward.


Step 11

Go to “Edit Mesh > Insert Edge Loop Tool”, and create 16 edges on the side of the USB.


Step 12

Select 16 faces from the 32 you just created (every other one).


Step 13

With those faces selected, go to “Edit Mesh > Extrude”, and extrude the faces inward as shown.


Step 14

Scale the shape of the faces to make them smaller on the vertical axis.


Step 15

This is how it should look on both sides.


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.


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.


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.


Step 19

You should have something that looks like this.


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).


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.


Step 22

Now, create a primitive cube, position it, and scale it to fit inside the USB.


Step 23

Go to “Edit Mesh > Extrude”, and extrude the front face of the metal connector.


Step 24

Once again, go to “Edit Mesh > Extrude”, and extrude the face inward.


Step 25

Go to “Edit Mesh > Insert Edge Loop tool”, and create 2 edge loops through the middle of metal connector.


Step 26

Select the small faces you just created, then go to “Edit Mesh > Extrude”, and extrude them slightly inward.


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.


Step 28

Go to “Edit Mesh > Extrude”, and extrude the 2 faces inward.


Step 29

Select the 2 faces and delete them to create 2 holes.


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’.


Step 31

Now simply press number 3, and you should see some nice edges.


Step 32

Make a primitive cube, and fit it inside the metal connector.


Step 33

Go to “Edit Mesh > Bevel”, to smooth the cube.


Step 34

Go to the “Create > EP Curve Tool”, and set the ‘Curve degree’ to ’3 cubic’ (this will create a nice curve).


Step 35

Draw the cable as shown.


Step 36

Select the control vertexes of the curve and adjust them to your liking.


Step 37

This is how my curve looks, but you can make yours any way you like.


Step 38

Make a primitive cylinder, and scale the diameter to match your cable.


Step 39

Move the cylinder to the end of the curve.


Step 40

Scale the cylinder to match the length of the cable.


Step 41

Increase the ‘Subdivisions Height’ to at least 300.


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).


Step 43

Move the time line to check if the object is moving properly.


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”.


Step 45

With the deformer you just created selected, change the ‘T Divisions’ to ’400′, and the cylinder should be following the curve smoothly.


Step 46

To hide the deformers, go to “Show > Deformers” in the little menu on top of perspective view.


Step 47

Now create a primitive plane for the floor.


Step 48

To attach the cable to the USB, just create a primitive cylinder, and position it as shown.


Step 49

In the “Polygons” menu, go to “Edit Mesh > Insert Edge Loop Tool”, and make some edges around the cylinder.


Step 50

Select the faces that you want to extrude, then go to “Edit Mesh > Extrude”, and extrude them inward.


Step 51

Create a primitive cylinder (this will be the thick portion of the cable).


Step 52

Change the “Subdivisions Axis” to ’50′.


Step 53

Go to “Edit Mesh > Insert Edge Loop Tool”, and insert to 4 edges (2 on each side).


Step 54

Select the vertexes at the end of the cylinder and scale them.


Step 55

Do the same for the opposite side.


Step 56

Go to “Edit Mesh > Insert Edge Loop tool”, and insert some edges at the hard angles of the cylinder.


Step 57

Make sure it’s the same for both sides.


Step 58

Create small cylinders and position them were you want the holes to be.


Step 59

Select the 4 cylinders, and go to “Mesh > Combine”.


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).


Step 61

Select the big cylinder, press “shift”, and then select the small cylinders. Go to “Mesh > Booleans > Difference”.


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.


Step 63

Now position the cylinder where you want it to be.


Step 64

Select the front faces from both sides.


Step 65

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


Step 66

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


Step 67

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


Step 68

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

.

This tutorial is Day 1 in a series – Go to Day 2

Don’t miss more CG tutorials and guides, published daily – subscribe to Cgtuts+ by RSS.

Related Posts

Add Comment

Discussion 55 Comments

  1. roger says:

    the preview pictures looks soo real, if it werent on cgtuts i would have thought it was real. but anyway. i really would have liked this to be a screencast.

    very nice outcome and some good things to learn here, but ill have to take time to read it when my heads slightly clearer and focused.

  2. Lawrence says:

    This looks fantastic, I for one am a fan of written tuts like these. In many cases they’re much, much easier to refer back to.

    Thanks, and good work

  3. Hooper says:

    The USB part sticks out a bit far(the silver part) but other than that looks good and thanx for typing it out!

    Now here comes the :
    We need more max tutorials! lol

    get it? everybody’s always requesting Maya stuff and…ahhh forget it lol
    had to be there.

    • Kaleb Aylsworth says:

      Yeah I get it (trust me:)…But from now on there should be a pretty even balance between the major native apps. It has been pretty difficult to find some great authors for each, but it has been something that we were really striving for, and I think were finally starting to get there:) P.s. More Max stuff very very soon:)

      • Hooper says:

        Soon as I get some free time I’m gonna submit tut’s to here using max.
        Been using it since version 5.
        I’m jealous of newcomers to max since when I started out there were about 2 video tutorials out there.(except for 3D Palace)
        Now it’s becoming a daily thing which is awesome!

        I love max (and Phostoshop) so much I often joke that I sleep with the install DVD’s under my pillow!

        ohh…I am up for any tutorials you all might wanna see….just no biped stuff ok?

  4. G-Funky says:

    Great tut! Some great basic modeling techniques. Everyone does things differently.

    Can’t wait for the 2nd part. I like the look of those materials.

  5. GSM says:

    awesome tut… Really i like maya tuts. i always expect maya tuts rather than 3dsMx.

  6. brepan says:

    i like written tut’s more… no loading no jumpy play back, not every computer plays the hd quality that well, well mines doesnt.
    thanks for the tut really good!

  7. Modisana says:

    Its about time we had another Maya tutorial….

    Thanks dude… Awesome work

    Please keep em coming….

  8. tingboy says:

    I cant wait for the Mental Ray tutorial! More of Maya or C4D tutorials please(: It would be nice to have more advanced tutorials about lightning and rendering techniques too!

  9. Bilal says:

    Thanks for another maya tutorial :)

  10. the most noobish maya user ever ever clever fever rapper faster master blaster toaster er errrrr... says:

    Yeah!
    a hard day at work and after that i see a maya tutorial!

    Thanx 4 all man!

  11. Zattitud3 says:

    Great tut….

    but we NEED MORE MAX TUTS!!!!

  12. Diego SA says:

    Wow, the 3d image could have nearly tricked me into thinking it’s real. It’s so perfect.

  13. Tim says:

    THANK YOU SOO MUCH execellent Maya tut!!! I love it!

  14. ghost says:

    When does it turn photo-realistic? In the next tutorial I’m guessing.

    • Yes, in the next tutorial you will go through the process of applying Mental Ray materials, rendering, and creating a realistic depth of field (as seen in the final effect preview image).

  15. John Doe says:

    Finally, a Maya tutorial!
    Can’t wait for the Mental Ray portion!

  16. "Your Name" says:

    everyday i usually come here on this site to see what’s new about tuts.
    i can’t wait for the next part :)

  17. Ian says:

    Looks good, but shouldn’t the metal connecter be on the bottom.

  18. Kris says:

    SICK!!!!!!!!!! Just wicked good!

    And as for all those on here who use Max… what is wrong with this tut?

    Seriously the techniques he used could easily be within Max or even Blender. From what I can see its a basic block model with a lot of Extrudes going on. The more advanced stuff (i.e. the path based modeling..) I would have to figure out something for.. but this is a great tut! I look forward to part 2.

  19. My god! I try this one and lemme tell U it works like a charm!!! NIce and awesome man! thanks! Can’t wait for the second part!!!!!!!!

  20. me says:

    where is the second part?? lets go already!

  21. Alex says:

    Great tut. I’m having a bit of trouble with the part where you attach the cylinder to the curve though. It keeps placing the cylinder vertically at the start of the curve and it just goes downhill from there. I’m using the same settings as you’ve said but nothing has worked so far. Any chance you could help me out?

    • Alan Monroig says:

      When you select the option “atach to motion path” click on the little cube next to the text, this will open a window, then just change the axis to what ever works for you.

      This should solve the problem

  22. Adan says:

    Thank you so much for this tutorial, im just finished out this tutorial and all i can say is wow!, vary cool explained and all!, thanks!!!

  23. arlington cruz says:

    Yes Thanks so much. I would love to see more Maya tutorials. Those pertaining to Organic Modeling, Uv Mapping and character animation would be awesome.

  24. Hi Man, sorry 2 disturb but my insert edge loop tool seems not to be working, in the new project I’m working whenever I want to change the position of the edge loop it modifies the geometry of my object and that never happened before, what am I doing wrong? Is there any solution? I don’t know what can I do :(

  25. Rajesh says:

    Thats Really good job

  26. Rajesh says:

    ya thanks for this tutorial………can u help me in mentalray
    rendering and lighting

  27. Sulzer says:

    This is very Nice Tutorial.
    Love the way he explained.
    Thanks man

  28. RoBeRt says:

    really awesome dude….waiting for the 2nd part mental rey rndering & lightning…. hope to see tat soon

  29. dev says:

    after step 3, why my say i cant edit in 3d mode?
    any help?

  30. john says:

    hmm for the cable, couldn’t you use the technique of creating the curve, create a circle, shift click the curve and the circle, open the extrude dialogue box, and basically extrude the circle along the curve to make the cable? (also a digital tutors method hehe)
    I’m just wondering if there are any advantages to creating the cable in the way you have done. Thank you!

  31. Eric says:

    No second part???????

  32. very nice tutorial. pretty noob friendly too =D

  33. dylan bailey says:

    how do i add the background?

  34. dylan bailey says:

    also, whenever i render, my metal connector is black, after using the correct settings.

  35. david says:

    Great so far but I am stuck on step 31. I just cannot get it to smooth using bevel. perhaps its too complicated an object

  36. david says:

    I have tried and tried and I just cannot get the fit cylinder to path to work. Oh well. I thought this was going to be easier then this. In Max its so much more straight forward

    • Alan Monroig says:

      use the technique of creating the curve, create a circle, shift click the curve and the circle, open the extrude dialogue box, and basically extrude the circle along the curve to make the cable

  37. Mike D says:

    hey. great tutorial so far. though im having trouble with the “Flow path object” Step. when i click it it gives me this message. “None of the selected objects are animated by a motion path with the Follow option”.

    Now i did the last step correctly so im not sure what im doing wrong.

  38. Michael says:

    great tutorial!!! after step 18 and after i press number 3 the corners pop out and look really weird. Any way to fix this? thanks

  39. Michael says:

    Nvm fixed it… wasn’t selecting all faces

  40. ankit says:

    i realy like ur way to express the demo.

  41. ehtsm says:

    Hi, which version of maya has been used in this tutorial because I have maya 8.5 and when i try to use “STEP-21″ in this the model edge doesn’t smooth as it is in tutorial, pressing number 3 does not happen any thing, please advise what is the wrong, or advise me what is tool which short key is number 3.

Add a Comment

To add a code snippet to your comment, please wrap your code like so: <pre name="code" class="html">YOUR CODE</pre>. You can replace the class name with "js," "css," "sql," or "php." If there are any "<" or ">" within your code, please search and replace them with: &lt; and &gt; respectively.