3d models, textures and bone animations for games

33
3D Models, Textures 3D Models, Textures and Bone Animations and Bone Animations for Games. for Games.

Upload: donald-norman

Post on 22-Dec-2015

236 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: 3D Models, Textures and Bone Animations for Games

3D Models, Textures and 3D Models, Textures and Bone Animations for Bone Animations for

Games.Games.

Page 2: 3D Models, Textures and Bone Animations for Games

Overview:Overview:

• Tools – Advantages & DisadvantagesTools – Advantages & Disadvantages

• Low-poly models – from scratchLow-poly models – from scratch

• Texturing – UV maps and skinsTexturing – UV maps and skins

• Bone Animation – setting up Bone Animation – setting up skeleton, inverse & forward skeleton, inverse & forward KinematicsKinematics

Page 3: 3D Models, Textures and Bone Animations for Games

The ToolsThe Tools• BlenderBlender

• Maya *Maya *

• 3DS3DS

• Wings 3DWings 3D

• Ultimate Unwrap *Ultimate Unwrap *

• Caligari Truespace *Caligari Truespace *

• Photoshop *Photoshop *

Page 4: 3D Models, Textures and Bone Animations for Games

BlenderBlender

– Pros: Pros:

•Free, Relatively Powerful. Free, Relatively Powerful.

•Can do skeletal animations. Can do skeletal animations.

•Easy to import/export.Easy to import/export.– Cons: Cons:

•Learning Curve;Learning Curve;

• counter-intuitive, “clunky” interface.counter-intuitive, “clunky” interface.

Page 5: 3D Models, Textures and Bone Animations for Games

MayaMaya

• Pros: Pros: – Extremely powerful. Extremely powerful. – Well documented. Well documented. – Elegant, fast interface. Elegant, fast interface. – Becoming industry standard.Becoming industry standard.

• Cons: Cons: – ~$2,000. ~$2,000. – Very good, but not excellent UV mappingVery good, but not excellent UV mapping

Page 6: 3D Models, Textures and Bone Animations for Games

3DS3DS

• Pros:Pros:– Very powerful.Very powerful.– Similar to MayaSimilar to Maya

• Cons: Cons: – Expensive. Expensive.

Page 7: 3D Models, Textures and Bone Animations for Games

Wings 3DWings 3D

• Fast. Fast. – Easy to use. Easy to use. – Can make excellent Low-Poly modelsCan make excellent Low-Poly models

• Cons: Cons: – No animation / UV mapping.No animation / UV mapping.– Hard to make complicated / High-poly modelsHard to make complicated / High-poly models

Page 8: 3D Models, Textures and Bone Animations for Games

Ultimate UnwrapUltimate Unwrap

• Pros: Pros: – Best UV mapping tool on the market (in my opinion)Best UV mapping tool on the market (in my opinion)– Very fast, simple interface.Very fast, simple interface.

• View texture on model in 3D environment.View texture on model in 3D environment.

• Automatically updates texture when savedAutomatically updates texture when saved

• All the functionality of more expensive toolsAll the functionality of more expensive tools

– Cheap (~$70)Cheap (~$70)

• Cons:Cons:– Only good for UV mappingOnly good for UV mapping– Not directly compatible with MayaNot directly compatible with Maya

• Need to “juggle” model formats *.obj -> *.mbNeed to “juggle” model formats *.obj -> *.mb

Page 9: 3D Models, Textures and Bone Animations for Games

Caligari TruespaceCaligari Truespace

• Pros:Pros:– Relatively powerfulRelatively powerful

•Decent skeletal animationsDecent skeletal animations

•UV mappingUV mapping

– Cheap (couple hundred $ for latest version)Cheap (couple hundred $ for latest version)

• Cons:Cons:– Extraordinarily awkward interfaceExtraordinarily awkward interface– Somewhat slowSomewhat slow

Page 10: 3D Models, Textures and Bone Animations for Games

