CLOUD GAMING WITH NVIDIA GRID TECHNOLOGIES

Transcription

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

Introduction

Cloud’ification 2013Music, Movies, Books2014 Games

GPUs vs. Consoles10,000GeForce TitanPC GPUConsole3xPS4Xbox 7201,000GeForce 8800GPU FlopsXbox 360GeForce7800100PS38 years10Xbox5 years2x1GeForce 0132014Jon Peddie Research

Cloud Gaming AdvantagesFor PublishersFor GamersNo PiracyMobilityPrecise AccountingUbiquityGame UpdatesInstant Play

orkNICCPUEncodeCaptureGRID ClientNetworkGRID 16ms30 ms2 Frames30 msRender

NativeWindows DirectX / OpenGLLinux OpenGLCloud GamingContent SourcesPlayersAndroid GamesGeniMotion: 3D OGLVirtualBox Android x86BlueStacksFlash playerNew EnginesShiva 3D

GRID SDK ComponentsServer Side on GRID HWNvFBCLow LatencyDesktopCaptureNvIFRLow LatencyRender TargetCaptureNvENCLow latencyHardware EncoderClient Side on NVLow Latency Decodeon GeForce & TegraSample Code (NvIFR & NvFBC)GRID Programming GuideGRID Server Setup GuideAmazon G2 Getting Started Guide

GRID SDK

Full VM EnvironmentWindowsWindowsNVEnc3D DXCSCShader3DWindowsDXGPUGPUVMVMXENOne stream per VM, one VM per GPUSingle ExclusiveGame ProcessNvFBCStreamer

Increasing CCU withlight Sandboxing and Shimming1 Single instance of WindowsGPUGPUWith m n

NVIDIA ClientDecode API is designed for Low latency (1 frame)Power efficient using the H.264 hardware decoderGRID SDK Examples:Client SideWindows PCBased on DX9CUDAGPUDecodeNVIDIA Shield (Android)Based on TegraH264HWDecodeDecoder Client Binary availableHandles Audio, Video , and InputFor development and testingLow LatencyDecode & Displayon GeForce &Tegra

GRID Gaming ProductsProduct NameGRID K340GRID K5204 x GK1072 x GK104816Core Clocks900 MHz800 MHzMemory Size4GB8GB720p30 Encodes 40 201080p30 Encodes 16 8GeForce Drivers andGame ProfilesGeForce Drivers andGame ProfilesHigh DensityGamingHigh PerformanceGamingGPUsTotal shader (SMs)Driver SupportTarget AppsNext gen GRID will enable2x encoding and 2x3D performance1 Number of users depends on application and screen resolution

Where does it run?Dedicated capacityIn telco data centersFlood the map, cutting down latencyRunning on top of Amazon Web ServicesFlexibleLess initial investment – rent what you needBig BW from servers to Internet backbone

Building GRID ServersDual Xeon E52x10 core 2.5 GHz CPUsSuperMicro, ASUSUp to 5 boards 20 GPUsXeon E3 systems4x 4-core 3.5 GHz CPUs2 boards 8 GPUsCirrascale, CARRI/GIGABYTE

started.htmlGRID-devtech-support@nvidia.comThanks

NVIDIA GRID ServerAmazon Instance NMOS – A VM with aGPU connected through a hypervisor.A background process NvFBC, capturesscreen contents and encodes to H.264.GRID SDK Sample: NvFBCH264 capturesfull-screen graphics and encodes toH.264.Full Streaming Server binary availableCapture, Encode, and Stream Audio andVideoReceives game input with a networkconnected clientGames requires minimal changes.

GAME STREAMING ON AMAZON G2 AND GRIDEric Young

OverviewGame StreamingAmazon G2 and GRIDOnboarding Games for GRID

Streaming Games from the CloudClientInternetServerClient Input ControlsUser ClientVideo Audio StreamApplication orGame

OverviewGame StreamingAmazon G2 and GRIDOnboarding Games for GRID

