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.

description

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 * - PowerPoint PPT Presentation

Transcript of 3D Models, Textures and Bone Animations for Games.

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

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

The ToolsThe Tools• BlenderBlender

• Maya *Maya *

• 3DS3DS

• Wings 3DWings 3D

• Ultimate Unwrap *Ultimate Unwrap *

• Caligari Truespace *Caligari Truespace *

• Photoshop *Photoshop *

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.

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

3DS3DS

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

• Cons: Cons: – Expensive. Expensive.

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

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

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

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

3D Modeling Technique3D Modeling Technique

• Art through extrusionArt through extrusion

• Minimize PolygonsMinimize Polygons

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

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)

Some Buildings…Some Buildings…

• Both < 20 poliesBoth < 20 polies

Some Space Ships…Some Space Ships…

Both <80 poliesBoth <80 polies

UV / Texture MappingUV / Texture Mapping

• Different TypesDifferent Types

• MethodsMethods

• Minimize Size of ImagesMinimize Size of Images

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.

UV MappingUV Mapping

• Import ModelImport Model

• Unwrap as desiredUnwrap as desired

• Create TextureCreate Texture

Import ModelImport Model

• Disorganized UV mapDisorganized UV map

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

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!

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

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

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

Use HypergraphUse Hypergraph• Label bonesLabel bones

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

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

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

Inverse KinematicsInverse Kinematics• Use IK HandlesUse IK Handles

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

• Allows fast and positioningAllows fast and positioning

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

pose…pose…

• Then use Forward KinematicsThen use Forward Kinematics

Have animation referenceHave animation reference

• Easy to googleEasy to google

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

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

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!

Export your AnimationExport your Animation

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