Top Banner
Integrating Multi-Resolution Meshes Into Game Integrating Multi-Resolution Meshes Into Game s - GDC '99 s - GDC '99 Multi-Resolution Mesh Multi-Resolution Mesh in Dark Reign II in Dark Reign II March 18, 1999 *All trademarks and brands property of their respective owners *All trademarks and brands property of their respective owners
44

Multi-Resolution Mesh in Dark Reign II

Dec 30, 2015

Download

Documents

mufutau-kramer

Multi-Resolution Mesh in Dark Reign II. March 18, 1999. *All trademarks and brands property of their respective owners. Pandemic Studios Developing Dark Reign II and Battlezone 2 Dark Reign II Sequel to popular RTS Game. Who are we?. John Cooke 3D Programmer Dark Reign II. Rick Glenn - PowerPoint PPT Presentation
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Multi-Resolution Mesh in Multi-Resolution Mesh in Dark Reign IIDark Reign II

March 18, 1999

*All trademarks and brands property of their respective owners*All trademarks and brands property of their respective owners

Page 2: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Who are we?Who are we?Pandemic StudiosPandemic Studios– Developing Dark Developing Dark

Reign II and Reign II and Battlezone 2Battlezone 2

Dark Reign IIDark Reign II– Sequel to popular Sequel to popular

RTS GameRTS Game

John CookeJohn Cooke3D Programmer3D Programmer

Dark Reign IIDark Reign II

Rick GlennRick GlennArt DirectorArt DirectorDark Reign IIDark Reign II

Page 3: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Stay Traditional Real Time StrategyStay Traditional Real Time Strategy–Base Building, Resource Management, Base Building, Resource Management,

Big BattlesBig Battles

Dark Reign II Design Dark Reign II Design PhilosophyPhilosophy

Page 4: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

True 3DTrue 3D–Player controlled cameraPlayer controlled camera

–True ScaleTrue Scale

–Night/DayNight/Day

–Physics Physics

Infantry basedInfantry based–Detailed units and animationsDetailed units and animations

– ‘‘Fifa’-styleFifa’-style

Dark Reign II Design Dark Reign II Design PhilosophyPhilosophy

Page 5: Multi-Resolution Mesh in Dark Reign II
Page 6: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

RTS means lots of unitsRTS means lots of units

RTS means large viewsRTS means large views

Detailed infantry means tons of polysDetailed infantry means tons of polys

Pentium 550 with Voodoo 3 minimumPentium 550 with Voodoo 3 minimum

The ProblemThe Problem

Page 7: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Static LODStatic LOD–The way we’ve always done it The way we’ve always done it

TessellationTessellation–MessiahMessiah

Multi-Resolution Mesh (MRM)Multi-Resolution Mesh (MRM)– IAL’s latest 3D Software TechnologyIAL’s latest 3D Software Technology

Searching for a solutionSearching for a solution

Page 8: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

MRM allows SMOOTH real time MRM allows SMOOTH real time polygon reduction of meshes.polygon reduction of meshes.

What is MRMWhat is MRM

Page 9: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

ScalabilityScalability- real time frame rate real time frame rate

control via polygon control via polygon reduction.reduction.

Visual qualityVisual quality- increase foreground increase foreground

detail by reducing detail by reducing background.background.

- better in game engine cut better in game engine cut scenes.scenes.

Why use MRM?Why use MRM?

Page 10: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

FlexibilityFlexibility- author only once for each unit author only once for each unit

- tweak unit countstweak unit counts

- generate static LODsgenerate static LODs

MultiRes* Software Toolkit consists of:MultiRes* Software Toolkit consists of:- MRMGEN.dll: integrate into authoring tool.MRMGEN.dll: integrate into authoring tool.

- MRM plug in for MAX: generates MRM files.MRM plug in for MAX: generates MRM files.

–MRM Data from an export fileMRM Data from an export file

Why use MRM?Why use MRM?

Page 11: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

MRM runtime is very simple.MRM runtime is very simple.- No run time tesselation or data No run time tesselation or data

