1 tpcg’03, birmingham, uk © r.ošlejšek, j.sochor, fi mu brno generic graphics architecture...

20
1 1 TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno Generic Graphics Generic Graphics Architecture Architecture Radek Ošlejšek, Jiří Radek Ošlejšek, Jiří Sochor Sochor Human Computer Human Computer Interaction Interaction Laboratory Laboratory Masaryk University, Masaryk University, Brno Brno Czech Republic Czech Republic

Upload: jaime-biddick

Post on 14-Dec-2015

215 views

Category:

Documents


0 download

TRANSCRIPT

11

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

Generic Graphics ArchitectureGeneric Graphics Architecture

Radek Ošlejšek, Jiří Sochor Radek Ošlejšek, Jiří Sochor

Human Computer Interaction Human Computer Interaction LaboratoryLaboratory

Masaryk University, BrnoMasaryk University, Brno

Czech Republic Czech Republic

22

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

Analysis of rendering strategies could bring:Analysis of rendering strategies could bring: Unified view on rendering strategiesUnified view on rendering strategies

– rendering techniques are highly variable (radiosity, ray-tracing, rendering techniques are highly variable (radiosity, ray-tracing, photon-mapping, image-based rendering, ... )photon-mapping, image-based rendering, ... )

Reusability of graphics components Reusability of graphics components – BRDFs, spatial data structures, interpolators, ...BRDFs, spatial data structures, interpolators, ...

HW acceleration of common componentsHW acceleration of common components– exploring (some) modules of existing graphics pipelines exploring (some) modules of existing graphics pipelines – development of a new HW architecture/moduledevelopment of a new HW architecture/module

Detection of bottlenecks and possible parallelism Detection of bottlenecks and possible parallelism of the rendering processof the rendering process

Exploitation of design patterns principles and invention of Exploitation of design patterns principles and invention of graphics patterns graphics patterns

IntroductionIntroduction

33

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

D. W. Fellner (1995-1996)D. W. Fellner (1995-1996)– Minimal Ray TracerMinimal Ray Tracer (MRT) architecture (MRT) architecture– Focused on ray-tracing and classical polygon-based local Focused on ray-tracing and classical polygon-based local

illuminationillumination P. Slusallek and H.-P. Seidel (1995)P. Slusallek and H.-P. Seidel (1995)

– VisionVision architecture architecture– cooperating subsystemscooperating subsystems

J. DJ. Döllner and K. Hinrichs (2002)öllner and K. Hinrichs (2002)– extensible scene graph structure using GoF design patternsextensible scene graph structure using GoF design patterns– architecture over existing proprietary applications (OpenGL, architecture over existing proprietary applications (OpenGL,

POV-ray, RenderMan …) POV-ray, RenderMan …) which are treated by the system of handleswhich are treated by the system of handles

Previous WorkPrevious Work

44

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

Scene decomposition with propertiesScene decomposition with properties Extensibility Extensibility - new objects, material descriptions, etc.- new objects, material descriptions, etc.

Efficiency Efficiency - various spatial data structures- various spatial data structures

Architectural viewArchitectural view Scene graph = container of virtual objectsScene graph = container of virtual objects Access through specialized Access through specialized ExplorersExplorers

– abstract interface for scene graph traversalabstract interface for scene graph traversal

– each explorer implements specific searching strategy each explorer implements specific searching strategy (candidates for ray intersection, objects from given area …)(candidates for ray intersection, objects from given area …)

Scene GraphScene Graph

55

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

x'

x x''

S

x)dx,x)I(x,x)V(x,x)G(xBRDF()xε(x,)xI(x,

),' xG(x

)'BRDF(x bi-directional reflection distribution function

),' xV(x

Rendering EquationRendering Equation

geometry term / attenuation

visibility

)', xε(x emitted energy

66

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

x’

I(x')

n

iiloc xBRDFxI(x,x')I

1

)'()'(

0)', xε(x

),(),'(),')'( iiii LxVLxGLε(xxI

testshadow

LxV( i

1),

),' iLG(x point / spot light

Local IlluminationLocal Illumination

S