Stream on Amazon G2What is required?Middleware based on GRID SDK.Server captures frames, encodes toH.264, and streams.Rent Amazon G2 instances for 0.78 0.82 per hour. Spin up/down instancesbased on traffic demand.http://aws.amazon.com/ec2/Amazon G2 instance: g2.2xlarge1 NVIDIA GRID GK104 (GeForce GTX 670)Quad-Core CPUs15GB Memory60GB StoragePartner MiddlewareSolution

GRID Streaming Rapid PrototypingChallengesGame developer want an easy way to prototype a streaming solutionwithout developing a full solutionSoftware to handle Gamepad Input, Audio and Video streamingUse Amazon G2 rent a GRID hardware/hour and not requirepurchasing hardware.NVIDIA Streaming ToolsStreaming Tool not part of the GRID SDK.Useful for rapid prototyping to help onboard games running in cloudTesting the game streaming experience running over the cloud

Onboarding Games for GRIDHow do I get started?Use Private Amazon AMI images with GRID Streaming components.Contact NVIDIA (GRID-devtech-support@nvidia.com) for the softwarecomponents.GRID Streaming Prototype is a tool to help Game Developer onboardyour games.

GRID Streaming PrototypeGRID Streaming ServerNvFBCVideo CaptureAudio CaptureNvENC H.264Hardware EncoderStreaming ClientDecode Audio and Videoon GeForce & TegraKeyboard, Mouse,Gamepad Input

Game Streaming Prototype on Amazon G2ClientGame ClientGRID SDKDecodeInternetClient Input ControlsVideo Audio StreamG2 GRID ServerGame ProgramGRID SDKCaptureEncodeGRID Driver

OverviewGame StreamingAmazon G2 and GRIDOnboarding Games for GRID