generation of any kind. All mesh generation of any kind. All mesh data is pre-allocated. data is pre-allocated.

- Data describes how faces should Data describes how faces should re-index their vertex data to re-index their vertex data to display a mesh at various display a mesh at various resolutionsresolutions. .

- Easy to integrate with any Easy to integrate with any graphics engine’s mesh data graphics engine’s mesh data format.format.

Integration into CodeIntegration into Code

Page 12: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

MRMGEN does a lot of complex decision MRMGEN does a lot of complex decision making to generate the runtime datamaking to generate the runtime data- Integration programmer doesn't need to Integration programmer doesn't need to

know how it works.know how it works.

- It uses only the meshes original data, It uses only the meshes original data, determining the least important vertex at determining the least important vertex at each resolution level. each resolution level.

- It attempts to keep texture and normal It attempts to keep texture and normal distortions to a minimum for as long as distortions to a minimum for as long as possible.possible.

Integration into CodeIntegration into Code

Page 13: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Works best with a continuous Works best with a continuous skin, but not absolutely skin, but not absolutely necessary.necessary. - MRMGEN doesn’t accept data MRMGEN doesn’t accept data

from multiple meshes. from multiple meshes.

- MultiRes Modifier plugin MultiRes Modifier plugin generates MRM files directly generates MRM files directly from Max.from Max.

- MultiRes Software Toolkit MultiRes Software Toolkit provides code for loading provides code for loading and saving MRM data.and saving MRM data.

Integration into CodeIntegration into Code

Page 14: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Write a simple mesh viewer Write a simple mesh viewer application with your application with your graphics library for graphics library for development. development. - Integrate the MRMGEN.dll Integrate the MRMGEN.dll

directly into the tool and directly into the tool and generate custom file format generate custom file format including MRM data.including MRM data.

- Provides artists a quick and Provides artists a quick and easy way to see their assets in easy way to see their assets in the game.the game.

Tool IntegrationTool Integration

Page 15: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Integration is easier for continuous-skin Integration is easier for continuous-skin mesh data structuresmesh data structures- Continuous-skin, envelope animated models are typical for Continuous-skin, envelope animated models are typical for

most current gamesmost current games

- Only requirement is vertex and face data must exist in Only requirement is vertex and face data must exist in contiguous arrayscontiguous arrays

- Meshes have separate arrays of vertex positions, normals, Meshes have separate arrays of vertex positions, normals, texture coordinates, and facestexture coordinates, and faces

- Each face has 3 sets of indexes; 1 each for vertex position, Each face has 3 sets of indexes; 1 each for vertex position, normal, and texture uvnormal, and texture uv

- Could use other formats i.e. 1-to-1 mapping for vertex, normal, Could use other formats i.e. 1-to-1 mapping for vertex, normal, and uvand uv

- IMESH accepts custom data records and keeps track of them IMESH accepts custom data records and keeps track of them for you.for you.

Data structuresData structures

Page 16: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

MRMGEN generates MRM MRMGEN generates MRM update records and optimizes update records and optimizes the meshthe mesh- One Vertex Update Record for One Vertex Update Record for

each vertex in the mesh.each vertex in the mesh.

- Each contains a number of faces Each contains a number of faces to increase/decrease and a to increase/decrease and a collection of Face Update collection of Face Update Records.Records.

- One Face Update for each face One Face Update for each face vertex attribute to change: vertex attribute to change: position, normal, uv.position, normal, uv.

Data structuresData structures

Page 17: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Data StructuresData Structurestypedef struct MRMUpdatesTag

{

unsigned long maxNumVertices;

unsigned long maxNumFaces;

unsigned long maxNumNormals;

unsigned long maxNumTexCoords;

VertexUpdate * vertexUpdates; // one for each vertex in the mesh

} MRMUpdates;

Page 18: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Data StructuresData Structurestypedef struct VertexUpdateTag

{

unsigned long vertexIndex;

unsigned long parentVertexIndex;

unsigned long numNewFaces;

unsigned long numNewNormals;

unsigned long numNewTexCoords;

unsigned long numFaceUpdates;

FaceUpdate * faceUpdates; // typically 2

} VertexUpdate;

