APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric...

49

Transcript of APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric...

Page 1: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture
Page 2: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

APB: Creating a Powerful

Customisation System for a

Persistent Online Action Game

Maurizio Sciglio

Simon Taylor

Page 3: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Outline

Goals

Initial Design

Refinements

Demo

Scalability

Conclusions

Page 4: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

GOALS

Page 5: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

What is APB?

“Persistent Online Action Game”

Shared player-space

Fast-paced 3rd-person gameplay

RTW-run backend

Customisation a key selling point

PC initially

Unreal Engine 3

Page 6: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Decal Application – Forza

Page 7: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Decal Application – Forza

Page 8: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Decal Application

Not just vehicles; characters too

Characters are harder:

More complex shape/UV mapping

Heterogeneous surface (clothing, hair, etc.)

Complex masking for clothing

Therefore, simple UV-space composition not possible

Page 9: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Other Requirements

Face & body customisation

Hair styles

Clothing application with large variety of available styles

Decal application

Tattoos on skin

Print on clothes

Page 10: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

MMO Concerns

Large player count

Limited bandwidth

No upfront “Lobby”

Players enter and leave at any time

Page 11: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

INITIAL DESIGN

Page 12: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Parametric Description

Final assets (meshes & textures) are big

E.g. 1 MB for a 1024x1024 DXT5 texture

Bandwidth is expensive

Can’t send final assets over the network

Therefore, describe assets parametrically

Build final assets on clients

Fundamental principle of the system

Page 13: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Morphing

Fundamental mesh operation

Standard additive morphing

Used for Body & Facial modification

Sliders control individual target weights

Page 14: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Decals / Tattoos

Page 15: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Skin Tone

Page 16: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Skin Pigment

Page 17: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Skin – Additional Features

Page 18: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Clothing Customisation

Rendering / memory cost independent from the number of items

One mesh to rule them all!

Clothing mesh must be merged with the base mesh

Texture must be combined with the base texture

Page 19: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Clothing – Morph Item

Page 20: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Clothing – Extra Mesh Item

Page 21: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Mesh Culling

Page 22: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

UV Layout

Page 23: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

UV Layout

Page 24: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Character Materials

Main goals:

Single draw call per character

Support multiple materials

BRDF decompositions stored in a 3D texture

N dot L

R dot V

Per-pixel materialselection

Phong decomposition

Page 25: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

REFINEMENTS

Page 26: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Decal Projection Issues

Slow to construct

Large data size

Layer count had to be restricted

Artists didn’t like this

In most cases, not actually required

Solution: Symbols

Page 27: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Symbols

Page 28: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Distance-Field Encoding

Regular TextureDistance-field encoded

[http://www.valvesoftware.com/publications/2007/SIGGRAPH2007_AlphaTestedMagnification.pdf]

Page 29: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Height Scaling

Customisable character height

Per-bone non-uniform scaling

Many issues

Artist time

Animation issues

Collision implications

Fairness

Bugs!

Page 30: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Height Scaling

Page 31: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Projection Seams

Page 32: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Projection Seams

Page 33: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Hair-Clothing Interactions

Page 34: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Original

Page 35: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

With Fitting Morphs

Page 36: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Demo

Page 37: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

SCALABILITY

Page 38: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Bandwidth

…is expensive

Even parametric representation is big

Bandwidth is n2 in player count

Must minimise data size

Quantise parameters

zlib compress all data

Average ~4 kB per character

Limit complexity user can create

Page 39: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Background build

Assets built during gameplay

Two options

Threads

Time-slicing

Problems with threads

No multithreaded D3D access

Less control

We chose time-slicing

Page 40: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

The Correct Choice?

Time-slicing brings its own issues

Developer time

Frame-rate spikes

No true parallelism

In hindsight, threads were maybe the better option

Page 41: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Memory Management

Memory use for customised assets is huge

Too slow to build on-demand

Therefore, must write out assets to disk cache

Textures and meshes streamed from cache files

Total memory usage capped

Not persistent

Page 42: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

RESULTS & CONCLUSIONS

Page 43: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture
Page 44: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture
Page 45: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture
Page 46: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture
Page 47: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Future Work

Blend-weight morphing

Physics simulation on hair and clothes

Improved hair rendering

DXT Compression

Better descriptor compression

Persistent disk cache

Page 48: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Conclusions

Customisation needs time and resources

Roughly 50% of graphics team workload

Significant proportion of memory and CPU/GPU resources dedicated to it

Get art pipeline sorted first

Flexibility is key

For artists and players

Distance fields are fantastic

Page 49: APB: Creating a Powerfultwvideo01.ubm-us.net/o1/vault/gdc10/slides/Sciglio... · Parametric Description Final assets (meshes & textures) are big E.g. 1 MB for a 1024x1024 DXT5 texture

Questions?

[email protected]

[email protected]

www.realtimeworlds.com

www.apb.com