® Integrating Multi-Resolution Meshes Into Games - GDC '99 Multi-Resolution Mesh in Dark Reign II March 18, 1999 *All trademarks and brands property of their respective owners
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Who are we? Pandemic Studios Pandemic Studios –Developing Dark Reign II and Battlezone 2 Dark Reign II Dark Reign II –Sequel to popular RTS Game John Cooke 3D Programmer Dark Reign II Rick Glenn Art Director Dark Reign II
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Stay Traditional Real Time Strategy Stay Traditional Real Time Strategy –Base Building, Resource Management, Big Battles Dark Reign II Design Philosophy
® Integrating Multi-Resolution Meshes Into Games - GDC '99 True 3D True 3D –Player controlled camera –True Scale –Night/Day –Physics Infantry based Infantry based –Detailed units and animations –‘Fifa’-style Dark Reign II Design Philosophy
® Integrating Multi-Resolution Meshes Into Games - GDC '99 RTS means lots of units RTS means large views Detailed infantry means tons of polys Pentium 550 with Voodoo 3 minimum The Problem
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Static LOD Static LOD –The way we’ve always done it Tessellation Tessellation –Messiah Multi-Resolution Mesh (MRM) Multi-Resolution Mesh (MRM) –IAL’s latest 3D software technology Searching for a solution
® Integrating Multi-Resolution Meshes Into Games - GDC '99 MRM allows SMOOTH real time polygon reduction of meshes. What is MRM
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Scalability Scalability -real time frame rate control via polygon reduction. Visual quality Visual quality -increase foreground detail by reducing background. -better in game engine cut scenes. Why use MRM?
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Flexibility - -author only once for each unit - -tweak unit counts - -generate static LODs MultiRes* Software Toolkit consists of: - -MRMGEN.dll: integrate into authoring tool. - -MRM plug in for MAX: generates MRM files. – –MRM data from an export file Why use MRM?
® Integrating Multi-Resolution Meshes Into Games - GDC '99 MRM runtime is very simple. - -No run time tesselation or data generation of any kind. All mesh data is pre-allocated. - -Data describes how faces should re-index their vertex data to display a mesh at various resolutions. - -Easy to integrate with any graphics engine’s mesh data format. Integration into Code
® Integrating Multi-Resolution Meshes Into Games - GDC '99 MRMGEN does a lot of complex decision making to generate the runtime data - -Integration programmer doesn't need to know how it works. - -It uses only the meshes original data, determining the least important vertex at each resolution level. - -It attempts to keep texture and normal distortions to a minimum for as long as possible. Integration into Code
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Works best with a continuous skin, but not absolutely necessary. - -MRMGEN doesn’t accept data from multiple meshes. - -MultiRes Modifier plugin generates MRM files directly from Max. - -MultiRes Software Toolkit provides code for loading and saving MRM data. Integration into Code
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Write a simple mesh viewer application with your graphics library for development. - -Integrate the MRMGEN.dll directly into the tool and generate custom file format including MRM data. - -Provides artists a quick and easy way to see their assets in the game. Tool Integration
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Integration is easier for continuous- skin mesh data structures - -Continuous-skin, envelope animated models are typical for most current games - -Only requirement is vertex and face data must exist in contiguous arrays - -Meshes have separate arrays of vertex positions, normals, texture coordinates, and faces - -Each face has 3 sets of indexes; 1 each for vertex position, normal, and texture uv - -Could use other formats i.e. 1-to-1 mapping for vertex, normal, and uv - -IMESH accepts custom data records and keeps track of them for you. Data structures
® Integrating Multi-Resolution Meshes Into Games - GDC '99 MRMGEN generates MRM update records and optimizes the mesh - -One Vertex Update Record for each vertex in the mesh. - -Each contains a number of faces to increase/decrease and a collection of Face Update Records. - -One Face Update for each face vertex attribute to change: position, normal, uv. Data structures
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Data Structures typedef struct MRMUpdatesTag { unsigned longmaxNumVertices; unsigned longmaxNumFaces; unsigned longmaxNumNormals; unsigned longmaxNumTexCoords; VertexUpdate *vertexUpdates;// one for each vertex in the mesh } MRMUpdates;
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Data Structures typedef struct VertexUpdateTag { unsigned longvertexIndex; unsigned longparentVertexIndex; unsigned longnumNewFaces; unsigned longnumNewNormals; unsigned longnumNewTexCoords; unsigned longnumFaceUpdates; FaceUpdate *faceUpdates;// typically 2 } VertexUpdate;
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Data Structures typedef struct FaceUpdateTag { unsigned long faceIndex; AttribTokenattrib;// Vertex, Normal, or TexCoord Unsigned longvalue[2];// New attrib index; Increasing or Decreasing } FaceUpdate;
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Resolution change is achieved by traversing the update records. - -Only records for the vertices being removed or added are looped - -Vertex data is sorted by decreasing order of importance so LOD changes are minimal hit on the cache. - -Important as mesh polygon count increase - -MRM data is typically about the same size as the mesh data itself. Data structures
® Integrating Multi-Resolution Meshes Into Games - GDC '99
® Distance from the camera is a good primary polygon reduction metric - -Since detail is wasted in the background, get rid of it. - -Increase your polygon budget for the foreground, or for more units, effects, etc. - -Frame rate is another great metric - -Extra reduction for when frame rate drops below threshold. Runtime
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Digimation MultiRes tools for 3DS Max. - -3DS plug-in lets artists hand tweak MRM parameters and see the results in real-time. - -Dialogs for: -Vertex Merging Threshold: merge vertices of distinct groups; MRMGEN optimizes mesh. -Maintain Base Vertices: maintains vertices selected when MRMGEN is invoked. -Boundary Metric: keep materials distinct at the expense of reduction. - -Multiple Normals per Vertex with Crease Angle specification. - -Gives programmers an instant game friendly format and code toolkit. 3DSMax* vs. Softimage*
® Integrating Multi-Resolution Meshes Into Games - GDC '99 For Softimage you need to write your own plug-in or custom tool. Dark Reign II uses a custom tool along with some versatile tricks – –Frog Pose 3DSMax vs. Softimage
® Integrating Multi-Resolution Meshes Into Games - GDC '99 MRM allows for better art MRM saves time More Time = More Art MRM gives peace of mind Production Application
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Shoot for a higher ideal Can think about the high end Less low end issues than with Static LOD’s Concept
® Integrating Multi-Resolution Meshes Into Games - GDC '99 One Time Authorship of Assets One High poly rather than several Low poly Animate one model Don’t have to deal with transfer of animations Author Once
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Dark Reign II Unit created at 800 polys Time to create unit = 1 Day
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Interstate ‘76 Car at 300 Polys Time to create car = 1 Day
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Static LOD’s then created at 200, 100, and 75 polys Time to create static LOD’s= 1 Day
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Dark Reign II assets MRM’d to 800, 500, 300 polys Time to create Continuous LOD’s = 0 days
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Art team can create two MRM’d assets in time it takes to create one asset using static LOD’s
® Integrating Multi-Resolution Meshes Into Games - GDC ' poly model 800 poly model How does number of polys in source model affect MRMing?
® Integrating Multi-Resolution Meshes Into Games - GDC ' poly source 800 poly source Both models at 800 polys
® Integrating Multi-Resolution Meshes Into Games - GDC ' poly source 800 poly source Both models at 500 polys
® Integrating Multi-Resolution Meshes Into Games - GDC ' poly source 800 poly source Both models at 300 polys Result - No penalty for Higher Source Model
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Less production time Able to experiment more No popping Easier to change an asset Dial-In MRMing on a per asset basis Better Than Static LOD’s
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Code rarely optimized early on Lack of static LOD’s early on How many times do you run the game Easier to experiment Better Frame Rate During Production
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Proven technology Trying to project ahead to system spec is difficult 1 to 2 years before release High visuals vs Frame rate Take a lot of risk in production It’s usually pretty late in the production when you decide to either reduce polys or optimize engine Peace of Mind
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Low end versus high end Low end = 166 with Voodoo 1 High end = 550+ with TNT2+ How do we make a great game for all systems Bigger Sweet Spot
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Art made higher than intended target Game will look better as machines get faster Longer Legs
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Fewer texture and normal discontinuities is better for MRM Mesh is more efficient with fewer discontinuities Trade off between discontinuities and efficient use of texture space Art Considerations
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Why do we like MRM Why do we like MRM – –easy to use – –increases frame rate without degrading visual quality. Who can use MRM Who can use MRM – –anyone writing a 3D game that displays significant perspective reduction. i.e. everybody! Is MRM right for you
® Integrating Multi-Resolution Meshes Into Games - GDC '99 Things to consider when considering using MRM in your project Things to consider when considering using MRM in your project – –how else are you going to compete in the brave new world of super-scalability Is MRM right for you