Page 19: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Data StructuresData Structurestypedef struct FaceUpdateTag

{

unsigned long faceIndex;

AttribToken attrib; // Vertex, Normal, or TexCoord

Unsigned long value[2]; // New attrib index; Increasing or Decreasing

} FaceUpdate;

Page 20: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Resolution change is achieved Resolution change is achieved by traversing the update by traversing the update records.records.- Only records for the vertices being Only records for the vertices being

removed or added are loopedremoved or added are looped

- Vertex data is sorted by decreasing order Vertex data is sorted by decreasing order of importance so LOD changes are of importance so LOD changes are minimal hit on the cache. minimal hit on the cache.

- Important as mesh polygon count Important as mesh polygon count increase increase

- MRM data is typically about the same MRM data is typically about the same size as the mesh data itself.size as the mesh data itself.

Data structuresData structures

Page 21: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Page 22: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Distance from the camera is a Distance from the camera is a good primary polygon reduction good primary polygon reduction metricmetric- Since detail is wasted in the Since detail is wasted in the

background, get rid of it.background, get rid of it.

- Increase your polygon budget for Increase your polygon budget for the foreground, or for more units, the foreground, or for more units, effects, etc.effects, etc.

- Frame rate is another great metricFrame rate is another great metric

- Extra reduction for when frame rate Extra reduction for when frame rate drops below threshold.drops below threshold.

RuntimeRuntime

Page 23: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Digimation MultiRes tools for 3DS Max.Digimation MultiRes tools for 3DS Max.- 3DS plug-in lets artists hand tweak MRM parameters and see 3DS plug-in lets artists hand tweak MRM parameters and see

the results in real-time.the results in real-time.

- Dialogs for:Dialogs for:- Vertex Merging Threshold: merge vertices of distinct groups; Vertex Merging Threshold: merge vertices of distinct groups;

MRMGEN optimizes mesh.MRMGEN optimizes mesh.

- Maintain Base Vertices: maintains vertices selected when Maintain Base Vertices: maintains vertices selected when MRMGEN is invoked.MRMGEN is invoked.

- Boundary Metric: keep materials distinct at the expense of Boundary Metric: keep materials distinct at the expense of reduction.reduction.

- Multiple Normals per Vertex with Crease Angle specification.Multiple Normals per Vertex with Crease Angle specification.

- Gives programmers an instant game friendly format and Gives programmers an instant game friendly format and code toolkit.code toolkit.

3DSMax* vs. Softimage*3DSMax* vs. Softimage*

Page 24: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

For Softimage you need to write your For Softimage you need to write your own plug-in or custom tool.own plug-in or custom tool.

Dark Reign II uses a custom tool along Dark Reign II uses a custom tool along with some versatile trickswith some versatile tricks–Frog PoseFrog Pose

3DSMax vs. Softimage3DSMax vs. Softimage

Page 25: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

MRM allows for better artMRM allows for better artMRM saves timeMRM saves timeMore Time = More ArtMore Time = More ArtMRM gives peace of mindMRM gives peace of mind

Production ApplicationProduction Application

Page 26: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Shoot for a higher Shoot for a higher idealideal

Can think about Can think about the high endthe high end

Less low end Less low end issues than with issues than with Static LOD’sStatic LOD’s

ConceptConcept

Page 27: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

One Time Authorship One Time Authorship of Assetsof Assets

One High poly rather One High poly rather than several Low polythan several Low poly

Animate one modelAnimate one modelDon’t have to deal with Don’t have to deal with

transfer of animationstransfer of animations

Author OnceAuthor Once

Page 28: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Dark Reign II Unit Dark Reign II Unit created at 800 created at 800 polyspolys

Time to create unit = 1 DayTime to create unit = 1 Day

Page 29: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Interstate ‘76 Car at Interstate ‘76 Car at 300 Polys300 Polys

Time to create car = 1 DayTime to create car = 1 Day

