Lighting models & optimization

Preview:

DESCRIPTION

Lighting models & optimization. Pavel Zemčík Department of Computer Science and Engineering, Faculty of Electrical Engineering and Computer Science, Technical Univeristy of Brno, Czech Republic zemcik@dcse.fee.vutbr.cz. What are lighting models?. - PowerPoint PPT Presentation

Citation preview

Lighting modelsLighting models& optimization& optimizationPavel ZemčíkPavel ZemčíkDepartment of Computer Science and Engineering,Department of Computer Science and Engineering,

Faculty of Electrical Engineering and Computer Faculty of Electrical Engineering and Computer Science,Science,

Technical Univeristy of Brno,Technical Univeristy of Brno,

Czech RepublicCzech Republic

zemcik@dcse.fee.vutbr.czzemcik@dcse.fee.vutbr.cz

What are lighting models?What are lighting models?

Lighting models are models of light Lighting models are models of light behaviour on the objectsbehaviour on the objects’ surface’ surface

• Global modelsGlobal models

• Local modelsLocal models

• Behaviour at the edgesBehaviour at the edges

Global modelsGlobal models

Generally used in radiation methodsGenerally used in radiation methods

• Physics laws (preservs model’s Physics laws (preservs model’s energy)energy)

• Simple light propagation (form Simple light propagation (form factors)factors)

Local modelsLocal models

Approximate light propagation Approximate light propagation locallylocally

• Not necessarily physics basedNot necessarily physics based

• Measurement based (empirical)Measurement based (empirical)

• Often just a Often just a ‘good looking’ ‘good looking’ guessguess

Local models geometryLocal models geometry

Phong model geometryPhong model geometry

Phong model equationsPhong model equations

• GeneralGeneral

• Details (note that IDetails (note that Ibb is constant) is constant)

rdb IIII

)(cos nl dldld kk III n

rln

rlr kk )(cos re III nnllr )(2

Phong model parameters-Phong model parameters-nn

• The image showsThe image showsthe effect of the effect of nn

nn== 15 7 15 7 3 1 3 1

nnrlrlr kk )(cos re III

Phong model parameters-Phong model parameters-kkdd,k,krr

• The image showsThe image showsthe effect of the effect of kkdd,k,krr

kkdd,k,krr = = 0.3,0.6 0.5,0.4 0.3,0.6 0.5,0.4 0.7,0.2 0.9,0 0.7,0.2 0.9,0

nrl

nrlr kk )(cos re III

)(cos nl dldld kk III

Surface textureSurface texture

• The image wasThe image wasrendered usingrendered usingPhong model withPhong model withsuperimposedsuperimposedtexture modifyingtexture modifyingthe coefficientsthe coefficients

Normal vector textureNormal vector texture

• The image wasThe image wasrendered usingrendered usingPhong model withPhong model withsuperimposedsuperimposedtexture modifyingtexture modifyingthe normal vectorthe normal vector

Mirror model geometryMirror model geometry

Mirror model equationsMirror model equations

• GeneralGeneral

• Details (reflection direction)Details (reflection direction)

rrk II

nneer )(2

Mirror model exampleMirror model example

Glass model geometryGlass model geometry

Glass model energyGlass model energy

Glass model equationsGlass model equations

• DirectionDirection

• Energy distribution approximationEnergy distribution approximation

2211 sinsin nn

4)90/(1.0 R

Glass model exampleGlass model example

Other lighting modelsOther lighting models

• Torrance-Sparrow (rough surfaces)Torrance-Sparrow (rough surfaces)

• Blinn, Strauss (half-transparent Blinn, Strauss (half-transparent objects)objects)

• Metals (fluorescent effects)Metals (fluorescent effects)

• etc.etc.

Optimisation of ray Optimisation of ray tracingtracing

Optimisation of ray Optimisation of ray tracingtracing

Three general approachesThree general approaches

• Reduction of number of evaluated Reduction of number of evaluated pixelspixels

• Bounding volumesBounding volumes

• Space subdivisionSpace subdivision

Reduction of number of Reduction of number of pixelspixels

Mostly using adaptive subsamplingMostly using adaptive subsampling

• naive would benaive would be

40x3040x30

• optimised 5x5optimised 5x5

16x12+10x2116x12+10x21

402/1200402/1200-66%-66%

Bounding volumesBounding volumes

Bounding volume must bound all the Bounding volume must bound all the real objects but be as small as real objects but be as small as possiblepossible

• complexcomplex

• done manuallydone manually

• speedup >10speedup >10

Space subdivisionSpace subdivision

Scene is divided into several smaller Scene is divided into several smaller units that are evaluated separatelyunits that are evaluated separately

• simple principlesimple principle

• automatic butautomatic butquite high costquite high cost

• speedup >10speedup >10

CSG tree pruningCSG tree pruning

CSG status treeCSG status tree

Referenecs Referenecs (in addition to the previous (in addition to the previous lecture)lecture)

• Bronsvoort W F: Techniques for Reducing Boolean Evaluation Time in CSG scan-line algorithms, Computer-aided Design, vol. 18, no. 10, 1986, Great Britain, pp. 533-536

• Fujimoto A, Tanaka T, Iwata K: ARTS Accelerated Ray Tracing System, IEEE Computer Graphics & Applications, April 1986, USA, pp. 16-26

• Glassner A S: Efficient Boolean Evaluation of CSG Models for Ray Tracing, The Ray Tracing News, vol. 1, no. 1, September 1987, USA, pp. 3-7

• Strauss P S: A Realistic Model for Computer Animators, IEEE Computer Graphics & Applications, November 1990, USA, pp. 56-64

The endThe end

Recommended