Realistic Rendering Realistic Rendering 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 University of Brno, Technical University of Brno, Czech Republic Czech Republic [email protected][email protected]
38
Embed
Realistic Rendering Pavel Zemčík Department of Computer Science and Engineering, Faculty of Electrical Engineering and Computer Science, Technical University.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Realistic RenderingRealistic Rendering
Pavel 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 University of Brno,Technical University of Brno,
What is realistic What is realistic rendering?rendering?
Realistic (photo-realistic) rendering Realistic (photo-realistic) rendering is the process of production of is the process of production of photograph-like images from a 3D photograph-like images from a 3D modelmodel
• Measure of “realism” is humanMeasure of “realism” is human
• Affected by wide range of factorsAffected by wide range of factors
The realistic rendering The realistic rendering needsneeds
• Models of objects, environment, and Models of objects, environment, and lightlight
• Light features (particle and wave Light features (particle and wave effects)effects)
• Fine structure of objectsFine structure of objects’’ surface surface
• The material features (e.g. for glass)The material features (e.g. for glass)
Is realistic rendering Is realistic rendering possible?possible?
NO!!! True realism is not possibleNO!!! True realism is not possible
• Accurate models not availableAccurate models not available
• Light features impossible to modelLight features impossible to model
• Any close approximation very Any close approximation very demandingdemanding
• Very rough approximations usedVery rough approximations used
Constructive Solid Geometry (CSG) Constructive Solid Geometry (CSG) is a method for representing the 3D is a method for representing the 3D objectsobjects
• tree structure (binary or n-ary)tree structure (binary or n-ary)
• primitive objects in the leavesprimitive objects in the leaves
• CSG (set) operations in other nodesCSG (set) operations in other nodes
CSG - exampleCSG - example
CSG operationsCSG operations
CSG operations are generally set CSG operations are generally set operations on 3D objectsoperations on 3D objects’ volumes’ volumes
very fast (0.01-0.1s) slow (100-1000s) very slow (hours)
no shadows sharp shadows only smooth shadows
CAD drawings,games, virtual reality,3D modelling
realistic images ofgeometrical objects,
medical imaging
realistic images, pre-calculation forgames, etc.
Radiosity principleRadiosity principle
• Get form factorsGet form factors• Assign lightsAssign lights• Solve equationSolve equation• Render usingRender using
a pixel methoda pixel method
nn
n
nn l
l
l
x
x
x
x
x
f
f
fff
ff
0
0
10
00
2
1
1
3
2
1
32
232221
1211
Ray tracing principleRay tracing principle The image is created by evaluation of The image is created by evaluation of
content of each of the picture elementscontent of each of the picture elements
Durer A.: The Art of Measurement, Volume IV, The Netherlands, 1538Durer A.: The Art of Measurement, Volume IV, The Netherlands, 1538
Ray tracing algorithmRay tracing algorithm
For each pixelFor each pixel
• send a ray eye send a ray eye pixel pixel scene scene
• calculate what can be seencalculate what can be seen
• calculate the value of the pixel -calculate the value of the pixel -
• if necessary, proceed recursivelyif necessary, proceed recursively
Ray tracing - secondary Ray tracing - secondary raysrays Secondary rays are necessary for Secondary rays are necessary for
evaluation of shadows and mirrorsevaluation of shadows and mirrors
Sending a raySending a ray
• Simple task, involves 3D projective Simple task, involves 3D projective transformationtransformation
Geometry - what can be Geometry - what can be seenseen
• Very complex task, in naive approach it Very complex task, in naive approach it involves calculation of intersection of the involves calculation of intersection of the ray with all objects in the sceneray with all objects in the scene
(intersection often involves quadratic (intersection often involves quadratic equation solution, or similar task)equation solution, or similar task)
• Intersection (dIntersection (d’’, s, s’ are d, s in 4D)’ are d, s in 4D)
• NormalNormal
}0 |{G xQxx t
0) )(() )((2) )(( 2 sQsdQsdQd ttt tt
)]) (
,) (
,) (
[(dzdydx
ttt xQxxQxxQxn
Geometry - CSGGeometry - CSG
Geometry - CSG algorithmGeometry - CSG algorithm
• Shoot a ray & Convert sets to Shoot a ray & Convert sets to intervalsintervals
• Apply CSG operations to intervalsApply CSG operations to intervals
• or Convert to simpler list operationsor Convert to simpler list operations
• Get the “realGet the “real” intersection” intersection
ReferencesReferences
• Gouraud H: Continouous Shading of Curved Surfaces, IEEE Gouraud H: Continouous Shading of Curved Surfaces, IEEE Transactions on Computer Graphics, n. 6, vol. C-20, june Transactions on Computer Graphics, n. 6, vol. C-20, june 1971, USA, pp. 623-6291971, USA, pp. 623-629
• Foley J D, Van Dam A: Fundamentals of Interactive Computer Foley J D, Van Dam A: Fundamentals of Interactive Computer Graphics, Addison-Wesley 1983, USAGraphics, Addison-Wesley 1983, USA
• Goral C M, Torrance K E, Greenberg D P, Battaile B: Goral C M, Torrance K E, Greenberg D P, Battaile B: Modelling The Modelling The Interaction of Light Between Diffuse Interaction of Light Between Diffuse Surfaces, sborník SIGGRAPH '84, ACM Computer Graphics, Surfaces, sborník SIGGRAPH '84, ACM Computer Graphics, USA, 1984USA, 1984
• Watt A, Watt M: Advanced Animation and Rendering Watt A, Watt M: Advanced Animation and Rendering Techniques, Addison-Wesley 1992, USA, str. 33-64Techniques, Addison-Wesley 1992, USA, str. 33-64