28
Lighting models Lighting models & optimization & optimization Pavel Zemčík Pavel Zemčík Department of Computer Science and Department of Computer Science and Engineering, Engineering, Faculty of Electrical Engineering and Faculty of Electrical Engineering and Computer Science, Computer Science, Technical Univeristy of Brno, Technical Univeristy of Brno, Czech Republic Czech Republic [email protected] [email protected]

Lighting models & optimization

  • Upload
    ilana

  • View
    49

  • Download
    0

Embed Size (px)

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 [email protected]. What are lighting models?. - PowerPoint PPT Presentation

Citation preview

Page 1: Lighting models & optimization

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

[email protected]@dcse.fee.vutbr.cz

Page 2: Lighting models & optimization

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

Page 3: Lighting models & optimization

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)

Page 4: Lighting models & optimization

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

Page 5: Lighting models & optimization

Local models geometryLocal models geometry

Page 6: Lighting models & optimization

Phong model geometryPhong model geometry

Page 7: Lighting models & optimization

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

Page 8: Lighting models & optimization

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

Page 9: Lighting models & optimization

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

Page 10: Lighting models & optimization

Surface textureSurface texture

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

Page 11: Lighting models & optimization

Normal vector textureNormal vector texture

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

Page 12: Lighting models & optimization

Mirror model geometryMirror model geometry

Page 13: Lighting models & optimization

Mirror model equationsMirror model equations

• GeneralGeneral

• Details (reflection direction)Details (reflection direction)

rrk II

nneer )(2

Page 14: Lighting models & optimization

Mirror model exampleMirror model example

Page 15: Lighting models & optimization

Glass model geometryGlass model geometry

Page 16: Lighting models & optimization

Glass model energyGlass model energy

Page 17: Lighting models & optimization

Glass model equationsGlass model equations

• DirectionDirection

• Energy distribution approximationEnergy distribution approximation

2211 sinsin nn

4)90/(1.0 R

Page 18: Lighting models & optimization

Glass model exampleGlass model example

Page 19: Lighting models & optimization

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.

Page 20: Lighting models & optimization

Optimisation of ray Optimisation of ray tracingtracing

Page 21: Lighting models & optimization

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

Page 22: Lighting models & optimization

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%

Page 23: Lighting models & optimization

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

Page 24: Lighting models & optimization

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

Page 25: Lighting models & optimization

CSG tree pruningCSG tree pruning

Page 26: Lighting models & optimization

CSG status treeCSG status tree

Page 27: Lighting models & optimization

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

Page 28: Lighting models & optimization

The endThe end