Graphical Rendering
Graphical rendering is the process of generating images from modelled objects, also reffered as Viewing.
Graphical rendering produces 2D views of objects from 3D models.
Graphical rendering algorithms vary based on the way we model objects. If the object is modelled through polygons, it is referred as polygonal rendering or polygonal mesh rendering (多边形网格渲染).
How to visualize an object view with computer graphics
An object is first modelled in 3D, set in a certain 3D space and then the 3D space and the object (scene model) are viewed through a rendering process. (先 Modelling,再Rendering)
Painting Metaphor
The Painting Metaphor (绘画隐射???中文实在不知道是什么) describes the Ray Casting process by simplifying the procedure a printer uses to draw an observed scene.
3 Main Steps:
- Look through the frame
- choose color
- print the cell
To perform the step nr. 2 a ray needs to be drawn from user’s eye through the cell intended to be painted. The color of the cell will be that of the object portion the drawn ray will hit.
If the pixel represents a object portion containing different colours, one can only consider the colour of the ray passing through the centre of the pixel or an average colour can be estimated from the 4 rays passing through each pixel’s corners.
Ray Casting
射线取色
process:
- Sending a ray through the pixel
- Stop at first object the ray hits
- Take the pixel color of that object
- If the ray doesn’t hit any object, the pixel is set to background color
Ray Tracing
Ray tracing is a computer graphics process that consists of:
- Following the light for a pixel backward
- For each pixel, send out a ray to find out where its light comes from
- If the ray hits an object, send out one or more rays to find out where the object’s light came from
- Repeat the process if these rays hit other objects
- Stop if the ray hits a light sourse
Advantages:
Ray tracing is a method allows you to create photo-realistic images on a computer because the fact that it process approximately reproduces the natural process of light interaction.
It can reproduce reflections, refractions/transprencies and shadows.
Disadvantages:
- The algorithm is complex and it is slow to process
- Need to model reflections, refractions and shadows for transparent objects
- Need to limit depth of recursion (递归):
Typically 5 to 10 generations
Further recursion will not significantly change the pixel color - It is a pixel-based rendering, which means that the rendering speed depends on the image size
- Shadows appears too sharp, surface too glossy or smooth