Ka Chen Technique Architect Ubisoft GDC 2015

Similar documents
GPU Architecture. Michael Doggett ATI

Recent Advances and Future Trends in Graphics Hardware. Michael Doggett Architect November 23, 2005

Real-Time BC6H Compression on GPU. Krzysztof Narkowicz Lead Engine Programmer Flying Wild Hog

Dynamic Resolution Rendering

Software Virtual Textures

Water Flow in. Alex Vlachos, Valve July 28, 2010

Optimizing AAA Games for Mobile Platforms

GPU-Driven Rendering Pipelines

Optimizing Unity Games for Mobile Platforms. Angelo Theodorou Software Engineer Unite 2013, 28 th -30 th August

Radeon HD 2900 and Geometry Generation. Michael Doggett

Image Processing and Computer Graphics. Rendering Pipeline. Matthias Teschner. Computer Science Department University of Freiburg

Image Synthesis. Transparency. computer graphics & visualization

Touchstone -A Fresh Approach to Multimedia for the PC

Advanced Graphics and Animations for ios Apps

Workstation Applications for Windows. NVIDIA MAXtreme User s Guide

Advanced Visual Effects with Direct3D

The Evolution of Computer Graphics. SVP, Content & Technology, NVIDIA

Computer Graphics Hardware An Overview

DATA VISUALIZATION OF THE GRAPHICS PIPELINE: TRACKING STATE WITH THE STATEVIEWER

How To Understand The Power Of Unity 3D (Pro) And The Power Behind It (Pro/Pro)

Performance Optimization and Debug Tools for mobile games with PlayCanvas

This Unit: Putting It All Together. CIS 501 Computer Architecture. Sources. What is Computer Architecture?

Grid Computing for Artificial Intelligence

OpenGL Performance Tuning

Overview Motivation and applications Challenges. Dynamic Volume Computation and Visualization on the GPU. GPU feature requests Conclusions

Low power GPUs a view from the industry. Edvard Sørgård

Hi everyone, my name is Michał Iwanicki. I m an engine programmer at Naughty Dog and this talk is entitled: Lighting technology of The Last of Us,

Blender addons ESRI Shapefile import/export and georeferenced raster import

Shader Model 3.0. Ashu Rege. NVIDIA Developer Technology Group

Unreal Engine 4: Mobile Graphics on ARM CPU and GPU Architecture

What is GPUOpen? Currently, we have divided console & PC development Black box libraries go against the philosophy of game development Game

Deferred Shading & Screen Space Effects

Outline. srgb DX9, DX10, XBox 360. Tone Mapping. Motion Blur

Radeon GPU Architecture and the Radeon 4800 series. Michael Doggett Graphics Architecture Group June 27, 2008

Optimization for DirectX9 Graphics. Ashu Rege

How To Teach Computer Graphics

Modern Graphics Engine Design. Sim Dietrich NVIDIA Corporation

3D Computer Games History and Technology

Making Dreams Come True: Global Illumination with Enlighten. Graham Hazel Senior Product Manager Sam Bugden Technical Artist

Far Cry and DirectX. Carsten Wenzel

VRayPattern also allows to curve geometry on any surface

Visualization and Feature Extraction, FLOW Spring School 2016 Prof. Dr. Tino Weinkauf. Flow Visualization. Image-Based Methods (integration-based)

OpenEXR Image Viewing Software

Image Synthesis. Fur Rendering. computer graphics & visualization

CLOUD GAMING WITH NVIDIA GRID TECHNOLOGIES Franck DIARD, Ph.D., SW Chief Software Architect GDC 2014

GPU File System Encryption Kartik Kulkarni and Eugene Linkov

NVIDIA GeForce GTX 580 GPU Datasheet

How To Use An Amd Ramfire R7 With A 4Gb Memory Card With A 2Gb Memory Chip With A 3D Graphics Card With An 8Gb Card With 2Gb Graphics Card (With 2D) And A 2D Video Card With

Consolidated Visualization of Enormous 3D Scan Point Clouds with Scanopy

SkillsUSA 2014 Contest Projects 3-D Visualization and Animation

Employing Complex GPU Data Structures for the Interactive Visualization of Adaptive Mesh Refinement Data

Kodu Curriculum: Getting Started with Keyboard and Mouse

Building an Advanced Invariant Real-Time Human Tracking System

Binary search tree with SIMD bandwidth optimization using SSE

Rethinking SIMD Vectorization for In-Memory Databases