Step 1 – Setup AWS AccountRegister for AWS Amazon Account (http://aws.amazon.com)

Step 2 – Create and Launch an InstanceChoose GPU Instance (g2.2xlarge) from EC2 Management ConsoleConfigure and Launch the Instance

Step 3 – Install the Game on the InstanceRemotely connect to your Instance using VNCCopy and install the game to the InstanceStart up the Streaming Server (waiting for client)

Step 4 – Connect Client for Game StreamingLaunch the NVIDIA Streaming Client from Local Systemwith Server IP Address to connectLaunch Game from your ClientStart Playing!

Onboarding GoalsTest the Gameplay experienceValidate Visual Quality for the end userTest end to end playabilityAdditional Guidelines for Game DevelopersContact (GRID-devtech-support@nvidia.com) if you are interestedhaving your game in the GRID Beta

OPTIMIZING GAMES FOR CLOUD GAMINGSamuel Gateau

Samuel Gateau – Devtech EnginerChecklist for boarding(your game in the cloud)Render, Capture & EncodeCloud Game EnginePerspectives

Onboard your game in the cloudHelp us run your game on cloud gaming servicesGRID (beta) for SHIELDCloud Gaming Partners

Configure game settingsSupport config files to assign game settingsNeed to assign the optimal video settingsFind the proper balance of CPU / GPU usage for the best qualityIdeally just rely on the GeForce Experience interoperability APIYour game can be configured ings-apiAnd you benefit the integration with the GeForce Experience program !

Support the GAMEPADFully support GAMEPAD controllers through XINPUTThe only universal controller solutionEasily emulated on mobile or desktopMake sure ALL the menus & dialogs arenavigable with the gamepadTake a look at NvGamepad libraryA crossplatform gamepad abstraction layerfor Windows and gamepad-api

Annihilate text editEntering credential information is painfullJust like for settings, the game should provide a way to get the logginginformation from command line or a fileCloud service can automatically fill the credential for the user making itseamlessWe will propose an API to delegate any form filling or dialog box tothe client sideBetter integration with the client’s device using the local interface kitJust make it actually usable with any client’s platformCall for volunteers

Improve the cloudy user experienceSkip all these amazing pre-game screens & videosTime is moneyHide any video/audio/performance settingsTaken care of by the serviceFollow recommendations for Valve’s “Big Picture”Gamepad !!!Screen size goes from 4” to 4 whatever

MySuperGame.exe -cloudingIntroduce a streamming mode to the gamethat facilitate the onboarding & support thecloud constraintsImprove the user experienceImprove the performance profile of thegame by capping the rendering framerate towhat is neededThe game logic and simulation can still run at1000HzLess power required40Hz

Checklist for boarding(your game in the cloud)Render, Capture & EncodeCloud Game EnginePerspectives

Rendering Thread? HzRR 1R 2R 3Rendering the video streamFramerate of the game is notvery stableCapturing these frames for videoencoding is not good enoughStreaming needs a fixed rate

Encoding the video stream30 HzE-1Introduce a new thread in charge ofencoding the video stream at thetarget framerateBroadcast to remote clientEE 1Encoding Thread

Rendering Thread? Hz30 HzE-1REncoding Thread

Rendering Thread? Hz30 HzE-1Shared SurfaceRcopy toREncoding Thread

Rendering Thread? Hz30 HzE-1Shared SurfaceRREEncoding Thread

Rendering Thread? Hz30 HzEncoding ThreadE-1RShared SurfaceREcopy fromR

Rendering Thread? Hz30 HzEncoding ThreadE-1RShared SurfaceER 1RR

Rendering Thread? Hz30 HzEncoding ThreadE-1RShared SurfaceER 1copy toR 1R

Rendering Thread? Hz30 HzEncoding ThreadE-1RR 1R 2EShared SurfaceR 1R

Rendering Thread? Hz30 HzEncoding ThreadE-1RER 1Shared SurfaceR 2copy toR 2R

Rendering Thread? Hz30 HzEncoding ThreadE-1RER 1RR 2Shared SurfaceR 2E 1

Rendering Thread? Hz30 HzEncoding ThreadE-1RER 1RR 2Shared SurfaceR 2E 1copy fromR 2

Rendering Thread? Hz30 HzE-1RER 1R 2Shared SurfaceR 3 E 1Encoding Thread

? HzEncoding ThreadHzAsynchronouscapture30 &encodeRendering ThreadE-1RMinimal latency for encodingDoes not block physics engine/inputGame loop is running freeER 1Need 2 extra color surfacesRendering thread could be capped above the targeted framerate toavoid unecessary renderingR 2Shared SurfaceR 3 E 1

Checklist for boarding(your game in the cloud)Render, Capture & EncodeCloud Game EnginePerspectives

GRID server as a platformYour next next genWith Baremetal, a game can take over the full serverRun several game sessions at the same timeGraphics engine use all the GPUs and SHARE common resourcesGame engine use all the CPU coresRender & stream as many game sessions as possible (think 100)Partners working on it alreadySquare Enix Project “Flare”

One Game EngineSame game, many sessions, share all the graphics resourceIf the game is happening live for each sessionPerform all the animations and update onceCompute the ”world” physics simulation onceAll the shadows and lighting can be evaluated and sharedThen render each session’s view and encode

Conceptual EngineGRID Game StateGK107GK107NVENCNVENCGK107GK107NVENCNVENCAI & t VideoClient VideoClient VideoClient VideoClient Video Stream 1-4 Client Video Stream 5-8 Client Video Stream 9-12 Client VideoStream 29-32Stream 13-16Stream 1-4Stream 5-8Stream 9-12

Amortized ComputationMany graphics techniques are tolerant of latency but expensive to calculateNVIDIA Research created a demo where global illumination was calculatedonce for a number of clients using an additional cloud based rendering

Amortized ComputationNot limited to lighting techniquesAny state that is expensive to calculate yet shared between clientsAIPhysicsSimulationAnimation

Thanks !!Questions ?eyoung@nvidia.com fdiard@nvidia.comsgateau@nvidia.com

3D CSC Shader 3D . 1 Single instance of Windows . GRID SDK Examples: Windows PC Based on DX9CUDAGPUDecode NVIDIA Shield (Android) Based on TegraH264HWDecode Decoder Client Binary available Handles Audio, Video , and Input For development and testing Client Side Low Latency Decode & Display on