3D Graphics for Game Programming (J. Han) Chapter XI Character Animation.
3D Game Programming All in One
description
Transcript of 3D Game Programming All in One
![Page 1: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/1.jpg)
3D Game Programming All in One
By Kenneth C. Finney
![Page 2: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/2.jpg)
Chapter 13
Modeling with Milkshape
![Page 3: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/3.jpg)
Modeling with Milkshape
Milkshape 3D
• Low-cost 3D modeling tool
• Supports plug-ins for importing and exporting models
• Continual evolution of software adds new features
![Page 4: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/4.jpg)
Modeling with Milkshape
Milkshape GUI• A window contains the program
• The program contains frames
• One frame contains viewports which display views
• A view shows an object or scene from a particular angle
• Another frame contains the modeling toolbox
![Page 5: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/5.jpg)
Modeling with Milkshape
Milkshape GUI• Upper-Left Viewport : Front View
• Upper-Right Viewport : Right View
• Lower-Right Viewport : 3D View
• Lower-Left Viewport : Top View
![Page 6: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/6.jpg)
Modeling with Milkshape
Milkshape GUI
• Toolbox tabs:– Model tab– Groups tab– Materials tab
(Joints tab missing from book illustration)
![Page 7: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/7.jpg)
Modeling with Milkshape
Navigating in Views
• To move around in wire-frame views, click-drag the cursor while holding the Control key
• To zoom in or out, click-drag with the Shift key (except in Select mode)
• Use mouse wheel to zoom also
![Page 8: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/8.jpg)
Modeling with Milkshape
View Scale & Orientation
• In the front view:– X-axis: positive going up– Y-axis: positive to the right– Z-axis: positive to the front
• Right-handed coordinate system
![Page 9: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/9.jpg)
Modeling with Milkshape
View Scale & Orientation
• Become familiar with model scale and axis orientation and how they relate to in-game appearance
• Calibrate your model scene scale
• The Left Viewport in Milkshape is used as the Right View in Torque
![Page 10: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/10.jpg)
Modeling with Milkshape
Lab 3: The Soup Can Revisited
• Work with a simple shape primitive—a cylinder
• Assign a material
• Export as a Wavefront obj file to unwrap
![Page 11: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/11.jpg)
Modeling with Milkshape
UV Unwrapping
• UVMapper is used to work with exported can
• Refer to Chapter 9 for more discussion of UV Unwrapping
![Page 12: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/12.jpg)
Modeling with Milkshape
Lab 4: UVMapper• Learn to use obj model exported from
Milkshape
• See how to generate unwrapped layout template for pre-existing skin
• Learn to export new unwrapped version of model as obj file
• Learn how to import obj file into Milkshape
![Page 13: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/13.jpg)
Modeling with Milkshape
Lab 5: Enhancing the Soup Can– Practice modifying a Milkshape
model– Alter the Soup Can to have an
opened lid– Practice exporting a Milkshape
model with the ms2dtsExporter
![Page 14: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/14.jpg)
Modeling with Milkshape
Menus– File
• Save, open, import, & export files
– Edit• Select, duplicate, undo, redo, hide,
unhide
– Vertex• Vertex snapping, welding, mirroring,
modify vertices
![Page 15: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/15.jpg)
Modeling with Milkshape
Menus• Face
• Reverse, divide, smoothing, winding
• Animate• Set, delete, copy, paste keyframes
• Tools• Access plugins and user tools
• Window• Window selection, display adjustment
![Page 16: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/16.jpg)
Modeling with Milkshape
Toolbox
• Model tab– Create and modify vertices, faces,
cylinders, spheres, and boxes
• Groups tab– Organize polygons visually or
logically
![Page 17: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/17.jpg)
Modeling with Milkshape
Toolbox
• Materials tab– Create and modify materials using
textures
• Joints tab– Select and assign joints for
skeletons
![Page 18: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/18.jpg)
Modeling with Milkshape
Preferences
• Viewport tab– Adjust viewport settings
• Misc tab– Adjust animation, joint, & autosave
settings
![Page 19: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/19.jpg)
Modeling with Milkshape
UVMapper
• File Menu
• Edit Menu
• Help Menu
![Page 20: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/20.jpg)
Modeling with Milkshape
UVMapper
• File Menu– Load models– Import UV coordinate data– Save models– Export UV coordinates
![Page 21: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/21.jpg)
Modeling with Milkshape
UVMapper
• Edit menu– Adjust settings– Vertex tools– Select and Assign to groups– Rotate – Create UV Maps
![Page 22: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/22.jpg)
Modeling with Milkshape
UVMapper
• Help menu– Obtain stats about model– Hotkey help
![Page 23: 3D Game Programming All in One](https://reader035.fdocuments.net/reader035/viewer/2022062410/5681592f550346895dc66015/html5/thumbnails/23.jpg)
Summary
• Milkshape is well-featured shareware modeling tool
• Pay attention to side view variation between Milkshape and Torque
• Calibrate model scale when starting
• Use plug-ins for more features
• UVMapper integrates with Milkshape via .obj files