Page 30: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Static LOD’s then Static LOD’s then created at 200, 100, created at 200, 100, and 75 polysand 75 polys

Time to create static LOD’s= 1 DayTime to create static LOD’s= 1 Day

Page 31: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Dark Reign II assets MRM’d to 800, 500, 300 polysDark Reign II assets MRM’d to 800, 500, 300 polys

Time to create Continuous LOD’s = 0 daysTime to create Continuous LOD’s = 0 days

Page 32: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Art team can create two Art team can create two MRM’d assets in time it MRM’d assets in time it takes to create one takes to create one asset using static asset using static LOD’sLOD’s

Page 33: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

1200 poly model1200 poly model 800 poly model800 poly model

How does number of polys in How does number of polys in source model affect MRMing?source model affect MRMing?

Page 34: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

1200 poly source1200 poly source 800 poly source800 poly source

Both models at 800 polysBoth models at 800 polys

Page 35: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

1200 poly source1200 poly source 800 poly source800 poly source

Both models at 500 polysBoth models at 500 polys

Page 36: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

1200 poly source1200 poly source 800 poly source800 poly source

Both models at 300 polysBoth models at 300 polys

Result - No penalty for Higher Source ModelResult - No penalty for Higher Source Model

Page 37: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Less production timeLess production timeAble to experiment Able to experiment

moremoreNo poppingNo poppingEasier to change an Easier to change an

assetassetDial-In MRMing on a Dial-In MRMing on a

per asset basisper asset basis

Better Than Static LOD’sBetter Than Static LOD’s

Page 38: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Code rarely optimized Code rarely optimized early onearly on

Lack of static LOD’s early Lack of static LOD’s early onon

How many times do you How many times do you run the gamerun the game

Easier to experimentEasier to experiment

Better Frame Rate During Better Frame Rate During ProductionProduction

Page 39: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Proven technologyProven technologyTrying to project ahead to system spec Trying to project ahead to system spec

is difficult 1 to 2 years before releaseis difficult 1 to 2 years before releaseHigh visuals vs. Frame RateHigh visuals vs. Frame RateTake a lot of risk in productionTake a lot of risk in productionIt’s usually pretty late in the production It’s usually pretty late in the production

when you decide to either reduce polys when you decide to either reduce polys or optimize engineor optimize engine

Peace of MindPeace of Mind

Page 40: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Low end versus high endLow end versus high endLow end = 166 with Low end = 166 with

Voodoo 1Voodoo 1High end = 550+ with High end = 550+ with

TNT2+TNT2+How do we make a great How do we make a great

game for all systemsgame for all systems

Bigger Sweet SpotBigger Sweet Spot

Page 41: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Art made higher than Art made higher than intended targetintended target

Game will look better Game will look better as machines get fasteras machines get faster

Longer LegsLonger Legs

Page 42: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Fewer texture and normal Fewer texture and normal discontinuities is better for MRMdiscontinuities is better for MRM

Mesh is more efficient with fewer Mesh is more efficient with fewer discontinuitiesdiscontinuities

Trade off between discontinuities and Trade off between discontinuities and efficient use of texture spaceefficient use of texture space

Art ConsiderationsArt Considerations

Page 43: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Why do we like MRMWhy do we like MRM–easy to useeasy to use

– increases frame rate without degrading increases frame rate without degrading visual quality.visual quality.

Who can use MRMWho can use MRM–anyone writing a 3D game that displays anyone writing a 3D game that displays

significant perspective reduction. i.e. significant perspective reduction. i.e. everybody!everybody!

Is MRM right for youIs MRM right for you

Page 44: Multi-Resolution Mesh in Dark Reign II

Integrating Multi-Resolution Meshes Into Games - GDC '9Integrating Multi-Resolution Meshes Into Games - GDC '999

Things to consider Things to consider when considering when considering using MRM in your using MRM in your projectproject–how else are you how else are you

going to compete in going to compete in the brave new world the brave new world of super-scalabilityof super-scalability

Is MRM right for youIs MRM right for you