(P3D) The Goal! This course introduces the concepts and theory - - PowerPoint PPT Presentation
(P3D) The Goal! This course introduces the concepts and theory - - PowerPoint PPT Presentation
Three-Dimensional Programming (P3D) The Goal! This course introduces the concepts and theory of a modern photorealistic rendering. Through the ideas and software in this course (Physics laws-based light transport model versus empiric
The Goal!
This course introduces the concepts and theory
- f
a modern photorealistic rendering. Through the ideas and software in this course (Physics laws-based light transport model versus empiric light model) the students will learn to design and develop a rendering system for creating stunning imagery.
What You’ll Learn!
- You’ve learned how to develop interactive applications by using
OpenGL API
- Local (or direct) illumination: only source lights contribution
- Global (or indirect) illumination: constant ambient and different “tricks” to simulate
photorealistic effects like shadows, reflections or environmental mapping (AVT: done in GPU by using GLSL programming)
- Now we are interested in true Global Illumination:
- Enhanced Ray Tracer algorithm with Spatial partition, Soft Shadows
and Monte Carlo techniques (anti-aliasing and depth-of-field)
- UNITY 3D-based application development by using its Assets library
and the built-in shaders for photorealistic appearance
- Or, in alternative,
- Develop a Monte Carlo-based integrator for the rendering equation,
like Path-Tracing
- Use another Physically-based renderer
You’ll be able to do THIS!
Teachers!
- Prof. João Madeiras Pereira (INESC-ID)
jap@inesc-id.pt
Prerequisites
Previous experience on Computer Graphics Good knowledge of
C/C++ programming Data structures (lists, arrays, trees…) Geometry Linear Algebra
Object programming skills
Warning
P3D Course is programming intensive
Best way to learn applied topics such this is done by coding If you feel uncomfortable with coding, be aware Consider yourselves warned No excuses accepted afterwards
Bibliography
Kevin Suffern, “Ray Tracing from the Ground Up”, AK. Peters, 2007; http://www.raytracegroundup.com
Bibliography
Matt Pharr, Wenzel Jakob, Greg Humphreys, “Physically Based Rendering : From Theory to Implementation”, Third Edition, Morgan Kaufmann, 2017
http://www.pbrt.org
Bibliography
Tomas Möller, Eric Haines, “Real- Time Rendering”, Fourth Edition, AK. Peters, 2018 www.realtimerendering.com/
Tentative Schedule
1 18-Fev Presentation 3D Rendering: Visibility and Visual Apperance Rasterization and Ray-Tracing Enrollment 2 25-Fev Férias Carnaval Férias Carnaval Férias Carnaval 3 3-Mar Overview de Ray Tracing ; Whitted ray-tracer introduction RT 1 – Diffuse and Shadows Exercise 1 4 10-Mar Whitted Ray-Tracer Implementation Geometric Intersections: plane and sphere RT 1 – Diffuse and Shadows (cont.) Exercise 1 (cont.) 5 17-Mar Geometric Intersections RT 2 – Reflections and Refractions
Checkpoint 1
6 24-Mar Distribution Ray-Tracing: Sampling Techniques Anti-aliasing, Soft Shadows RT 3 Exercise 2 7 31-Mar Distribution Ray-Tracing (cont.) : Depth of Field, Motion Blur; Introduction to Grid Acceleration RT 4 Exercise 3 8 7-Abr Férias Pascoa Férias Pascoa Férias Pascoa 9 14-Abr
Mini-teste 1
Grid Acceleration RT 5 - Soft Shadow e Anti-aliasing, DOF Exercise 3 (cont.) 10 21-Abr Other Acceleration Data structures RT 6 - Grid Acceleration
Checkpoint 2
11 28-Abr Global Illumination: Theoretical Foundations Rendering Equation UNITY 3D/ Other Exercise 4 12 5-Mai
Mini-teste 2
UNITY 3D/ Other Exercise 5 13 12-Mai Método Monte Carlo ; Materials (BSDF) and Lights; Path Tracing UNITY 3D/ Other Exercise 6 14 19-Mai
Mini-Teste Repescagem
UNITY 3D/ Other 15 26-Mai BDPT and Vertex Connection Merging
Checkpoint 3
Grading Policy
Theory (20%) – no minimum grade
2 written mini-tests (10% each):
MT 1: 14th April MT 2: 5th May Repetition: 19th May
Labs (80%) – minimum grade: 9.5
Checkpoint 1 (15%): 17th March; Checkpoint 2 (30%): 21st April; Checkpoint 3 (35%): 26th May
3D Rendering
A beginners level introduction: https://www.scratchapixel.com/lessons/3d- basic-rendering/rendering-3d-scene-
- verview
3D Rendering
Rendering[ren-der-ing]: The process of generating an image from a model, by means of a computer program.
3D Rendering
Rendering[ren-der-ing]: The process of generating an image from a model, by means of a computer program.
3D Rendering
Rendering[ren-der-ing]: The process of generating an image from a model, by means of a computer program. Visibility
3D Rendering
Rendering[ren-der-ing]: The process of generating an image from a model, by means of a computer program.
3D Rendering
Rendering[ren-der-ing]: The process of generating an image from a model, by means of a computer program.
3D Rendering
xw zw Objects
Pixel (RGB)
Light Illumination yw Camera xe ye ze
eye
3D Rendering
Rendering process could be looked at a two steps process:
- Visibility: projecting 3D shapes on the surface
- f a canvas and determining which part of
these surfaces are visible from a given point of view,
- Light Simulation: simulating the way light
propagates through space, which combined with a description of the way light interacts with the materials objects are made of, will give these objects their final appearance (their color, their brightness, their texture, etc.).
Light Simulation
It determines the Visual Appearance
- The appearance of objects, only depends on 1)
how the way light interacts with matter and 2) how it travels trough space.
- All these effects can be broadly divided in two
categories:
- Shading: techniques related to the way an object
interacts with light .
- Light Transport: techniques related to how much
light an object receives.
- Direct illumination
- Indirect (global) illumination
- Shadows
- Reflections (Mirrors)
- Transparency
- Translucency
- Inter-reflections
- Detail (Textures…)
- Realistic Materials
- And many more
Photorealism
Rendering strategies
- Rasterization-based
- Ray Tracing-based
Ray tracing-based rendering
- Uses physics to simulate the interaction
between matter and light (shading) as well as the light transport around the scene.
- When measurable/predictive photorealism is
the primary goal….
Visual Consistency
Physically-based Rendering demo
Physics laws-based light transport model
Real-Time Ray-Tracing (RTRT)
Real-Time Ray-Tracing (RTRT)
RTRT in Games
In summary
Rendering: Create a 2D picture of a 3D world Two-step process: Visibility and Light Simulation Visibility
- To create a photorealistic image, we need to determine
which part of the scene is visible from a given viewpoint.
- Two methods: Rasterization and Ray-Tracing
Light Simulation
- The appearance of objects, only depends on the way light
interacts with matter and travels trough space.
- All these effects can be broadly divided in two categories:
- Some effects relate to the way object appear (Shading) .
- Some effects relate to how much light an object receives
(Light Transport).
Visibility in Rasterization
Conceptual Graphics pipeline with two stages: geometric transformations and rasterization Explicit projection
- peration
(implicit projection lines) : perspective or orthographic matrix transformations
Visibility in Ray-Tracing
- Start from the pixel: convert it into a point on the
image plane (P’) and then trace a ray from the eye towards the scene passing through P’
- Explicit tracing rays from the eye: implicit projection
- peration
P’
Opaque materials
From https://www.scratchapixel.com/lessons/3d-basic-rendering/introduction-to-shading
Mirror objects
- Simulate mirror-like material
- Physics reflection law - the outgoing or reflected direction of
this ray is a reflection of the incoming or incident direction about the normal at the point of incidence
Diifuse color
- Color of the material is defined by the diffuse reflection
- Diffuse materials modeled by the Lambert law
- Incident light is equally spread in every directions above
the point of incidence: the outgoing direction has no correlation whatsoever with the incident direction
Specular color
- Glossy or shiny materials: not
perfectly reflective (like a mirror) nor perfectly diffuse
- Referred as specular reflection
and is related with the roughness of the surface
- Empirical Blinn-Phong
reflection model
Phong Reflection Model
n s luz dif luz amb
k C k C C C v r L n ˆ ˆ ˆ ˆ
n ˆ
L ˆ
r ˆ v ˆ
i
p
Ambient Diffuse Specular
Diffuse vs Specular
Transparent Objects
Transparency
Snell law – direction of refracted ray Fresnel´s equation: how much light is being reflected vs refracted
- Ray tracing combines...
...hidden surface removal ...shading due to direct illumination ...shading due to global (indirect) illumination from the
environment
...shadow computation
Ray-Tracing
- Ray tracing algorithm...
Casts imaginary rays from the viewpoint to the objects in the scene. So:
...for each pixel, a ray is traced from the viewpoint
through the pixel and into the scene
...if this ray intersects an object, then the color of the pixel
is a result of direct illumination on the object
...if this object is reflective and/or transparent, the color of
the point includes reflected and transmitted rays traced back to their origin to determine their effects
Ray-Tracing
- Ray tracing used for...hidden surface
removal...
Finds the closest intersection and sets the pixels' color to that of the object at
the closest point of intersection
Ray-Casting
Ray-Casting
- View
point
- Invisible Rays
cast from the viewpoint Regular grid, corresponding to pixels:
- The rays find
the closest object intersected... rays are stopped at the first intersection...
- A ray is fired
from the viewpoint through each pixel to which the window maps