x)dx,x)I(x,x)V(x,x)G(xBRDF()xε(x,)xI(x,

77

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

x’

locI (x,x') rtI (x',x'')

rtI (x',x'')

surfacesordinaryforxε(x 0),

castingrayxxV( ),

nattenuatioxxG( ),

),(),(),(

),(),(),(

),(,

xxIxxGxxVk

xxIxxGxxVk

xxI)x(xI

rtr

rtr

locrt

rkxBRDF( )

), x(xI loc local contribution

Ray-tracingRay-tracing

S

x)dx,x)I(x,x)V(x,x)G(xBRDF()xε(x,)xI(x,

88

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

x'

x''

Lambertian)xBRDF( x )cos(

0)( x

),(

)cos(),(),(

xxFfactorform

xxGxxV x

n

iiradirad xxIxxFx)x(I

1

),(),()(

x not used (omnidirectional distribution)

xxi , polygon centroids

RadiosityRadiosity

S

x)dx,x)I(x,x)V(x,x)G(xBRDF()xε(x,)xI(x,

99

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

PhongReflection

setGlobalAmbient

PhongBRDF PathTracing ProgRadiosity

S

x)dx,x)I(x,x)V(x,x)G(xBRDF()xε(x,)xI(x,

ReflectionModel

illuminatePoint

RadiosityRayTracingLocalReflection

Reflection Model – Class HierarchyReflection Model – Class Hierarchy

Explorer

BRDF

Emittance

1010

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

Some reflection models require the deposition of non-Some reflection models require the deposition of non-uniform energy on object surfaces for later usage uniform energy on object surfaces for later usage (radiosity, photon-tracing, ... )(radiosity, photon-tracing, ... )

Memory of integrationMemory of integration Coat descriptions:Coat descriptions:

– PolygonalPolygonal = surface discretized by fixed areas (polygons), = surface discretized by fixed areas (polygons), colors associated with entire polygons or their verticescolors associated with entire polygons or their vertices

– 2D map2D map = 2D energy mapped on arbitrary 3D surface (texture, = 2D energy mapped on arbitrary 3D surface (texture, shadow map, impostor, etc.)shadow map, impostor, etc.)

– 3D map3D map = 3D description of energy (3D texture, photon map, = 3D description of energy (3D texture, photon map, etc.)etc.)

Energy CoatEnergy Coat

1111

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

GeometryEnergyCoat

<<instantiate>>

MeshPolygonalEnergy

setPolygonEnergygetPolygonEnergysetVertexEnergygetVertexEnergy

EnergyMap

setPointEnergygetPointEnergy

ShadowMap Impostor Lumigraph

Energy Coat - Class HierarchyEnergy Coat - Class Hierarchy

1212

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

Covers the whole process of energy distributionCovers the whole process of energy distribution

– computes global energy by evaluation of reflection modelcomputes global energy by evaluation of reflection model

– deposits precomputed energy in the form of energy coatsdeposits precomputed energy in the form of energy coats

– determines color of arbitrary point on surface either determines color of arbitrary point on surface either

“on the fly” (e.g. ray-tracing) or “on the fly” (e.g. ray-tracing) or

by inspection of energy coat by inspection of energy coat

(e.g. final color interpolation in radiosity)(e.g. final color interpolation in radiosity)

ShadingShading

1313

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

Shader

distributeEnergyilluminatePoint

GouraudShaderPhongShader ComboShaderRTShader ProgRadShader

LocalShader GlobalShader

Shading - Class HierarchyShading - Class Hierarchy

ReflectionModel EnergyCoatinstantiates

1414

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

illuminatePoint

visibleObjectsobjsOfInterest

distributeEnergy

rasterize

renderScenedistributeEnergy

ExplorerExplorer Scene

Shader Renderer FrameBuffer

Rendering system

Generic Rendering SystemGeneric Rendering System

1515

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

AABBs 14-DOPs

Bounding spheresOriginal scene

Testbed Library – Testbed Library – Spatial Data StructuresSpatial Data Structures

1616

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

Cook-Torrance BRDFBlinn-Lambertian BRDF

Lambertian BRDF Phong-Lambertian BRDF

Testbed Library – Testbed Library – MaterialsMaterials

1717

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

Flat shadingWire-frame model

Smooth shading Ray-tracing

Testbed Library – Testbed Library – Rendering StrategiesRendering Strategies

1818

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

Testbed Library – Testbed Library – Efficiency TestsEfficiency Tests

0

10

20

30

40

50

60

70sec.

POV-ray

Our System

0

10

20

30

40

50

60

70sec.

POV-ray

Our System

1919

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

More complex rendering strategies, e.g. photon More complex rendering strategies, e.g. photon mappingmapping

Tricky algorithms not based on physical energy Tricky algorithms not based on physical energy distribution (e.g. image-based rendering)distribution (e.g. image-based rendering)

Detection of bottlenecksDetection of bottlenecks Detection of possible parallelismDetection of possible parallelism Participating media (fog, smoke, etc.)Participating media (fog, smoke, etc.) Various efficiency tests, comparisons with Various efficiency tests, comparisons with

proprietary systemsproprietary systems

Future WorkFuture Work

2020

TPCG’03, Birmingham, UK © R.Ošlejšek, J.Sochor, FI MU Brno

Thank you for attention !