3-d Models, Textures and Bone Animations for Games.

3D Models, Textures and Bone
Animations for Games.
Overview:
• Tools – Advantages & Disadvantages
• Low-poly models – from scratch
• Texturing – UV maps and skins
• Bone Animation – setting up skeleton,
inverse & forward Kinematics
The Tools
• Blender
• Maya *
• 3DS
• Wings 3D
• Ultimate Unwrap *
• Caligari Truespace *
• Photoshop *
Blender
– Pros:
• Free, Relatively Powerful.
• Can do skeletal animations.
• Easy to import/export.
– Cons:
• Learning Curve;
• counter-intuitive, “clunky” interface.
Maya
• Pros:
•
– Extremely powerful.
– Well documented.
– Elegant, fast interface.
– Becoming industry standard.
Cons:
– ~$2,000.
– Very good, but not excellent UV mapping
3DS
• Pros:
•
– Very powerful.
– Similar to Maya
Cons:
– Expensive.
Wings 3D
• Fast.
•
– Easy to use.
– Can make excellent Low-Poly models
Cons:
– No animation / UV mapping.
– Hard to make complicated / High-poly models
Ultimate Unwrap
• Pros:
– Best UV mapping tool on the market (in my opinion)
– Very fast, simple interface.
• View texture on model in 3D environment.
• Automatically updates texture when saved
• All the functionality of more expensive tools
– Cheap (~$70)
• Cons:
– Only good for UV mapping
– Not directly compatible with Maya
• Need to “juggle” model formats *.obj -> *.mb
Caligari Truespace
• Pros:
– Relatively powerful
• Decent skeletal animations
• UV mapping
– Cheap (couple hundred $ for latest version)
• Cons:
– Extraordinarily awkward interface
– Somewhat slow
Photoshop
• A necessity
• Uses Layers
• Highly Versatile tool set
• Great for creating skins to texture models
3D Modeling Technique
• Art through extrusion
• Minimize Polygons
Art through Extrusion
• Start with basic shape (cube)
–
–
–
–
Extrude a Face
Adjust size of face
Collapse vertices / edges to make angles
Repeat above
• Use Symmetry
Minimize Them Polies!
•
•
•
•
Use triangular points (when possible)
Focus attention on salient areas
Rely on texturing for detail – keep it simple
Orient human models in standard position (shown)
Some Buildings…
• Both < 20 polies
Some Space Ships…
Both <80 polies
UV / Texture Mapping
• Different Types
• Methods
• Minimize Size of Images
There’s more than one way to Skin
a Cowboy…
• Face Painting
– Paint a fixed texture to individual faces
• Pros: easy, fast
• Cons: looks atrocious up close
• Materials
– Apply a “material” or surface texture to a face
• Phong, Metallic, etc.
• Diffuse, Ambient, Emissive, Specular, lightings
• Pros: Looks really good.
• Cons: Requires in-game light source. Expensive.
• UV Mapping *
– “Unwrap” polygon model to flat surface
– “Paint a picture” over unwrapped polies
• Pros: Can make low-poly models look good!
• Cons: Difficult to learn / do well.
UV Mapping
• Import Model
• Unwrap as desired
• Create Texture
Import Model
• Disorganized UV map
Unwrap Model as Desired
• Many Different Types
•
•
•
– Box, cylindrical, plane, etc.
Make it “easy to paint”
Conserve space
Devote more space to salient parts
Paint Texture Onto Model
• Use many layers (Photoshop / PSP)
• Low opacity Air Brush for shading
• Darken Edges & Brighten centers of polygons
– Gives a more “rounded” appearance
• Keep textures small!
Skeletal Animations (Maya)
• Set up Skeleton
• Organize bones into Hierarchy
• Inverse / Forward Kinematics
• Skinning Your Character
• Get the MOST from your model
Set up Skeleton
•
•
•
•
Maya: Skeleton -> Joint Tool
Be anatomically accurate
Start from pivot; work outward
Use at least 2 perspectives
Use Mirror Joint
•
•
•
•
Orient Model to the Origin!!!
Only way to ensure symmetry
Much easier
Mirror Joint
– Select highest-order bone: hip
– Maya: skeleton -> mirror joint
Use Hypergraph
• Label bones
• Organize into hierarchy
– Click / drag
Bind to Skin
• Attaches skeleton to model
• Maya: skin -> bind skin -> smooth bind+
– Set max influence = 1
– Too many slows down in-game animation
Time to Animate
• Set a “neutral pose”
– Select All
– Key Everything at time = -10
Inverse Kinematics
•
•
Use IK Handles
– Maya: Skeleton -> IK Handle Tool
Allows fast and positioning
OH NO!
• Sometimes difficult to get specific pose…
• Then use Forward Kinematics
Have animation reference
• Easy to google
• Search for image displaying desired
animation keyframes
Loop Animations
• Save Effort – Copy / Paste Keyframes
– Click on keyframed object / IK handle
– Right click on Maya Timeline -> copy
– Move timeline -> paste
Create more animations
• Skip a few frames
• Select all
• Key all
– So animations don’t interpolate between each other
• Skip a few more frames
• Have at it!
Export your Animation
• Can download exporter from Ogre3d site