Upload
polly-delphia-hill
View
221
Download
1
Embed Size (px)
Citation preview
CGS 3220Lecture 2
Introduction to Computer Aided ModelingInstructor: Brent Rossen
Graham Clark
Lesson 1 – Create a Garage
Overview Setting a new Maya Project Creating primitive objects Moving objects in 3d space Duplicating objects Changing the shape of objects Using the Maya View tools Naming objects Saving and incremental saves
Setting a new Maya Project
Launch Maya Set the project
File > Project > Set Name your project
“Garage” Click, “Use Defaults” File > New Scene Save, this will
automatically put it in the “scenes” directory
Creating primitive objects
Creating the Garage For this scene, we will be building a garage with
several boxes and wires The room itself will be a primitive polygonal cube Primitives: the basic shapes used in 3d modeling
Found on the Create top menu
Creating Primitive 3d Objects Cont… Create the Cube
Create > Polygon Primitives > Cube
This cube will be used as a large surroundingroom.
A cube is placed at the origin
The Procedural Model
This cube is what’s known as a Procedural Model, that title has quite a few implications, here are the important parts for you.
Procedural models can be broken down into nodes
Node: a generic object type containing specific attributes that allow it to accomplish a specific task.
Procedural Model Cont…
In the case of our cube, it currently has 3 nodes Transform
Positioning information of objects, when you move, rotate, and scale your objects, numbers are changed in the transform node
Shape Contains all the component information that contains the base
shape of the object Input
Contains the options that drive the creation of the object, such as radius, or length, width, height
Procedural Model Cont…
The input node can be edited in the Channel Box
Channel Box is found at the right of the screen and allows you to make changes to attributes as well as later animating attributes
The channel box is opened by clicking this buttonfound in the upper right
Changing the shape of objects In the channel box
Click polycube1 under Inputs if it is not open
Change the width to 25, hit enter after each
Change the height to 10 Change the Depth to 25
The cube is now shaped more like a room You could have also used the scale
manipulator to do this You may need to zoom out to view it all
Using the Maya View tools
Four view Panels To start, you will only see
the perspective window Click the space bar to
bring up all four views, another way to do this is click Panels > Saved Layouts > Four View
This shows the cube using the perspective and 3 orthographic views
The Views
View panels are used to see into the 3d world Perspective: shows the view as though you were
looking through your own eyes Orthographic: shows the view looking down a
particular axis you’ll notice things don’t get smaller into the distance,
it’s as though everything was just squished up against the view plane
The Views Continued…
You’ll often need to use several of these views to help determine an exact location
Naming objects
In the channel box, click “pCube1” and type in the name “Garage”, press enter
Naming objects is often overlooked, but it becomes very important
As your scenes grow they can become overwhelming, be sure to name and/or group all of your objects
Moving the Garage
We’ll now use our first manipulator, the Move tool
Select the Move Tool in the tool box interface on the left or by pressing w
Working in 3d
Each dimension is defined by the cardinal axes: x, y, and z x – length – red y – height – green z – depth – blue
When you select an object, and turn on the translation manipulator, it will point in the positive direction for each axis
The center of the world is called the origin and has [x, y, z] = [0, 0, 0]
Moving the Garage Cont…
Click+drag the green manipulator to move the cube along the positive Y axis until the floor is flush with the grid
The yellow axis is the active axis on a manipulator
More about the Views and 3d Space Moving in the perspective view can be
thought of in two ways: Either you are moving a camera around an object Or, you are spinning an object in front of the
camera Generally option 1 is the accepted thought,
but option 2 can be a very useful view when programming in 3d.
Edit the Views
Perspective Alt+LMB: tumble Alt+MMB: track Alt+RMB to dolly
Orthographic Alt + MMB: track Alt + RMB: dolly You can’t tumble in
orthographic views
Both MMB Wheel to
incrementally dolly Ctrl+Alt+LMB to box dolly
– left to right zooms in – right to left zooms out
Undo-redo for views: [ ] F – frame selected A – frame all
Moving inside the Garage
In the perspective view click Shading > Smooth Shade All
To feel like you’re inside the garage, move the perspective view until it is inside the cube geometry
But everything disappears! That’s because of the Normals and Backface
culling, let’s fix that
Menu Sets and creating
Change to the Modeling Menu Set In Maya 8 the Modeling Menu Set has
been divided into the Polygons and Surfaces menu sets
Normals and Backface Culling Backface Culling: a polygon with its normal facing
away from the camera will not be displayed with this on. Backface culling is generally a good thing (saves system
resources) so we’ll leave it on and change the normals A Normal: a vector representing the direction a polygon (or
sometimes vertex) is facing Reverse the Normals
Select the cube, (Modeling Menu Set) Edit Polygons > Normals > Reverse
Turns the cube inside out
Making Crates
Now it’s time to put some stuff in our room
Do the same as for creating the room, but let’s use the hotbox this time, Hold SpaceBar > Create
> Polygon Primitives > Cube
Rename the box “Crate1” so it’s easy to find later
Transforming the cube
This time, let’s use the move (W), rotate (E), and scale (R) manipulators to put the box at an odd angle in the corner of the room
Also, use the side and front view to make sure it is flush with the floor
Duplicating objects
Instead of starting from scratch each time we want to make another crate, let’s use the duplicate command Edit > Duplicate or Ctrl-d Notice the boxes are
automatically numbered after the number we started from
Let’s make a few more boxes
Saving and incremental saves Now is a good time to save, File > Save or
ctrl-s Name your scene GarageStart
.mb (Maya Binary) will be automatically appended .ma (Maya Ascii) is useful when moving between
versions Incremental saves
Incremental saves will save a new copy of your scene each time you hit ctrl-s
Starting Incremental Saves
Why use it? Sometimes Maya crashes, and every once in a while that
will corrupt your file. File > Save Scene > Options Box
Check Incremental Save Check Limit Incremental
Saves Set the Limit to at
least 5 depending on your system’s resources
Every Garage Needs Some Shelves Create a cube, reshape it like a shelf, and
place it against the wall, near the bottom Rename the cube “Shelf1”
Edit > Duplicate > Options Edit > Reset Settings Translate Y: 1.5 Number Copies: 4
Undo-Redo
If they don’t look exactly right, ctrl-z or edit > undo and you can try again
Shift-z will redo the action
Make the Lamp
Create > Polygon Primitives > Cone
(w) move the cone up near to the ceiling
Rename the cone Lamp Go to the cones Inputs
Radius: 2 Height: 1 Subdivisions Axis: 10 Subdivisions Cap: 1
Adjust the Vertices
RMB on the Lamp and select Vertex
This mode allows you to edit each vertex into any shape you choose
Let’s move our vertices to create an inside to the lamp
Hotkey 4 will give you wireframe, hotkey 5 goes back to smooth
Electrical Wire for the Lamp
To create the wire, let’s use a nurbs cylinder
Create > NURBS Primitives > Cylinder Radius: .1 Spans: 6 Height Ratio: 50
About NURBS
We’re using a NURBS cylinder because surfaces are good for creating smooth geometry
NURBS Curves Non-Uniform Rational B-Spline – you lay down
control points and smooth lines are created NURBS Geometry
Surfaces defined using NURBS Curves
Adjusting the Wire
Move the wire to the ceiling so that the bottom edge touches the top of the lamp
Select the component mode button (F8), and be sure the vertices button is enabled
You can now see the control vertices of the wire
Adjusting the Wire Cont…
Adjust the Control Vertices (CVs) until they look like a wire Rename the cylinder, Wire Adjust the smoothness (1 – rough, 2 – medium, 3 – fine) Click the component button or F8 again to get out of
component mode Save your scene!
Conclusion
That’s our first lesson in using Maya, and we’ve already made a room with real-ish objects.
Go ahead and try this at home or in the lab. Play around with creating, duplicating, and
transforming objects. Make a room of your own. Try a real room, that gives you plenty of details to work from.
Next time, a bit more in depth about modeling objects and adding details.