WILLIAM MOSS ADVANCED RENDERING COURSE PROJECT DECEMBER 4 TH, 2008 Real-time rendering of water and bubbles.

Slides:



Advertisements
Similar presentations
Waves – Topic 4 Chapters 26 Reflection & Refraction Reflection & Refraction Reflection & Refraction.
Advertisements

Ray tracing. New Concepts The recursive ray tracing algorithm Generating eye rays Non Real-time rendering.
Shaders Information on Light, Shadows & Roughness.
1 Graphics CSCI 343, Fall 2013 Lecture 18 Lighting and Shading.
Advanced Computer Graphics (Spring 2013) CS 283, Lecture 8: Illumination and Reflection Many slides courtesy.
Flat Mirrors Chapter 14 Section 2. Light and How It Travels  Light traveling through a uniform substance travels in a straight line. Air Water Vacuum.
Reflections from Bumpy Surfaces GPU Graphics. What are we trying to achieve?  Most surfaces are not flat like glass  Some of these surfaces still give.
Based on slides created by Edward Angel
1 Angel: Interactive Computer Graphics 5E © Addison-Wesley 2009 Shading I.
Waves on a spherical refracting surface. Suppose that light is incident parallel to the optic axis.
RAY TRACING.
(conventional Cartesian reference system)
1 CSCE 641: Computer Graphics Lighting Jinxiang Chai.
Reflection & Refraction of Light Reflection: specular (mirror) vs diffuse angle of incidence = angle of reflection Refraction: Snell’s Law n 1 sin 
Global Illumination May 7, Global Effects translucent surface shadow multiple reflection.
7M836 Animation & Rendering
Parallel Rays  Two rays of light from the same object hit your right and left eyes. If these rays are almost parallel to each other, then the object must.
Reflection vs. Refraction When light strikes a mirror, it is reflected. The law of reflection tells us that the reflected angle is equal to the incident.
1 Angel: Interactive Computer Graphics 4E © Addison-Wesley 2005 Shading I Ed Angel Professor of Computer Science, Electrical and Computer Engineering,
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
Reflection: What is it? Reflection occurs when light bounces off an object. Reflection allow our eyes to see the world around us!
CS 480/680 Computer Graphics Shading I Dr. Frederick C Harris, Jr.
CSC418 Computer Graphics n Raytracing n Shadows n Global Illumination.
Reflection and Refraction Chapter 29. Reflection When a wave reaches a boundary between two media, some or all of the wave bounces back into the first.
Maths and Technologies for Games Water Rendering CO3303 Week 22.
1 Introduction to Computer Graphics with WebGL Ed Angel Professor Emeritus of Computer Science Founding Director, Arts, Research, Technology and Science.
Formation of Images by Spherical Mirrors. For an object infinitely far away (the sun or starts), the rays would be precisely parallel.
Lenses and Mirrors. How does light interact with pinholes? How does light interact with lenses? –___________ How does light interact with mirrors? –___________.
Reflections Specular reflection is the perfect reflection of light from a surface. The law a reflection states that the direction of the incoming ray and.
Shading. What is Shading? Assigning of a color to a pixel in the final image. So, everything in shading is about how to select and combine colors to get.
-Global Illumination Techniques
CSC418 Computer Graphics n Illumination n Lights n Lightinging models.
Texture Mapping Applications 2. Parallax Mapping with Slope  parallax mapping assumes that the surface is a single plane  a better approximation  surface.
1. Two long straight wires carry identical currents in opposite directions, as shown. At the point labeled A, is the direction of the magnetic field left,
The Ray Box: Part One. Law of Reflection The law of reflection for light states that when light is incident on a specular reflecting surface the angle.
Basic Ray Tracing CMSC 435/634. Visibility Problem Rendering: converting a model to an image Visibility: deciding which objects (or parts) will appear.
Week 10 - Wednesday.  What did we talk about last time?  Shadow volumes and shadow mapping  Ambient occlusion.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Basic Rendering Pipeline and Shading Spring 2012.
Line Ray Beam the paths along which light energy travels a bundle of light rays.
Unit 11 : Part 1 Reflection and Refraction of Light.
CSE 381 – Advanced Game Programming GLSL Lighting.
Advanced Illumination Models Chapter 7 of “Real-Time Rendering, 3 rd Edition”
Reflection and Light Flat Mirrors.
Chapter 13-2 Flat Mirrors. Conceptual_Physics/3 1_Reflection/01/sp.ht mlhttp://localhost:26300/ Conceptual_Physics/3 1_Reflection/01/sp.ht.
Photo-realistic Rendering and Global Illumination in Computer Graphics Spring 2012 Material Representation K. H. Ko School of Mechatronics Gwangju Institute.
Graphics Graphics Korea University cgvr.korea.ac.kr 1 Surface Rendering Methods 고려대학교 컴퓨터 그래픽스 연구실.
Flat Mirrors And the Law of Reflection. Types of Reflection There are two main ways in which light reflects. Diffuse Reflection is caused by light hitting.
Reflection & Mirrors. Reflection The turning back of an electromagnetic wave (light ray) at the surface of a substance. The turning back of an electromagnetic.
CSCE 441: Computer Graphics Ray Tracing
Physics.
Laws of Reflection and Plane Mirror Images
Light: Geometric Optics. The Ray Model of Light The ray model of light assumes that light travels in straight-line path called rays.
Copyright © 2010 McGraw-Hill Ryerson Ltd. What is refraction and how can it be used? Topic4.5 (Pages ) Today we will be... Having a short quiz on.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
An Introduction to Reflection SNC2D. We Reflect Light None of us generates light in the visible region of the electromagnetic spectrum. We are not sources.
Consider a light ray incident upon a flat glass/air interface. Under what conditions will some of the light be reflected? a) Some of the light will be.
Reflection and Refraction. Reflection Reflection – some or all of a wave bounces back into the first medium when hitting a boundary of a second medium.
12.1 What is Refraction?.  The bending or change in direction of light when it travels from one medium to another.
CSE 681 Introduction to Ray Tracing. CSE 681 Ray Tracing Shoot a ray through each pixel; Find first object intersected by ray. Image plane Eye Compute.
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
Illumination Models. Introduction 1 Illumination model: Given a point on a surface, what is the perceived color and intensity? Known as Lighting Model,
1 CSCE 441: Computer Graphics Lighting Jinxiang Chai.
- Review the following scene: REFLECTION  is the change in direction of a light ray when it bounces off a surface For an observer standing beside the.
Light. Intensity calculation = wavelength I( ) = wavelength intensity of light reaching eye I( ) = I diff ( ) + I spec ( ) + I refl ( ) + I trans ( )
CS552: Computer Graphics Lecture 36: Ray Tracing.
Reflection & Refraction Learning Targets: L3: Reflection L4: Refraction – Definition and Ray Dig L5: Critical Angle & Total Internal Reflection L6: Snell’s.
As regards the formation of an image by an optical system such as a plane mirror, what will serve as an object? a) An emitter of light, such as, a candle.
Computer Graphics: Illumination
Reflections from Bumpy Surfaces
Reflection and Light Flat Mirrors.
Presentation transcript:

WILLIAM MOSS ADVANCED RENDERING COURSE PROJECT DECEMBER 4 TH, 2008 Real-time rendering of water and bubbles

Desired Effects Water  Local reflections  Refraction  External Lighting  Fresnel Effect Bubbles  Refraction  External Lighting (specular highlight)

Water Effects

Local Reflection Model water surface as a mirror  Reflect the scene over the rest water height  Clip  Render to a texture

Refraction Model water surface as a plane  Clip everything below water surface  Scale along vertical direction by 1 / 1.33  Render to a texture

Texture to Surface Find screen position of undisplaced water surface position  Offset by the normal scaled by surface displacement  Lookup in the texture  tex2D(textureMap, screenPos.xy – displacement * normal.xz);

External Lighting Simple Phong model for specular highlights  Assume light is coming from infinitely far away (as in the sun)

Fresnel Effect Probability a photon is reflected or transmitted  Dependent on the incident angle  Formula is expensive, implemented as a 1D texture lookup

Bubble Effects

Refraction Model bubble as one sided hemisphere  Refract the ray from the eye  Calculate the intersection with the ground plane  Lookup in a texture

External Lighting Simple Phong model for specular highlights  Assume light is coming from infinitely far away (as in the sun)

Results Runs at ~30-40fps on my laptop Shaders written in NVidia Cg