3D Modeling, Textures, Animation

advertisement
Graphics, Modeling, and Textures
Graphics Considerations
• Frame and back buffers
– Avoid artifacts (jitter and visible drawing)
– Swap or copy?
• Depth and stencil buffer
• Triangles
– Easily interpolate
– Planarity
• Vertices & coordinate space
Depth Bits
From http://www.agidev.com/articles/a.php?id=6&page=4
Limiting What we Render
• View frustrum
– Near and far planes
• Clipping
• Cull when possible
– Render Volume Partitioning
Backface Culling
Quadtree partitioning
• Collision detection
• Outdoor visibility checking
• Algorithm (2D):
– X/Y : consider bits
– Left shift at each level in tree
– When at leaf, stop
Quadtree Visualized
Graphic Primitives
Mesh as Triangle Strip
Indexed Strips
Applying Textures
Lighting
http://machinesdontcare.wordpress.com/2008/06/
http://www.directxtutorial.com/Tutorial9/B-Direct3DBasics/dx9B3.aspx
Modeling
Modeling (cont)
Using Normal Maps and Textures
Normal Maps and LOD
http://www.inition.co.uk/inition/product.php?SubCatID_=38&URL_=product_ffhaptic_sensable_claytools
http://upload.wikimedia.org/wikipedia/commons/3/36/Normal_map_example.png
Level of Detail
• Hardware limits number of polys rendered
• Use high-level models when possible
• Drop to low poly models (LOD) when needed
Level Editing
• Target fixed poly count (thought allow for
flexibility and customization)
Low-Poly Count Modeling
Animation
• Models consists of multiple meshes
– Each mesh has it’s own local coordinates for the
vertices in the mesh
– Meshes can be “connected” relative to each other
via skeletons/bones (rigging)
• Render each mesh & position them correctly
• Animating a model involves
transformations on a
per-mesh basis
http://creators.xna.com/en-US/sample/simpleanimation
Final thoughts
• Major difference in modeling and using
models
• Art & programming & level/character design
are of primary consideration
Download