Terrain in BattleField 3: A modern, complete, scalable system


Multiple raster resources used




Scalability
- arbitrary view distance
- arbitrary lod
- arbitrary velocity

Main observation

Quadtree node payload
- with / without ---?
- used as LODs

payload with LOD
- cost independently on size
- scalable

without LOD  - not scalable





Terrain decoration payloads
 - list of instance transforms ( grass, tree,,)
- according - scattering, shader splatted
- quite unique
- near-root high view distance

Realtime ed in FrostEd


Workflow issue
- compression and runtime editing
- bypass pipeline
- update scheme for procedural content need
- Frostbite terrains too large for some popular tools


Efficient on CPU



Efficient on GPU

GPU optmization: procedural virtual texturing
 - shader splatting ---  rendering slowly
- splatting not scaable in view distance: can't afford mutipass

By splatting into a texture!!!

Virtual texture key values

texture format
- RGBA8
-Indices into virtual texture tile atlas

MegaTexture/TeraTexture
- how reach 1Mx1M
    - indirection texture go 4k x 4k

Clipmap indirection
- resolved on CPU for each draw call

Tile compositing
 benf: small diet footprint, low latency, dynamic update, efficient workflow

Virtual texture issues
- blurriness
-runtime compression quality
-gpu tile cost offset
-limit hw filtering
-compositing latency
-limit at around 32 samples per meter
- two shader splatting: diff, normal,specular, smoothness

Data streaming
- typical tile size: 133x133x2

tile by tile streaming
- for slower gameplay

Tile bundle streaming
Hybrid streaming

Resident set size: powerful blurriness

Blurriness
- mip bias applied to terrain raster streaming
-pipeline trick --- no data is lost, cut tile size in half, addd on leaf level


BF3 blurriness
- cheap raster DX1

physics issue


Reducing disk seeks
- latency
   - co-locate nearby tiles

Improvement throughput
 - data tile are compressed by pipeline
 - incomplete quadtree

Hide latency
  - CLOD
 - global priority

Global priority
-

Procedural mesh generation
-mesh generated from hightailed
-straight-forward tessellation
-patches of 16x16 tris
-proj size roughly size
-blockly creastline

PC
- hightfield sampled in vertex shader


PS3
 - vertex shader fetch texture is too slow
     -  so...?


Mesh stitching
 - modify index, vertex unchange






Comments

Popular posts from this blog

Drawing textured cube with Vulkan on Android

glTF loader for Android Vulkan

C++ unit testing & CI integration in GitHub (I/2)