Ray Tracing News - PowerPoint PPT Presentation

About This Presentation
Title:

Ray Tracing News

Description:

Ray Tracing News http://www.raytracingnews.org/ RTNv19n1: September 30, 2006 Introduction Ray Tracing Roundup Notes on Efficient Ray Tracing Ray-Box Sorting BVHs and ... – PowerPoint PPT presentation

Number of Views:84
Avg rating:3.0/5.0
Slides: 75
Provided by: wwwsopIn2
Category:
Tags: news | ray | tracing

less

Transcript and Presenter's Notes

Title: Ray Tracing News


1
(No Transcript)
2
Ray Tracing News
  • http//www.raytracingnews.org/
  • RTNv19n1 September 30, 2006
  • Introduction
  • Ray Tracing Roundup
  • Notes on Efficient Ray Tracing
  • Ray-Box Sorting
  • BVHs and Memory Coherence
  • So long and thanks for all the fish...
  • Ray/Box Intersection Optimization
  • SIGGRAPH 2006 Report

3
Ray TracingenGlobal Illumination
  • praktische inleiding
  • over beschikbare software

4
Ray Tracer from scratch
  • practicum CG1
  • leerrijk, maar tijdrovend
  • matrix, vector, kleur, afbeelding, camera,
    straal, puntlicht, driehoek, ...
  • ontwerpkeuzes

5
Beschikbare renderers
  • standing on the shoulders of giants
  • doel
  • hobby ray tracer met beperkte fysische basis
  • bv. POV-Ray
  • academische, fysisch gebaseerde global
    illumination renderer
  • bv. PBRT, RenderPark, Radiance,
  • basisimplementatie
  • meer mogelijkheden dan je zelf zou schrijven
  • uitbreidbaarheid

6
Overzicht
  • Ray Tracing
  • korte herhaling van CG1
  • voorbeeld POV-Ray
  • Global Illumination
  • korte herhaling van CG1, meer info zie CG2
  • voorbeeld PBRT

7
Ray Tracing herhaling
  • camera
  • pixelrooster
  • scène

scène
camera
pixelrooster
8
Ray Tracing herhaling
  • primaire straal

9
Ray Tracing herhaling
  • primaire straal
  • raakpunt
  • schaduw en shading

10
Ray Tracing herhaling
  • schaduw
  • schaduwstraal van raakpunt naar lichtbron
  • raakt ander object?raakpunt niet belicht

11
Ray Tracing herhaling
  • diffuus
  • cosinus (N.L)
  • speculair
  • spiegeling(N.V) (N.R)
  • recursie
  • Phong (glans)
  • cosinus (R.V) of (N.H)
  • exponent n

12
Ray Tracing herhaling
  • recursie
  • reflectie
  • refractie
  • wet van Snellius

normaal buiten
lucht (n1)
glas (n1,5)
oppervlak
13
Ray Tracing herhaling
  • ray tracingà la Whitted 1980
  • uitbreidingen
  • oppervlaktelichtbron(zachte schaduwen)
  • participerende media
  • hacks
  • ambiënt licht

14
POV-Ray (www.povray.org)
  • hobby, artistiek, andere terminologie
  • brede basisimplementatie
  • uitbreidbaarheid is geen doel
  • praktische documentatie en tutorials
  • standaard ray tracing

15
POV-Ray
  • fotorealisme mogelijk door te tweaken
  • Internet Ray Tracing Competition (www.irtc.org)
  • niet fysisch gebaseerd, geen global illumination
  • radiosity, photon map uitbreidingen

16
POV-Ray syntax
  • camera
  • perspective
  • location lt0.0, 0.5,-8.0gt
  • look_at lt0.0, 0.0, 0.0gt
  • up lt0.0, 1.0, 0.0gt
  • angle 50

17
POV-Ray syntax
  • light_source
  • lt-30,30,-30gt // positie
  • color rgb lt1.0, 1.0, 1.0gt
  • pointlight
  • light_source
  • lt-30,30,-30gt // positie
  • color rgb lt1.0, 1.0, 1.0gt
  • area_light
  • lt8, 0, 0gt lt0, 0, 8gt // afmetingen
  • 8, 8 // stratificatie
  • jitter

18
POV-Ray syntax
  • plane
  • y, -1 // vlak y-1
  • box
  • lt-3,-1,-1gt lt-1, 1, 1gt // hoekpunten
  • sphere
  • lt0.0, 0.0, 0.0gt, 1 // center, straal
  • cone
  • lt2,1,0gt, 0.0, // punt op as, straal 0
  • lt2,-1,0gt, 1.0 // punt op as, straal 1

