bringing waveworks online
play

BRINGING WAVEWORKS ONLINE TIM TCHEBLOKOV, SR DEVELOPER TECHNOLOGY - PowerPoint PPT Presentation

WAR THUNDER: BRINGING WAVEWORKS ONLINE TIM TCHEBLOKOV, SR DEVELOPER TECHNOLOGY ENGINEER, NVIDIA WAR THUNDER Ground and Air forces combat simulator Tank mode: Shooter-like level of details Features/detail size of 2-3cm WAR THUNDER


  1. WAR THUNDER: BRINGING WAVEWORKS ONLINE TIM TCHEBLOKOV, SR DEVELOPER TECHNOLOGY ENGINEER, NVIDIA

  2. WAR THUNDER Ground and Air forces combat simulator Tank mode: Shooter-like level of details Features/detail size of 2-3cm

  3. WAR THUNDER Destroyed by tank, revenge with bomber! Air combat simulator level of details Realistic LOS, up to 160 km Features/detail size of several kilometers

  4. WAR THUNDER War Thunder is Free To Play MMO game Unlike premium games, people pay only if they like the game You should be running fast and look great on any PC

  5. WAR THUNDER PS4, DX11, DX9, GL, GLES Windows, Mac, Linux, Mobile, Consoles Toasters to Titans

  6. WAR THUNDER Permanent engine improvements New effects Performance tweaks Water tech lacked progress Need new water tech!

  7. WHAT WAVEWORKS CAN OFFER? Simulation in frequency domain, iFFT to spatial domain iFFT No repeats! 1km 3D displacements & normals Energy based foam 5m Readbacks for physics Textures as results

  8. WHAT WAVEWORKS CAN OFFER? Simulation in frequency domain, iFFT to spatial domain No repeats! 3D displacements & normals Energy based foam 1km x 1km Readbacks for physics Textures as results

  9. WAVEWORKS IN WAR THUNDER Rendering WaveWorks brings new look to the water Able to reuse existing features Reflection One man-week for Refraction basic integration Shadows Atmospherics + Displacements Surface foam Bubbles Scattering

  10. WAVEWORKS IN WAR THUNDER Rendering WaveWorks brings new look to the water Able to reuse existing features Reflection One man-week for Refraction basic integration Shadows Water must Atmospherics 1km x 1km + be interactive Displacements Challenge Surface foam for simulation! Bubbles Scattering

  11. CHALLENGES: SIMULATION As fast as possible, High-End PCs down to toasters WaveWorks: CUDA, DC and CPU simulation Gaijin: added GPU simulation support for some other platforms Same physics for every player Physics vs Graphics Interaction with the world: Displacements for vessels and hydroplanes Raycasts for planes and projectiles Shores, Rivers, Lakes

  12. CHALLENGES: SIMULATION Simulation for physics runs on CPU Ensure same physics for everybody Server + each client Fixed timestep, 48 ticks/second Simulation for graphics runs on CPU or GPU Prefer GPU if possible Client only Variable timestep, each frame

  13. CHALLENGES: SIMULATION 512x512 256x256 128x128 Large sized FFT is expensive for CPU! Physics: 128x128 Graphics: up to 512*512 Close enough! < 5 cm discrepancy @ 3m amplitude

  14. SIMULATION: READBACKS 3D displacements, not heightmap Fast! 900 results in <1msec Ideal for floating objects Reabacks on hulls Inertia and drag Does not work for projectiles!

  15. SIMULATION: RAYCASTS Can’t do triangle/ray tests! Successive approximation using a number of readbacks Up to ~2000 projectiles in flight

  16. CHALLENGES: GPU READBACKS We need readbacks for in-game physics! DirectX11: no stalls OpenGL: PBO is expected to give access to GPU data without stall. Some drivers do introduce stall DirectX9: GPU readbacks always introduce stall Avoid readbacks by performing simulation on CPU!

  17. CHALLENGES: API LIMITATIONS A lot of textures are fetched in both Vertex and Pixel Shaders: Reflection Refraction Shoreline Foam Depth Shadows Atmospherics etc… At least 15 samplers in PS plus 6 in VS

  18. CHALLENGES: API LIMITATIONS OpenGL: many implementations do not follow specification For instance, you can’t use more than 16 samplers per program on many drivers Use Texture Arrays instead Texture Arrays support added to WaveWorks DirectX9: No support for Texture Arrays Degrade quality of displacements on DX9

  19. INTERACTION: SHORES, RIVERS, LAKES Nature: Shore waves appear in shallow areas Mostly parallel to the shore

  20. INTERACTION: SHORES, RIVERS, LAKES Distance Field Distance to shore as phase for waves DF done on GPU Depth on loading the location 4k*4k for 65km*65km world RGBA8 texture: R: Depth Distance G: Distance to shore B,A: DF gradient

  21. INTERACTION: SHORES, RIVERS, LAKES Nature: Rivers and lakes No shore waves No ocean waves Depth Distance

  22. INTERACTION: SHORES, RIVERS, LAKES Nature: Wind Terrain is obstacle for wind & ocean waves Depth Smaller shore waves Smaller ocean waves Distance Downwind area

  23. INTERACTION: SHORES, RIVERS, LAKES How much the terrain is obstacle for waves? Sample range of directions 1 (terrain) / 0 (water) Sum -> [0..1] Large texels -> blurred Wind

  24. INTERACTION: SHORES, RIVERS, LAKES Downwind data A measure of “openness” Smaller ocean/shore waves No ocean/shore waves in rivers and lakes! Rivers and lakes get proper “openness” automatically

  25. SHORE WAVES Gerstner waves Shore waves amplitude depends on ocean waves amplitude Normals calculated analytically Sawtooth for foam

  26. SHORE WAVES Gerstner waves Shore waves amplitude depends on ocean waves amplitude Normals calculated analytically Sawtooth for foam

  27. SHORE WAVES Scale waves according to depth Move wave tops forward Seabed drag

  28. SHORE WAVES Scale waves according to depth Move wave tops forward Seabed drag

  29. SHORE WAVES Break regularity Add noise Apply energy loss

  30. SHORE WAVES Break regularity Add noise Apply energy loss

  31. SHORE WAVES Terrain shading Sand becomes wet and reflective Water and foam roll back

  32. SHORE WAVES Distant view

  33. RENDERING PERFORMANCE Aggressive LODs for everything: Close up Mid range At distance Displacements and normals All cascades Some cascades Largest cascade Water geometry Dense grid Coarse grid Flat quad Refractions Distorted Simple None Reflections Distorted Blurred Blurred Shore interaction Full Full Normals + Foam Wakes & splashes Full Normals only Normals only Light scattering Yes Yes No

  34. SUMMARY Basic WaveWorks integration: extremely easy! War Thunder specific: MMO: physics runs in parallel on CPU Shores, rivers and lakes Texture arrays Raycasts developer.nvidia.com/waveworks

  35. THANK YOU TTCHEBLOKOV@NVIDIA.COM

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend