approximate ray-tracing on the gpu with distance impostors lászló szirmay-kalos barnabás aszódi...

21
Approximate Ray- Approximate Ray- Tracing on the GPU Tracing on the GPU with with Distance Impostors Distance Impostors László Szirmay-Kalos László Szirmay-Kalos Barnabás Aszódi Barnabás Aszódi István Lazányi István Lazányi Mátyás Premecz Mátyás Premecz TU Budapest, Hungary

Upload: braulio-tumbleson

Post on 01-Apr-2015

219 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

Approximate Ray-Approximate Ray-Tracing on the GPU with Tracing on the GPU with

Distance ImpostorsDistance Impostors

László Szirmay-KalosLászló Szirmay-KalosBarnabás AszódiBarnabás AszódiIstván LazányiIstván LazányiMátyás PremeczMátyás Premecz

TU Budapest, Hungary

Page 2: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

GPU rendering versus GPU rendering versus Ray-TracingRay-Tracing

Inremental rendering on the GPU

Non-coherent Ray tracing

Page 3: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

Previous workPrevious work

Ray-tracing on the GPURay-tracing on the GPU– Ray-engine (Carr et. al): Ray-engine (Carr et. al):

Bad complexity: time Bad complexity: time rays rays triangles triangles

– Regular grid (Purcell et. al): Regular grid (Purcell et. al): Problematic for dynamic objectsProblematic for dynamic objects

Environment mapping (Blinn)Environment mapping (Blinn)– Environment is at infinityEnvironment is at infinity– Localization with simple proxy Localization with simple proxy

geometrygeometry (Bjorke) (Bjorke)

Page 4: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

Contribution of this Contribution of this paperpaper GPU friendly approximate ray GPU friendly approximate ray

tracing algorithm for casting tracing algorithm for casting incoherent rays needed, for incoherent rays needed, for example, example, when computingwhen computing– ReflectionReflectionss– RefractionRefractionss– CausticsCaustics– ……

Page 5: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

distanceradiance

Distance ImpostorsDistance Impostors

Page 6: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

Ray-Tracing withRay-Tracing with

Distance ImpostorsDistance Impostors

Page 7: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

ApproximationApproximation

Page 8: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

Approximation ErrorApproximation Error

1 iteration 4 iterations 8 iterations

Page 9: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

ReflectionsReflections

radiance

Page 10: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

Problems of Problems of environment map environment map based reflectionsbased reflections

Environment map Reference

Page 11: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

Localized ReflectionsLocalized Reflections

distanceradiance

Page 12: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

Comparison of Comparison of Localized RefrectionsLocalized Refrections

Page 13: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

RefractionsRefractions

radiance

environment

Page 14: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

Multiple Localized Multiple Localized RefractionsRefractions

distancenormals

environment

Page 15: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

Comparison of Comparison of Multiple RefractionsMultiple Refractions

Page 16: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

Multiple refraction Multiple refraction resultsresults109 FPS109 FPS

Page 17: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

CausticsCaustics

distancetexture u, v

texture uv, power

Page 18: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

32 x 32

Texture modulationTexture modulation

Texture uv of photon positions

Vertexshader

Billboardpositions

filter

Pixelshader

Lit texture orLight map256 x 256

Page 19: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

Caustics Results: 180 Caustics Results: 180 FPSFPS

Page 20: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

Application: Ray-Application: Ray-tracing effects in tracing effects in gamesgames

Page 21: Approximate Ray-Tracing on the GPU with Distance Impostors László Szirmay-Kalos Barnabás Aszódi István Lazányi Mátyás Premecz TU Budapest, Hungary

ConclusionsConclusions

Distance impostors to represent Distance impostors to represent geometry in ray tracinggeometry in ray tracing

Iterative ray tracing algorithmIterative ray tracing algorithm Applications (100+ FPS):Applications (100+ FPS):

– Localized reflectionsLocalized reflections– Single and multiple localized Single and multiple localized

refractionsrefractions– CausticsCaustics