PhotoshopPhotoshop

• A necessityA necessity

• Uses LayersUses Layers

• Highly Versatile tool setHighly Versatile tool set

• Great for creating skins to texture Great for creating skins to texture modelsmodels

Page 11: 3D Models, Textures and Bone Animations for Games

3D Modeling Technique3D Modeling Technique

• Art through extrusionArt through extrusion

• Minimize PolygonsMinimize Polygons

Page 12: 3D Models, Textures and Bone Animations for Games

Art through ExtrusionArt through Extrusion• Start with basic shape (cube)Start with basic shape (cube)

– Extrude a FaceExtrude a Face– Adjust size of faceAdjust size of face– Collapse vertices / edges to make anglesCollapse vertices / edges to make angles– Repeat aboveRepeat above

• Use SymmetryUse Symmetry

Page 13: 3D Models, Textures and Bone Animations for Games

Minimize Them Polies!Minimize Them Polies!• Use triangular points (when possible)Use triangular points (when possible)

• Focus attention on salient areasFocus attention on salient areas

• Rely on texturing for detail – keep it simpleRely on texturing for detail – keep it simple

• Orient human models in standard position (shown)Orient human models in standard position (shown)

Page 14: 3D Models, Textures and Bone Animations for Games

Some Buildings…Some Buildings…

• Both < 20 poliesBoth < 20 polies

Page 15: 3D Models, Textures and Bone Animations for Games

Some Space Ships…Some Space Ships…

Both <80 poliesBoth <80 polies

Page 16: 3D Models, Textures and Bone Animations for Games

UV / Texture MappingUV / Texture Mapping

• Different TypesDifferent Types

• MethodsMethods

• Minimize Size of ImagesMinimize Size of Images

Page 17: 3D Models, Textures and Bone Animations for Games

There’s more than one way to There’s more than one way to Skin a Cowboy…Skin a Cowboy…• Face PaintingFace Painting

– Paint a fixed texture to individual facesPaint a fixed texture to individual faces• Pros: easy, fastPros: easy, fast• Cons: looks atrocious up closeCons: looks atrocious up close

• MaterialsMaterials– Apply a “material” or surface texture to a faceApply a “material” or surface texture to a face

• Phong, Metallic, etc.Phong, Metallic, etc.• Diffuse, Ambient, Emissive, Specular, lightingsDiffuse, Ambient, Emissive, Specular, lightings• Pros: Looks really good. Pros: Looks really good. • Cons: Requires in-game light source. Expensive.Cons: Requires in-game light source. Expensive.

• UV Mapping *UV Mapping *– ““Unwrap” polygon model to flat surfaceUnwrap” polygon model to flat surface– ““Paint a picture” over unwrapped poliesPaint a picture” over unwrapped polies

• Pros: Can make low-poly models look Pros: Can make low-poly models look good!good!• Cons: Difficult to learn / do well.Cons: Difficult to learn / do well.

Page 18: 3D Models, Textures and Bone Animations for Games

UV MappingUV Mapping

• Import ModelImport Model

• Unwrap as desiredUnwrap as desired

• Create TextureCreate Texture

Page 19: 3D Models, Textures and Bone Animations for Games

Import ModelImport Model

• Disorganized UV mapDisorganized UV map

Page 20: 3D Models, Textures and Bone Animations for Games

Unwrap Model as DesiredUnwrap Model as Desired• Many Different TypesMany Different Types

– Box, cylindrical, plane, etc.Box, cylindrical, plane, etc.

• Make it “easy to paint”Make it “easy to paint”

• Conserve spaceConserve space

• Devote more space to salient partsDevote more space to salient parts

Page 21: 3D Models, Textures and Bone Animations for Games

Paint Texture Onto ModelPaint Texture Onto Model• Use many layers (Photoshop / PSP)Use many layers (Photoshop / PSP)

• Low opacity Air Brush for shadingLow opacity Air Brush for shading