19
POV-Ray syntax
  • mesh
  • triangle
  • lt0,0,0gt, lt0,1,0gt, lt1,1,0gt // hoeken
  • uv_vectors lt0,0gt, lt0,1gt, lt1,1gt
  • // textuurcoordinaten
  • smooth_triangle
  • lt0,0,0gt, lt0,0,1gt, // hoek, normaal
  • lt1,0,0gt, lt0,1,1gt, // hoek, normaal
  • lt1,1,0gt, lt1,1,1gt // hoek, normaal
  • uv_vectors lt0,0gt, lt0,1gt, lt1,1gt
  • // textuurcoordinaten

20
POV-Ray syntax
  • texture // materiaal
  • pigment // basiskleur
  • // ...
  • normal // bump map
  • // ...
  • finish // glans
  • // ...

21
POV-Ray syntax
  • pigment
  • color rgb lt1.0,0.0,0.0gt
  • pigment
  • image_map
  • jpeg
  • "filename.jpg"

22
POV-Ray syntax
  • normal
  • bumps 0.5 // proceduraal
  • normal
  • bump_map
  • gif
  • "filename.gif"

23
POV-Ray syntax
  • finish
  • phong 0.9
  • phong_size 60 // 1 - 250
  • // of
  • specular 0.9
  • roughness 0.02 // 0.0005 1
  • reflection 0.8
  • // modifiers
  • metallic // kleur highlight
  • conserve_energy

24
POV-Ray
25
POV-Ray
  • uitbreidbaarheid?
  • C
  • redelijk leesbare code
  • weinig structuur
  • code aanpassen
  • functionaliteit toevoegen?

26
Overzicht
  • Ray Tracing
  • korte herhaling van CG1
  • voorbeeld POV-Ray
  • Global Illumination
  • korte herhaling van CG1, meer info zie CG2
  • voorbeeld PBRT

27
Global Illumination
  • diffuse interreflecties

28
Global Illumination
  • diffuse interreflecties
  • glossy reflecties

29
Global Illumination
  • diffuse interreflecties
  • glossy reflecties
  • caustics

30
Global Illumination
  • diffuse interreflecties
  • glossy reflecties
  • caustics
  • fysisch correct

31
Global Illumination
radiosity stochastic ray tracing
  • diffuse interreflecties
  • glossy reflecties
  • caustics
  • fysisch correct

radiosity
ray tracing
foto
32
Global Illumination herhaling
33
Global Illumination herhaling
34
Global Illumination herhaling
  • directe/indirecte belichting samen

35
Global Illumination herhaling
  • directe/indirecte belichting apart

36
Global Illumination herhaling
  • path tracing

37
Global Illumination herhaling
  • path tracing
  • L ...

38
Global Illumination herhaling
  • path tracing
  • L ...
  • emissie

39
Global Illumination herhaling
  • path tracing
  • L ...
  • emissie
  • directe belichting

40
Global Illumination herhaling
  • path tracing
  • L ...
  • emissie
  • directe belichting
  • indirecte belichtingkomt van overal

41
Global Illumination herhaling
  • path tracing
  • L ...
  • emissie
  • directe belichting
  • indirecte belichtinguit 1 richting

42
Global Illumination herhaling
  • path tracing
  • L ...
  • emissie
  • directe belichting
  • indirecte belichtingkomt van ergens

43
Global Illumination herhaling
  • path tracing
  • L ...
  • emissie
  • directe belichting
  • indirecte belichtingrecursief

44
Global Illumination herhaling
  • path tracing
  • L ...
  • emissie
  • directe belichting
  • indirecte belichtingrecursief

45
Global Illumination herhaling
  • path tracing
  • L ...
  • emissie
  • directe belichting
  • indirecte belichtingrecursief

46
Global Illumination herhaling
  • path tracing
  • L ...
  • emissie
  • directe belichting
  • indirecte belichtingrecursief

47
Global Illumination herhaling
  • path tracing
  • L ...
  • emissie
  • directe belichting
  • indirecte belichtingrecursief

48
Global Illumination herhaling
  • path tracing
  • L ...
  • emissie
  • directe belichting
  • indirecte belichtingrecursief

49
Global Illumination herhaling
  • path tracing
  • L ...
  • emissie
  • directe belichting
  • indirecte belichtingrecursief
  • aantal keerper pixel

50
Global Illumination herhaling
  • path tracing
  • in principe volledig
  • maar soms traag
  • bv. caustics

51
Global Illumination herhaling
  • photon mapping
  • pass 1 store

52
Global Illumination herhaling
  • photon mapping
  • pass 1 store
  • positie (x, y, z)
  • inkomende richting
  • vermogen (r, g, b)

53
Global Illumination herhaling
  • photon mapping
  • pass 1 store
  • positie (x, y, z)
  • inkomende richting
  • vermogen (r, g, b)
  • in kd-tree

54
Global Illumination herhaling
  • photon mapping
  • pass 1 store
  • positie (x, y, z)
  • inkomende richting
  • vermogen (r, g, b)
  • in kd-tree
  • los van geometrie

