Download presentation
Presentation is loading. Please wait.
1
Realistic Rendering Pavel Zemčík Department of Computer Science and Engineering, Faculty of Electrical Engineering and Computer Science, Technical University of Brno, Czech Republic zemcik@dcse.fee.vutbr.cz
2
What is realistic rendering? Realistic (photo-realistic) rendering is the process of production of photograph-like images from a 3D model Realistic (photo-realistic) rendering is the process of production of photograph-like images from a 3D model Measure of “realism” is humanMeasure of “realism” is human Affected by wide range of factorsAffected by wide range of factors
3
The realistic rendering needs Models of objects, environment, and lightModels of objects, environment, and light Light features (particle and wave effects)Light features (particle and wave effects) Fine structure of objects’ surfaceFine structure of objects’ surface The material features (e.g. for glass)The material features (e.g. for glass)
4
Is realistic rendering possible? NO!!! 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 demandingAny close approximation very demanding Very rough approximations usedVery rough approximations used
5
Rough realistic rendering The approximations usually assume empty space between objectsempty space between objects no particle or wave light effectsno particle or wave light effects simple scene geometry and lightssimple scene geometry and lights simple materials and surfacessimple materials and surfaces
6
Models of 3D scenes
7
Constructive Solid Geometry Constructive Solid Geometry (CSG) is a method for representing the 3D objects Constructive Solid Geometry (CSG) is a method for representing the 3D objects 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
8
CSG - example
9
CSG operations CSG operations are generally set operations on 3D objects’ volumes CSG operations are generally set operations on 3D objects’ volumes unary operation (not)unary operation (not) binary operations (intersection, and) (union, or) \ (difference)binary operations (intersection, and) (union, or) \ (difference) operations can be extended to n-aryoperations can be extended to n-ary
10
CSG surface exclusion CSG objects sometimes do not include the surface (for mathematical purity) CSG objects sometimes do not include the surface (for mathematical purity) In such case, e.g. CSG union can be defined as: In such case, e.g. CSG union can be defined as:
11
CSG - 3D example
12
CSG - 3D rendered example
13
CSG - 3D simple example
14
CSG - 3D fractal example
15
CSG - 3D glass example
16
CSG - 3D complex example
17
Rendering methods - objects The objects are processed in a sequenceThe objects are processed in a sequence No objects interaction - no shadowsNo objects interaction - no shadows
18
Rendering methods - pixels The pixels are processed in a sequenceThe pixels are processed in a sequence No global interaction - no half-shadowsNo global interaction - no half-shadows
19
Rendering methods - scene The complete scene is processedThe complete scene is processed Very complex - no sharp shadowsVery complex - no sharp shadows
20
Rendering methods comparison
21
Radiosity principle Get form factorsGet form factors Assign lightsAssign lights Solve equationSolve equation Render using a pixel methodRender using a pixel method
22
Ray tracing principle The image is created by evaluation of content of each of the picture elements The image is created by evaluation of content of each of the picture elements Durer A.: The Art of Measurement, Volume IV, The Netherlands, 1538
23
Ray tracing algorithm For each pixel send a ray eye pixel scenesend a ray eye pixel 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
24
Ray tracing - secondary rays Secondary rays are necessary for evaluation of shadows and mirrors Secondary rays are necessary for evaluation of shadows and mirrors
25
Sending a ray Simple task, involves 3D projective transformationSimple task, involves 3D projective transformation
26
Geometry - what can be seen Very complex task, in naive approach it involves calculation of intersection of the ray with all objects in the sceneVery complex task, in naive approach it involves calculation of intersection of the ray with all objects in the scene (intersection often involves quadratic equation solution, or similar task) (intersection often involves quadratic equation solution, or similar task) Estimated complexity: (P+S)*N e.g. (256x256+3*256x256)*1024=256M
27
Calculation of pixel value Depends on the local light modelDepends on the local light model Basic models include e.g. Basic models include e.g. flat modelflat model diffusiondiffusion Phong modelPhong model mirrormirror
28
Geometry - sphere
29
Geometry - sphere equations DefinitionDefinition Intersection (note that |d|=1)Intersection (note that |d|=1) or or Normal vectorNormal vector
30
Geometry - halfspace
31
Geometry - halfspace equations Definition (note that p·n is constant)Definition (note that p·n is constant) IntersectionIntersection Normal vector (already in definition)Normal vector (already in definition)
32
Geometry - cylinder
33
Geometry - cylinder equations DefinitionDefinition Intersection (substitution l=s-p, |d|=1)Intersection (substitution l=s-p, |d|=1) Normal vector (intersection reused)Normal vector (intersection reused)
34
Geometry - Quadric equations DefinitionDefinition Intersection (d’, s’ are d, s in 4D)Intersection (d’, s’ are d, s in 4D) NormalNormal
35
Geometry - CSG
36
Geometry - CSG algorithm Shoot a ray & Convert sets to intervalsShoot a ray & Convert sets to intervals Apply CSG operations to intervalsApply CSG operations to intervals or Convert to simpler list operationsor Convert to simpler list operations Get the “real” intersectionGet the “real” intersection
37
References Gouraud H: Continouous Shading of Curved Surfaces, IEEE Transactions on Computer Graphics, n. 6, vol. C-20, june 1971, USA, pp. 623-629Gouraud H: Continouous Shading of Curved Surfaces, IEEE Transactions on Computer Graphics, n. 6, vol. C-20, june 1971, USA, pp. 623-629 Foley J D, Van Dam A: Fundamentals of Interactive Computer Graphics, Addison-Wesley 1983, USAFoley J D, Van Dam A: Fundamentals of Interactive Computer Graphics, Addison-Wesley 1983, USA Goral C M, Torrance K E, Greenberg D P, Battaile B: Modelling The Interaction of Light Between Diffuse Surfaces, sborník SIGGRAPH '84, ACM Computer Graphics, USA, 1984Goral C M, Torrance K E, Greenberg D P, Battaile B: Modelling The Interaction of Light Between Diffuse Surfaces, sborník SIGGRAPH '84, ACM Computer Graphics, USA, 1984 Watt A, Watt M: Advanced Animation and Rendering Techniques, Addison-Wesley 1992, USA, str. 33-64Watt A, Watt M: Advanced Animation and Rendering Techniques, Addison-Wesley 1992, USA, str. 33-64
38
The end
Similar presentations
© 2024 SlidePlayer.com Inc.
All rights reserved.