• Darken Edges & Brighten centers of polygonsDarken Edges & Brighten centers of polygons– Gives a more “rounded” appearanceGives a more “rounded” appearance

• Keep textures small!Keep textures small!

Page 22: 3D Models, Textures and Bone Animations for Games

Skeletal Animations (Maya)Skeletal Animations (Maya)• Set up SkeletonSet up Skeleton

• Organize bones into HierarchyOrganize bones into Hierarchy

• Inverse / Forward KinematicsInverse / Forward Kinematics

• Skinning Your CharacterSkinning Your Character

• Get the MOST from your modelGet the MOST from your model

Page 23: 3D Models, Textures and Bone Animations for Games

Set up SkeletonSet up Skeleton• Maya: Skeleton -> Joint ToolMaya: Skeleton -> Joint Tool

• Be anatomically accurateBe anatomically accurate

• Start from pivot; work outwardStart from pivot; work outward

• Use at least 2 perspectivesUse at least 2 perspectives

Page 24: 3D Models, Textures and Bone Animations for Games

Use Mirror JointUse Mirror Joint• Orient Model to the Origin!!!Orient Model to the Origin!!!

• Only way to ensure symmetryOnly way to ensure symmetry

• Much easierMuch easier

• Mirror JointMirror Joint– Select highest-order bone: hipSelect highest-order bone: hip– Maya: skeleton -> mirror jointMaya: skeleton -> mirror joint

Page 25: 3D Models, Textures and Bone Animations for Games

Use HypergraphUse Hypergraph• Label bonesLabel bones

• Organize into hierarchyOrganize into hierarchy– Click / dragClick / drag

Page 26: 3D Models, Textures and Bone Animations for Games

Bind to SkinBind to Skin

• Attaches skeleton to modelAttaches skeleton to model

• Maya: skin -> bind skin -> smooth Maya: skin -> bind skin -> smooth bind+bind+– Set max influence = 1Set max influence = 1– Too many slows down in-game Too many slows down in-game

animationanimation

Page 27: 3D Models, Textures and Bone Animations for Games

Time to AnimateTime to Animate• Set a “neutral pose”Set a “neutral pose”

– Select AllSelect All– Key Everything at time = -10Key Everything at time = -10

Page 28: 3D Models, Textures and Bone Animations for Games

Inverse KinematicsInverse Kinematics• Use IK HandlesUse IK Handles

– Maya: Skeleton -> IK Handle ToolMaya: Skeleton -> IK Handle Tool

• Allows fast and positioningAllows fast and positioning

Page 29: 3D Models, Textures and Bone Animations for Games

OH NO!OH NO!• Sometimes difficult to get specific Sometimes difficult to get specific

pose…pose…

• Then use Forward KinematicsThen use Forward Kinematics

Page 30: 3D Models, Textures and Bone Animations for Games

Have animation referenceHave animation reference

• Easy to googleEasy to google

• Search for image displaying desired Search for image displaying desired animation keyframesanimation keyframes

Page 31: 3D Models, Textures and Bone Animations for Games

Loop AnimationsLoop Animations

• Save Effort – Copy / Paste KeyframesSave Effort – Copy / Paste Keyframes– Click on keyframed object / IK handleClick on keyframed object / IK handle– Right click on Maya Timeline -> copyRight click on Maya Timeline -> copy– Move timeline -> pasteMove timeline -> paste

Page 32: 3D Models, Textures and Bone Animations for Games

Create more animationsCreate more animations

• Skip a few framesSkip a few frames

• Select all Select all

• Key allKey all– So animations don’t interpolate between each otherSo animations don’t interpolate between each other

• Skip a few more framesSkip a few more frames

• Have at it!Have at it!

Page 33: 3D Models, Textures and Bone Animations for Games

Export your AnimationExport your Animation

• Can download exporter from Ogre3d Can download exporter from Ogre3d sitesite