55
Global Illumination herhaling
  • photon mapping
  • pass 1 store
  • globale map
  • caustic map

56
Global Illumination herhaling
  • photon mapping
  • pass 1 store
  • pass 2 gather
  • soort stochasticray tracingemissiedirecte
    belichtingcaustic mapindirecte
    belichtingglobale map

57
PBRT (www.pbrt.org)
  • academisch
  • beperkte basisimplementatie
  • moderne, leesbare algoritmes
  • performant, maar geen micro-optimalisaties
  • extreem uitbreidbaar
  • bijna alles in plugins
  • documentatie
  • directe overeenkomst theorie en implementatie
  • gekende terminologie

58
PBRT
  • boek Physically Based Rendering From Theory to
    Implementation
  • M. Pharr, G. Humphreys. 2004.
  • incl. CD met bin, src v1.0 en prentjes
  • site www.pbrt.org
  • source code v1.02
  • Windows (Visual Studio, Cygwin)
  • Linux / MacOS X
  • plugins
  • errata bugtracking

59
PBRT
  • globale belichting, fysisch gebaseerd
  • fotorealisme als je realistische invoer geeft

60
PBRT
  • globale belichting, fysisch gebaseerd
  • fotorealisme als je realistische invoer geeft

61
PBRT
  • globale belichting, fysisch gebaseerd
  • fotorealisme als je realistische invoer geeft

62
PBRT plugins
  • accelerators kdtree, grid
  • cameras perspective, environment, orthographic
  • filters mitchell, box, gaussian, sinc, triangle
  • integrators directlighting, irradiancecache,
    path, photonmap, whitted, ...
  • samplers lowdiscrepancy, stratified, ...

63
PBRT
  • lights area, distant, infinite, point,
    projection, spot, ...
  • materials matte, glass, mirror, plastic,
    shinymetal, translucent, uber, ...
  • shapes cone, cylinder, disk, loopsubdiv, nurbs,
    sphere, trianglemesh, ...
  • textures checkerboard, constant, dots, fbm,
    imagemap, marble, windy, wrinkled, ...

64
PBRT syntax
  • Identifier class (type name
    value)
  • Film image string filename
    foo
  • Sampler stratified bool jitter
    true
  • LightSource spot float coneangle 30
  • Shape trianglemesh point P 0 0 0 0 1
    0 1 0 0
  • normal N 0 0 1 0 1
    1 1 0 1
  • vector S 1 1 0 1 0
    0 0 1 0
  • integer indices 0 1
    2 ...
  • Texture green color constant color value
    0 1 0
  • Material matte texture Kd
    green
  • Material matte color Kd 0 1
    0

65
PBRT syntax
  • LookAt 0 10 100 0 -1 0 0 1 0
  • camera punt lookat punt up vector
  • Camera perspective float fov 30
  • SurfaceIntegrator path
  • Accelerator kdtree

66
PBRT syntax
  • PixelFilter box float xwidth .5
  • float ywidth .5
  • Sampler stratified integer xsamples 2
  • integer ysamples 2
  • bool jitter true
  • Film image string filename name.exr
  • integer xresolution 800
  • integer yresolution 600

67
PBRT
  • OpenEXR (www.openexr.com)
  • Industrial Light Magic (Lucasfilm)
  • high dynamic range
  • in postproces exposure aanpassen

68
PBRT syntax
  • WorldBegin
  • LightSource point point from 0 1 0
  • AttributeBegin
  • Translate 0 2 0
  • Rotate 135 1 0 0 hoek en as
  • Material matte color Kd 1 0 0
  • Shape sphere float radius 2
  • altijd center 0 0 0, dus Translate
  • AttributeEnd
  • WorldEnd

69
PBRT plugins
  • include shape.h
  • class Sphere public Shape
  • public
  • Sphere(...)
  • BBox ObjectBound() const
  • bool Intersect(const Ray ray,
  • float tHit, ...) const
  • bool IntersectP(const Ray ray) const
  • float Area() const
  • Point Sample(float u1, float u2, ...)
  • const
  • float Pdf(...) const

70
PBRT plugins
  • Shape CreateShape(...)
  • float radius
  • params.FindOneFloat("radius", 1.0f)
  • return new Sphere(radius, ...)
  • Shape sphere float radius 2

71
(No Transcript)
72
(No Transcript)
73
(No Transcript)
74
Praktische rendering
  • Eigen PC
  • Graphics aquarium
  • Athlon 64 X2 (dual core)
  • uitbreiding
  • PC-klas
  • 40-tal Pentium IV
  • Cluster (www.vic.cc.kuleuven.be)
  • 400-tal Opteron250 cores
  • binnenkort 480-tal extra
Write a Comment
User Comments (0)
About PowerShow.com