Dynamic Geometry Displacement Jens Krüger Technische Universität München.

Slides:



Advertisements
Similar presentations
Computer graphics & visualization GP-GPU. computer graphics & visualization Image Synthesis – WS 07/08 Dr. Jens Krüger – Computer Graphics and Visualization.
Advertisements

Scientific Computing on Graphics Hardware GPGPU Applications Examples Showcase.
Vertex Buffer Objects, Vertex Array Objects, Pixel Buffer Objects.
The Art and Technology Behind Bioshock’s Special Effects
 The success of GL lead to OpenGL (1992), a platform-independent API that was  Easy to use  Close enough to the hardware to get excellent performance.
Control Flow Virtualization for General-Purpose Computation on Graphics Hardware Ghulam Lashari Ondrej Lhotak University of Waterloo.
1 Shader Performance Analysis on a Modern GPU Architecture Victor Moya, Carlos González, Jordi Roca, Agustín Fernández Jordi Roca, Agustín Fernández Department.
Sparse Matrix Solvers on the GPU: Conjugate Gradients and Multigrid Jeffrey Bolz, Ian Farmer, Eitan Grinspun, Peter Schröder Caltech ASCI Center.
Aaron Lefohn University of California, Davis With updates from slides by Suresh Venkatasubramanian, University of Pennsylvania Updates performed by Joseph.
Aaron Lefohn University of California, Davis With updates from slides by Suresh Venkatasubramanian, University of Pennsylvania Updates performed by Gary.
Hardware-Based Nonlinear Filtering and Segmentation using High-Level Shading Languages I. Viola, A. Kanitsar, M. E. Gröller Institute of Computer Graphics.
ATI GPUs and Graphics APIs Mark Segal. ATI Hardware X1K series 8 SIMD vertex engines, 16 SIMD fragment (pixel) engines 3-component vector + scalar ALUs.
The programmable pipeline Lecture 10 Slide Courtesy to Dr. Suresh Venkatasubramanian.
Geometry Image-based Shadow Volume Algorithm for Subdivision Surfaces Min Tang, Jin-Xiang Dong College of Computer Science, Zhejiang University {tang_m,
Mapping Computational Concepts to GPU’s Jesper Mosegaard Based primarily on SIGGRAPH 2004 GPGPU COURSE and Visualization 2004 Course.
The UNIVERSITY of NORTH CAROLINA at CHAPEL HILL Introduction to Modeling Fluid Dynamics 1.
GPU Tutorial 이윤진 Computer Game 2007 가을 2007 년 11 월 다섯째 주, 12 월 첫째 주.
GPU Graphics Processing Unit. Graphics Pipeline Scene Transformations Lighting & Shading ViewingTransformations Rasterization GPUs evolved as hardware.
Computer graphics & visualization Point-Based Computer Graphics.
Interactive Visualization of Volumetric Data on Consumer PC Hardware: Introduction Daniel Weiskopf Graphics Hardware Trends Faster development than Moore’s.
Cornell CS465 Fall 2004 Lecture 1© 2004 Steve Marschner 1 CS465: Computer Graphics I Professor: Steve Marschner.
Ray Tracing and Photon Mapping on GPUs Tim PurcellStanford / NVIDIA.
A Multigrid Solver for Boundary Value Problems Using Programmable Graphics Hardware Nolan Goodnight Cliff Woolley Gregory Lewin David Luebke Greg Humphreys.
A Multigrid Solver for Boundary Value Problems Using Programmable Graphics Hardware Nolan Goodnight Cliff Woolley Gregory Lewin David Luebke Greg Humphreys.
Aaron Lefohn University of California, Davis GPU Memory Model Overview.
Enhancing GPU for Scientific Computing Some thoughts.
Mapping Computational Concepts to GPUs Mark Harris NVIDIA Developer Technology.
Mapping Computational Concepts to GPUs Mark Harris NVIDIA.
REAL-TIME VOLUME GRAPHICS Markus Hadwiger VRVis Research Center, Vienna Eurographics 2006 Real-Time Volume Graphics [04] GPU-Based Ray-Casting.
GPU Shading and Rendering Shading Technology 8:30 Introduction (:30–Olano) 9:00 Direct3D 10 (:45–Blythe) Languages, Systems and Demos 10:30 RapidMind.
A Fast Simulation Method Using Overlapping Grids for Interactions between Smoke and Rigid Objects Yoshinori Dobashi (Hokkaido University) Tsuyoshi Yamamoto.
Introduction to CUDA (1 of 2) Patrick Cozzi University of Pennsylvania CIS Spring 2012.
Interactive Time-Dependent Tone Mapping Using Programmable Graphics Hardware Nolan GoodnightGreg HumphreysCliff WoolleyRui Wang University of Virginia.
A Crash Course in HLSL Matt Christian.
Cg Programming Mapping Computational Concepts to GPUs.
General-Purpose Computation on Graphics Hardware.
The programmable pipeline Lecture 3.
CSE 690: GPGPU Lecture 7: Matrix Multiplications Klaus Mueller Computer Science, Stony Brook University.
Shadow Mapping Chun-Fa Chang National Taiwan Normal University.
Tone Mapping on GPUs Cliff Woolley University of Virginia Slides courtesy Nolan Goodnight.
1 3D API OPENGL ES v1.0 Owned by Silicon Graphics (SGL) Control was then transferred to Khronos Group Introduction.
Hardware-accelerated Point-based Rendering of Surfaces and Volumes Eduardo Tejada, Tobias Schafhitzel, Thomas Ertl Universität Stuttgart, Germany.
GPU Data Formatting and Addressing
By Dirk Hekhuis Advisors Dr. Greg Wolffe Dr. Christian Trefftz.
Real-time Simulation and Visualization using Pre-calculated Fluid Simulator States Marek Gayer, Pavel Slavík and František Hrdlička Computer Graphics Group.
Per-Pixel Evaluation of Parametric Surfaces on GPU ACM Workshop on General Purpose Computing on Graphics Processors Los Angeles, USA, 7-8 August, 2004.
Havok FX Physics on NVIDIA GPUs. Copyright © NVIDIA Corporation 2004 What is Effects Physics? Physics-based effects on a massive scale 10,000s of objects.
Computer Graphics 3 Lecture 6: Other Hardware-Based Extensions Benjamin Mora 1 University of Wales Swansea Dr. Benjamin Mora.
MSIM 842 VISUALIZATION II INSTRUCTOR: JESSICA R. CROUCH 1 A Particle System for Interactive Visualization of 3D Flows Jens Krüger Peter Kipfer.
CSE 690: GPGPU Lecture 8: Image Processing PDE Solvers Klaus Mueller Computer Science, Stony Brook University.
David Angulo Rubio FAMU CIS GradStudent. Introduction  GPU(Graphics Processing Unit) on video cards has evolved during the last years. They have become.
Linear Algebra Operators for GPU Implementation of Numerical Algorithms J. Krüger R. Westermann computer graphics & visualization Technical University.
Geometry processing on GPUs Jens Krüger Technische Universität München.
From Turing Machine to Global Illumination Chun-Fa Chang National Taiwan Normal University.
Ray Tracing using Programmable Graphics Hardware
Mapping Computational Concepts to GPUs Mark Harris NVIDIA.
Efficient Partitioning of Fragment Shaders for Multiple-Output Hardware Tim Foley Mike Houston Pat Hanrahan Computer Graphics Lab Stanford University.
[CSCI-4800/5800] - Shaders and GPU Programming Professor Min-Hyung Choi January 20, 2016.
Ray Tracing by GPU Ming Ouhyoung. Outline Introduction Graphics Hardware Streaming Ray Tracing Discussion.
GLSL I.  Fixed vs. Programmable  HW fixed function pipeline ▪ Faster ▪ Limited  New programmable hardware ▪ Many effects become possible. ▪ Global.
An Introduction to the Cg Shading Language Marco Leon Brandeis University Computer Science Department.
Martin Kruliš by Martin Kruliš (v1.0)1.
Jens Krüger Technische Universität München
Graphics Processing Unit
Chapter 6 GPU, Shaders, and Shading Languages
Jens Krüger Technische Universität München
Graphics Processing Unit
University of Virginia
Physically Based Modeling -Overview-
Presentation transcript:

Dynamic Geometry Displacement Jens Krüger Technische Universität München

so far: GPGPU limited to texture output new APIs allow geometry generation on GPU Geometry processing on GPUs

API Bubbles Shader Model 3.0 with Vertex–Texture–Fetch (VTF) Pixel-Buffer-Objects (PBO) to Vertex-Buffer-Objects (VBO) copy Frame-Buffer-Object (FBO) with Cast/Render-To-Vertex-Array (RTVA) extension VBOs PBOs SM3 FBOs VTF RTVA

PBO, VBO Copy You need: floating point pbuffers a VBO ( glGenBuffersARB) Application Loop: Write geometry data into a pbuffer Copy data from pbuffer to VBO (glReadPixels) Set vertex array pointers to the VBO (glBindBufferARB, glVertexAttribPointerARB) and Render geometry as usual (glDrawArrays, glDrawElements)

FBO cast to Vertex-Array You need: floating point FBOs that support RTVA Application Loop: Write geometry data into the FBO Bind FBO as Vertex-Array Render geometry as usual (glDrawArrays, glDrawElements)

SM3 with VTF You need: render targets (pbuffer, FBO, DX render target) a static Vertex-Buffer/ Vertex-Array Application Loop: Write geometry data into the render target Render the static Vertex-Buffer enable a vertex shader that fetches from the render target Vertex Shader 1/10/11/00/0

PBO, VBO Copy –availability –requires memcopy, OpenGL only FBO cast to Vertex-Array –no memcopy –availability, OpenGL only SM3 with VTF –multi vendor, OpenGL/DirectX, flexible –more code, requires latest GPU Comparison Vertex Shader 1/10/11/00/0

… it’s all the same somehow … Displacer TextureVertices Vertex Shader 1/10/11/00/0 In principle, all 3 methods take one or more textures as input and displace a vertex stream accordingly, this makes them interchangeable.

Examples Fluid Simulation3D Smoke & Fire Particles Grid displacement Water Simulation3D Water Surfaces

Examples Particles Grid displacement Point Decompression Fluid Simulation3D Smoke & Fire Water Simulation 3D Water Surfaces Point Compression Point Rendering

Observed Speedups for 3D Vector fields Interpolation(x100) SIMD Integration(x20) SM 3.0 Particle Rendering(x20) ATI X800 XT vs. Pentium 4 3Ghz Example 1, Particle Tracing Displacer Rendering RenderToTexture Vertex Shader Static Quad Pass through m n Fragments Interpolation/Integration Last Position Texture Next PositionTexture Fragment Shader Vectorfield Texture PingPong Switch

Step 1: do a couple of independent 2D fluid simulations run at a few hundred FPS on current GPUs 100+ fps Smoke with GPU Particles I

Step 2: Bind the output of the simulation as vector field textures for the particle advection 100+ fps Smoke with GPU Particles II RenderToTexture Vertex Shader Static Quad m n Texture Fragment Shader Pass through Fragments Interpolation/Integration

Step 3: Let the interpolator compute the revolution 100+ fps Smoke with GPU Particles III float3 sample2DNSExtr(float3 position) { float4 translPosition; translPosition.xy = position.xz*2-1; translPosition.zw = float2(-translPosition.y,translPosition.x); float l = length(translPosition.xy); float4 f4TexCoords = float4( (sign(translPosition.x)*l+1.0f)/2.0f, position.y, (sign(translPosition.z)*l+1.0f)/2.0f, position.y); float2 f2SimulationA = tex2D(sVFieldA,f4TexCoords.xy).xy; float2 f2SimulationB = tex2D(sVFieldB,f4TexCoords.zw).xy; translPosition /= l; float3 f3SimulationA, f3SimulationB; f3SimulationA.y = f2SimulationA.y; f3SimulationA.xz = translPosition.xy*f2SimulationA.x*sign(translPosition.x); f3SimulationB.y = f2SimulationB.y; f3SimulationB.zx = translPosition.zw*f2SimulationB.x*sign(translPosition.z); f3SimulationB.z = -f3SimulationB.z; float3 f3Simulation = lerp(f3SimulationA,f3SimulationB,asin(abs(translPosition.z))/1.57f); return f3Simulation; }

Example 2, Water Surface DisplacerRendering static grid Simulation generates height field texture water surface

Example 3, Point Compression DisplacerLighting Points and Normals compressed point representation decode a few points

Example 3, Point Compression (cont.)

n m Start Position/Normal n m Position Normal Example 3, Point Compression (cont.) Render as Points Pixelshader

n m Start Position/Normal n m Position Normal Delta Position/Normal 1 n m n m Position Normal Pixelshader Render as Points Example 3, Point Compression (cont.)

Selected References Lutz Latta et al., Building a Million Particle System, Game Developers Conference 2004 & Graphics Hardware 2004, P. Kipfer, R. Westermann, UberFlow: A GPU-Based Particle Engine, Graphics Hardware 2004, J. Krüger, R. Westermann, GPU Simulation and Rendering of Volumetric Effects for Computer Games and Virtual Environments, Eurographics 2005, J. Krüger, P. Kipfer, P. Kondratieva, R. Westermann, A Particle System for Interactive Visualization of 3D Flows, IEEE Transactions on Visualization and Computer Graphics, NVIDIA, Cloth Simulation, I3D 2005 Presentation, Krüger, J. Westermann, R. Linear algebra operators for GPU implementation of numerical algorithms, In Proceedings of SIGGRAPH 2003, ACM Press / ACM SIGGRAPH, Bolz, J., Farmer, I., Grinspun, E., Schröder, P. Sparse Matrix Solvers on the GPU: Conjugate Gradients and Multigrid, In Proceedings of SIGGRAPH 2003, ACM Press / ACM SIGGRAPH, Hillesland, K. E. Nonlinear Optimization Framework for Image-Based Modeling on Programmable Graphics Hardware, In Proceedings of SIGGRAPH 2003, ACM Press / ACM SIGGRAPH, Fedkiw, R., Stam, J. and Jensen, H.W. Visual Simulation of Smoke. In Proceedings of SIGGRAPH 2001, ACM Press / ACM SIGGRAPH. 2001, Stam, J. Stable Fluids. In Proceedings of SIGGRAPH 1999, ACM Press / ACM SIGGRAPH, , Harris, M., Coombe, G., Scheuermann, T., and Lastra, A. Physically-Based Visual Simulation on Graphics Hardware.. Proc SIGGRAPH / Eurographics Workshop on Graphics Hardware 2002,

The End Websites: