Presentation is loading. Please wait.

Presentation is loading. Please wait.

From Turing Machine to Global Illumination Chun-Fa Chang National Taiwan Normal University.

Similar presentations


Presentation on theme: "From Turing Machine to Global Illumination Chun-Fa Chang National Taiwan Normal University."— Presentation transcript:

1 From Turing Machine to Global Illumination Chun-Fa Chang National Taiwan Normal University

2 Outline  My first computer (CASIO fx3600)  Turning machine and von Neumann architecture  GPU pipeline  Local and global illumination  Shadow and reflection through texture  Programmable GPUs

3 Calculator vs. Computer  What is the difference between a calculator and a computer?  Doesn ’ t a compute-r just “ compute ” ?  The Casio fx3600p calculated can be programmed (38 steps allowed).

4 Turing Machine  Can be adapted to simulates the logic of any computer that could possibly be constructed.  von Neumann architecture implements a universal Turing machine.  Look them up at Wikipedia!

5 Outline  My first computer (CASIO fx3600)  Turning machine and von Neumann architecture  GPU pipeline  Local and global illumination  Shadow and reflection through texture  Programmable GPUs

6

7

8 Simplified View  The Data Flow: 3D Polygons (+Colors, Lights, Normals, Texture Coordinates … etc.)  2D Polygons  2D Pixels (I.e., Output Images) Transform (& Lighting) Rasterization

9 Outline  My first computer (CASIO fx3600)  Turning machine and von Neumann architecture  GPU pipeline  Local and global illumination  Shadow and reflection through texture  Programmable GPUs

10 Global Effects translucent surface shadow multiple reflection

11 Local vs. Global

12 How Does GPU Draw This?

13 Quiz  Q1: A straightforward GPU pipeline give us local illumination only. Why?  Q2: What typical effects are missing? Hint: How is an object drawn? Do they consider the relationship with other objects? Shadow, reflection, and refraction…

14  Wait but I ’ ve seen shadow and reflection in games before … With ShadowsWithout Shadows

15 Outline  My first computer (CASIO fx3600)  Turning machine and von Neumann architecture  GPU pipeline  Local and global illumination  Shadow and reflection through texture  Programmable GPUs

16 Adding “ Memory ” to the GPU Computation  Modern GPUs allow: The usage of multiple textures. Rendering algorithms that use multiple passes. Transform (& Lighting) Rasterization Textures

17 Faked Global Illumination  Shadow, Reflection, BRDF … etc.  In theory, real global illumination is not possible in current graphics pipeline: Conceptually a loop of individual polygons. No interaction between polygons.  Can this be changed by multi-pass rendering?

18 Case Study: Shadow Map  Using two textures: color and depth  Relatively straightforward design using pixel (fragment) shaders on GPUs.

19 Image Source: Cass Everitt et al., “Hardware Shadow Mapping” NVIDIA SDK White PaperHardware Shadow Mapping Eye’s ViewLight’s ViewDepth/Shadow Map

20 Basic Steps of Shadow Maps  Render the scene from the light’s point of view,  Use the light’s depth buffer as a texture (shadow map),  Projectively texture the shadow map onto the scene,  Use “texture color” (comparison result) in fragment shading.

21 Outline  My first computer (CASIO fx3600)  Turning machine and von Neumann architecture  GPU pipeline  Local and global illumination  Shadow and reflection through texture  Programmable GPUs

22 PC Graphics Architecture  Two buses on PC: System Bus (CPU-Memory) and Peripheral I/O Bus.  Before AGP: narrow path (I/O Bus) between main memory and graphics memory (for frame buffer, Z buffer, texture, vertex data … etc.)  AGP and PCI-e speed up the link between host PC and graphics processor (GPU)

23 Source: http://www.karbosguide.com/hardware/module2d03a.htm

24 New Chips Are Coming  Intel Broadwell CPU and GPU on the same die (silicon chip) Bandwidth no longer limited by chipsets.  Processors for Phones & Tablets: Qualcomm Snapdragon & Adreno Apple A8, A9, and beyond Mediatek, NVIDIA, Intel ATOM…etc.

25 NVIDIA Geforce 6800

26 NVIDIA Geforce 8800

27 NVIDIA Fermi (Geforce 400 and 500 Series) From NVIDIA Fermi Architecture Whitepaper http://www.nvidia.com/content/PDF/fermi_white_papers/NVIDIA_Fermi_Compute_Architecture_Whitepaper.pdf

28 How to Program a GPU?  Writing a 3D graphics application program Typically in DirectX or OpenGL Still CPU programming in C/C++ The APIs and drivers do the dirty work for you.  Writing GPU shaders Typically in GLSL or Cg Still drawing 3D objects Working like plug-in’s to the 3D rendering pipeline

29 GPGPU  General-purpose GPU computing No longer restricted to graphics applications. To utilize the abundant “GFLOPs” in GPU.  Could be implemented in GPU shaders By clever transformation of problem domains. Textures to store the data structures However, shaders could not perform memory writes with calculated addresses (a.k.a. scatter operations)

30 GPU as a Parallel Computing Platform  Treating GPUs as parallel machinery Not quite the same as shared-memory multi- processor. A special kind of memory hierarchy.  NVIDIA CUDA Widely adopted in real-world applications  OpenCL For non-NV GPUs and multi-core CPUs

31 Branch Divergence on GPU Warp ½ performance for each branch! … if x 1 – x 0 > y 1 – y 0 : xMajorIteration() yMajorIteration() else: …

32 Examples

33 GPU Shading Effects  Reflection and refraction  Relief on surface  Ambient occlusion and lighting

34 Real-Time Rendering of Splashing Water  Particle system simulation for real-time interaction with terrains and dynamic objects.  Reconstruction of the splash surface with 2D metaballs

35 Ray Tracing on GPU  Using OpenCL or NVIDIA CUDA  Or use NVIDIA OptiX


Download ppt "From Turing Machine to Global Illumination Chun-Fa Chang National Taiwan Normal University."

Similar presentations


Ads by Google