Broken Shard. Alpha Report. Benjamin Schagerl, Dominik Dechamps, Eduard Reger, Markus Wesemann. TUM Computer Games Laboratory

Visualisation of Large Datasets with Houdini

INTRODUCTION TO RENDERING TECHNIQUES

ATI Radeon 4800 series Graphics. Michael Doggett Graphics Architecture Group Graphics Product Group

Visualizing Data: Scalable Interactivity

Amazing renderings of 3D data... in minutes.

Adobe Marketing Cloud Sharpening images in Scene7 Publishing System and on Image Server

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

L20: GPU Architecture and Models

Course Developer: Charles Shami, Professor, Savannah College of Art and Design

PRODUCING DV VIDEO WITH PREMIERE & QUICKTIME

ONYX. Preflight Training. Navigation Workflow Issues Preflight Tabs

GPUs Under the Hood. Prof. Aaron Lanterman School of Electrical and Computer Engineering Georgia Institute of Technology

Introduction to Game Programming. Steven Osman

Determine If An Equation Represents a Function

SAPPHIRE TOXIC R9 270X 2GB GDDR5 WITH BOOST

How To Make A Texture Map Work Better On A Computer Graphics Card (Or Mac)

Color correction in 3D environments Nicholas Blackhawk

OpenGL Insights. Edited by. Patrick Cozzi and Christophe Riccio

Silverlight for Windows Embedded Graphics and Rendering Pipeline 1

Beyond 2D Monitor NVIDIA 3D Stereo

Performance Analysis and Visualization of SystemC Models. Adam Donlin and Thomas Lenart Xilinx Research

AMD GPU Architecture. OpenCL Tutorial, PPAM Dominik Behr September 13th, 2009

Beginning Android 4. Games Development. Mario Zechner. Robert Green

GPU(Graphics Processing Unit) with a Focus on Nvidia GeForce 6 Series. By: Binesh Tuladhar Clay Smith

Files Used in this Tutorial

Video VBOX Pro RLVD10P2P/RLVD10P2PV/RLVD10P4PV/RLVD20P2PV/RLVD20P4PV. Features

Advanced Rendering for Engineering & Styling

GUI GRAPHICS AND USER INTERFACES. Welcome to GUI! Mechanics. Mihail Gaianu 26/02/2014 1

How to resize, rotate, and crop images

3D Stereoscopic Game Development. How to Make Your Game Look

Reference Manual DATAKIT

1. Central Monitoring System Software

Ultra-High Resolution Digital Mosaics

GPU Shading and Rendering: Introduction & Graphics Hardware

ontroller LSI with Built-in High- Performance Graphic Functions for Automotive Applications

Writing Applications for the GPU Using the RapidMind Development Platform

FLOATING-POINT ARITHMETIC IN AMD PROCESSORS MICHAEL SCHULTE AMD RESEARCH JUNE 2015

What is LOG Storm and what is it useful for?

The Dennis Technique for SketchUp Models in Photoshop

Hardware design for ray tracing

Equalizer. Parallel OpenGL Application Framework. Stefan Eilemann, Eyescale Software GmbH

Transcription:

Ka Chen Technique Architect Ubisoft

1. Overview of Virtual Texture Techniques 2. Far Cry 4 Terrain 3. Adaptive Virtual Textures - AVT 4. Virtual Texture Rendering Challenges 5. Results, Performance, Summary

Extremely Large Virtual Texture Indirection Texture Physical Texture Cache Virtual address -> Physical address Virtual texturing in games Mega-Textures Procedural Virtual Textures

Developed by id Software for Rage (Waveren 2013) Texture data is stored on disk and streamed to memory as required Runtime determines the required tiles (pages) and requests them from disk Tiles are loaded to a tile cache (physical texture cache) and the page table (indirection texture) is updated Image from Rage (id Software)

Used by DICE in Frostbite Engine for Battle Field3 (Widmark 2012) Splats terrain rendering into virtual textures at runtime No highly compressed virtual textures from disk Direct render into virtual texture for missing pages Leverages frame-to-frame coherency to reduce terrain rendering cost Powerful GPU optimization for terrain rendering

Cross platform (PS4, Xbox1, PC, PS3, Xbox 360) Large world: 10 x 10 KM Far terrain(vista terrain > 300 meters away): Offline baked geometry and textures Near terrain: Rendered from height-map 4 detail material layers blended with a mask texture Road and decals add unique detail Target resolution: 10 texels / cm Could use virtual textures

For next gen platforms we want to add a massive number of procedurallygdc placed 2015 decals

Simple deferred decals would be too expensive in this quantity So optimize by baking decals into a virtual texture at runtime

Virtual texture Indirection texture Physical texture 512K x 512K 2K x 2K 9K x 9K 11 Virtual texture mips 11 indirection texture mips

Entry coordinate (x, y): Each entry represents one virtual page Entry coordinate = Virtual page coordinate / virtual page size Entry content format: 32 bit integer PageOffsetX = Physical page U Coordinate / physical page size PageOffsetY = Physical page V Coordinate / physical page size Mip: Mip-map level of this page Debug: used for debugging only (for example saving a frame counter) Indirection texture

With conventional virtual texturing 512K x 512K Virtual Texture on 10 x 10 Km world 0.5 texel/cm resolution 10 texel/cm resolution 10 million x 10 million Virtual Texture! Another technique is required.

Based on procedural virtual textures The 10x10KM world is divided into 64x64 meter sectors Near terrain sectors: Allocate virtual images in the virtual texture Nearer sectors : larger virtual images 64K x 64K (64K / 64 meter = 10 texels/cm) Farther sectors : smaller virtual images 32K x 32K 16K x 16K 1K x 1K

Allocate virtual images inside the virtual texture for all close sectors Visualize the allocation of virtual images for close sectors inside virtual texture Each colored square represents one virtual image for each nearby sector Camera frustum

2 sectors nearest the camera 64K x 64K virtual images 6 sectors further from camera 32K x 32K virtual images Multiple sectors slightly further from camera 16K x 16K virtual images Continue until all nearby sectors are allocated in the virtual texture

Click play : Showing adjustment of virtual images at runtime

Upscale virtual image size when camera moves closer 32K x 32K -> 64K x 64K

Downscale virtual image size when camera moves further 64K x 64K -> 32K x 32K

We allocate a larger virtual image in the virtual texture and remove the old one In this example, 32K x 32K -> 64K x 64K

Terrain material blending with additional decals Already cached in our physical texture cache Shift and reuse them!

For all pages that are from mip 1 to mip 10, copy entries of indirection texture from old image to new image while shifting up 1 mip Old virtual image: 32K x 32K Mip 0 Mip 1 Mip 2 Mip 3 Mip 7 Mip 8 mip 9 mip 10 New virtual image: 64K x 64K Mip 0 Mip 1 Mip 2 Mip 3 Mip 3 Mip 8 mip 9 mip 10

Virtual texture mip 0 with old image Indirection texture mip 0 One entry content in this image: { PageOffset = (3, 2), Mip = 0 } 0 Physical texture 0 1 2 3 4 5 6 7 8 9 10 Virtual texture mip 1 with new image Indirection texture mip 1 1 2 3 4 5 6 7 8 { PageOffset = (3, 2), Mip = 91 } Do it for all pages in mip 1 in new virtual image Update mip 2 10 pages in the similar way 1 0

Need to handle mip 0 pages They haven t been rendered in the old image Old image: 32K x 32K Mip 0 Mip 1 Mip 2 Mip 3 Mip 7 Mip 8 mip 9 mip 10 New image: 64K x 64K Mip 0 Mip 1 Mip 2 Mip 3 Mip 3 Mip 8 mip 9 mip 10

4 mip 0 pages have 1 corresponding mip 1 page Temporarily map to lower mip page Images appear blurred in this frame Will become sharper after correctly updated. Mip 0 Mip 1

Virtual texture mip 1 Indirection texture mip 1 One entry content in this image: { PageOffset = (5, 2), Mip = 1 } 0 Physical texture 0 1 2 3 4 5 6 7 8 9 10 1 Virtual texture mip 0 2 3 Indirection texture mip 0 4 5 6 7 Copy entry content to 4 corresponding mip 0 entries { PageOffset = (5, 8 2), Mip = 1 } 9 Do it for all pages in mip 0 in new virtual image 1 0

Copy indirection texture entries content Indirection texture mip 0 Do not shift down mip! { PageOffset = (x, y), Mip = 1 } Physical UV is calculated according to the mip in the entry Code snippet in terrain pixel shader scale = (virtual texture size / physical texture size) >> mip bias = physical page offset virtual page offset * scale physical uv = virtual uv * scale + bias Physical page offset and mip are the entry content

