(P3D) The Goal! This course introduces the concepts and theory - - PowerPoint PPT Presentation

p3d the goal
SMART_READER_LITE
LIVE PREVIEW

(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


slide-1
SLIDE 1

Three-Dimensional Programming (P3D)

slide-2
SLIDE 2

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.

slide-3
SLIDE 3

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
slide-4
SLIDE 4

You’ll be able to do THIS!

slide-5
SLIDE 5

Teachers!

  • Prof. João Madeiras Pereira (INESC-ID)

jap@inesc-id.pt

slide-6
SLIDE 6

Prerequisites

Previous experience on Computer Graphics Good knowledge of

C/C++ programming Data structures (lists, arrays, trees…) Geometry Linear Algebra

Object programming skills

slide-7
SLIDE 7

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

slide-8
SLIDE 8

Bibliography

Kevin Suffern, “Ray Tracing from the Ground Up”, AK. Peters, 2007; http://www.raytracegroundup.com

slide-9
SLIDE 9

Bibliography

Matt Pharr, Wenzel Jakob, Greg Humphreys, “Physically Based Rendering : From Theory to Implementation”, Third Edition, Morgan Kaufmann, 2017

http://www.pbrt.org

slide-10
SLIDE 10

Bibliography

Tomas Möller, Eric Haines, “Real- Time Rendering”, Fourth Edition, AK. Peters, 2018 www.realtimerendering.com/

slide-11
SLIDE 11

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

slide-12
SLIDE 12

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

slide-13
SLIDE 13

3D Rendering

A beginners level introduction: https://www.scratchapixel.com/lessons/3d- basic-rendering/rendering-3d-scene-

  • verview
slide-14
SLIDE 14

3D Rendering

Rendering[ren-der-ing]: The process of generating an image from a model, by means of a computer program.

slide-15
SLIDE 15

3D Rendering

Rendering[ren-der-ing]: The process of generating an image from a model, by means of a computer program.

slide-16
SLIDE 16

3D Rendering

Rendering[ren-der-ing]: The process of generating an image from a model, by means of a computer program. Visibility

slide-17
SLIDE 17

3D Rendering

Rendering[ren-der-ing]: The process of generating an image from a model, by means of a computer program.

slide-18
SLIDE 18

3D Rendering

Rendering[ren-der-ing]: The process of generating an image from a model, by means of a computer program.

slide-19
SLIDE 19

3D Rendering

xw zw Objects

Pixel (RGB)

Light Illumination yw Camera xe ye ze

eye

slide-20
SLIDE 20

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.).

slide-21
SLIDE 21

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
slide-22
SLIDE 22
  • Shadows
  • Reflections (Mirrors)
  • Transparency
  • Translucency
  • Inter-reflections
  • Detail (Textures…)
  • Realistic Materials
  • And many more

Photorealism

slide-23
SLIDE 23

Rendering strategies

  • Rasterization-based
  • Ray Tracing-based
slide-24
SLIDE 24

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….

slide-25
SLIDE 25

Visual Consistency

slide-26
SLIDE 26

Physically-based Rendering demo

Physics laws-based light transport model

slide-27
SLIDE 27

Real-Time Ray-Tracing (RTRT)

slide-28
SLIDE 28

Real-Time Ray-Tracing (RTRT)

slide-29
SLIDE 29

RTRT in Games

slide-30
SLIDE 30

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).

slide-31
SLIDE 31

Visibility in Rasterization

Conceptual Graphics pipeline with two stages: geometric transformations and rasterization Explicit projection

  • peration

(implicit projection lines) : perspective or orthographic matrix transformations

slide-32
SLIDE 32

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’

slide-33
SLIDE 33

Opaque materials

From https://www.scratchapixel.com/lessons/3d-basic-rendering/introduction-to-shading

slide-34
SLIDE 34

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

slide-35
SLIDE 35

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

slide-36
SLIDE 36

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

slide-37
SLIDE 37

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

slide-38
SLIDE 38

Diffuse vs Specular

slide-39
SLIDE 39

Transparent Objects

Transparency

Snell law – direction of refracted ray Fresnel´s equation: how much light is being reflected vs refracted

slide-40
SLIDE 40
  • Ray tracing combines...

 ...hidden surface removal  ...shading due to direct illumination  ...shading due to global (indirect) illumination from the

environment

 ...shadow computation

Ray-Tracing

slide-41
SLIDE 41
  • 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

slide-42
SLIDE 42
  • 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

slide-43
SLIDE 43

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

slide-44
SLIDE 44

Assignments 2 and 3 – Hall of Fame P3D 2018