We allocate a smaller virtual image in the virtual texture and remove the old one In this example, 64K x 64K -> 32K x 32K Reverse the steps of upscaling virtual image Scale down its virtual image 64K x 64K -> 32K x 32K Sector becomes further to camera:

Old virtual image: 64K x 64K Mip 0 Mip 1 Mip 2 Mip 3 Mip 4 Mip 8 mip 9 mip 10 New virtual image: 32K x 32K Mip 0 Mip 1 Mip 2 Mip 3 Mip 7 Mip 8 mip 9 mip 10

Strategy Output page IDs and MIP levels To a Read Write Buffer During G-Buffer pass Buffer format (32 bits) PageID XY = Virtual UV / Virtual Page Size Size = log2 (Virtual Image Size) Buffer size: 1/8 of resolution of MRTs

Game Scene 1/8 x 1/8 PageID RW Buffer

Caching virtual textures can be slow Camera moves fast -> need to render a lot of pages When driving a vehicle Flying

Solution:Distributed rendering Sort required pages by mip levels low -> high Distribute the rendering of pages into multiple frames

Frame N Frame N+1 Frame N+2 Frame N+3

Artists want to generate many decals efficiently Solution: Procedural content generator Automatically attach decals to specified objects Leaves, stones, roots under trees Cracks, dirt on road Much more

Procedurally generated decal :

Procedurally generated decal : Attach to other procedurally generated content For example generate fallen leaves under trees

Support 8x anisotropic in Far Cry 4 Texels in neighbor pages are not adjacent in world space This could cause color bleeding Solution: Add 4 texels border to physical texture pages Physical texture page: 264 x 264 Render page with 264 x 264 viewport

4 texels border Enlarge viewport 264 x 264 256 * 256 original page content Physical texture page: 264 * 264 Can support 8x anisotropic filtering

Only bilinear filtering See seams where mip level is changing Far Cry 4 Solution: software trilinear filtering Fetch virtual textures twice with mip(x) and mip(x+1) Calculate linear blending of fetched colors in shader Other solution: hardware trilinear filtering Create ¼ size mip 1 cache Render into mip 1 cache too Hardware handle the blending between mips 25% more cache memory

Bi-Linear Anisotropic Tri-Linear, Anisotropic

Disabled Enabled AVT

Disabled Enabled AVT

Performance (PS4) Static scene (Cache primed) CPU (rendering thread) 0.2 ms Analyze PageID buffer GPU 0.1 ms Write PageID buffer Dynamic scene (Caching virtual textures) 0.5 1 ms Setup time for render 0.5 1 ms Render terrain and decals into virtual textures and compress to BC format textures

Memory PageID Buffer Indirection Texture Physical Texture Total Memory 0.4 MB 16 MB 202 MB 220 MB

Procedural virtual texture is a good fit for terrain rendering Using AVT we can increase the resolution of the results Great when drawing a massive number of decals on Far Cry 4

Far Cry 4 rendering and arts team GDC reviewer : Mark Cerny

1. Software Virtual Textures (J.M.P. van Waveren 2013) o http://mrelusive.com/publications/papers/software-virtual-textures.pdf 2. Advanced Virtual Texture Topics (Martin Mittring) o http://developer.amd.com/wordpress/media/2012/10/s2008_mittring_advvirtu altextopics.pdf 3. Terrain in Battlefield 3 (Mattias Widmark 2012) o http://dice.se/wp-content/uploads/gdc12_terrain_in_battlefield3.pdf 4. Virtual Texturing in Software and Hardware o http://mrelusive.com/publications/presentations/2012_siggraph/virtual_texturi ng_in_software_and_hardware_final.pdf 5. Virtual Texturing o http://aaronm.nuclearglory.com/vt/virtualtexturing-ac07808876.pdf

1. Software Virtual Textures (J.M.P. van Waveren 2013) Thanks! o http://mrelusive.com/publications/papers/software-virtual- Textures.pdf 2. Advanced Virtual Texture Topics (Martin Mittring) o http://developer.amd.com/wordpress/media/2012/10/s2008_ Mittring_AdvVirtualTexTopics.pdf 3. Terrain in Battlefield 3 (Mattias Widmark 2012) o 4. Virtual Texturing in Software and Hardware o http://mrelusive.com/publications/presentations/2012_siggrap h/virtual_texturing_in_software_and_hardware_final.pdf 5. Virtual Texturing o http://dice.se/wpcontent/uploads/gdc12_terrain_in_battlefield3.pdf http://aaronm.nuclearglory.com/vt/virtualtexturing- AC07808876.pdf