What is a wireframe model? What is the other option called?
If triangles are rendered without considering their depth order, we refer to the result as wire-frame model
Otherwise we refer ti it as surface model
How does the painter’s algorithm work?
What’s the issue?
Assumption is that the depth order is known. Simply render the surface in the same order (from back to front)
Cycles occur if a back to front ordering is not possible for a particular position
How do binary space partitioning trees work?
What is necessary for it to work?
We basically create a plane for one random triangle, then we check from a reference point e what is in front and the back of the plane. We store those areas in a tree and then again check those areas for front and back resulting in a tree structure which can be taken for how to render
No surface crosses the plane of another surface, but can be relaxed through pre-processing by cutting the other triangle into multiple triangles to satisfay our condition
You have two triangles, T₁ with plane function f₁(p) and T₂ entirely on the f₁(p) < 0 side of T₁’s plane.
How do you classify a point p against a triangle’s plane, and how do you decide whether to draw T₁ before T₂ or vice versa, given the eye location e?
Implicit plane equation for triangle with vertices a, b, c:
f(p)=0: p lies on the plane
f(p)>0: p is on the “front” side
f(p)<0: p is on the “back” side
Rendering order rule (since T₂ is entirely on the f₁(p)<0 side of T₁’s plane):
If f₁(e)<0, draw T₁ first, then T₂.
Otherwise (f₁(e)\ge0), draw T₂ first, then T₁.
What is the benefit of bsp trees?
It works for any viewpoint e and can be therefore be pre-computed for static scenes and traversed for moving cameras during runtime
Good for static sceneries in games
How can we handle the triangle intersection for bsp trees?
How can you calculate the intersection point a and b?
How does z buffer work?
Each pixel stores the depth of the closest traingle that has been rasterized so far (infinity/large value at initial stage)
If a new triangle has a lower depth value at a particular pixel the pixel content and its Z value are replaced
What does rasterization describe?
For projecting scene points on rasterdisplays, they will not necessarily map exactly to the discrete pixel position. We have to apply interpolation and discretization basically. checking how can we best fit our shape (e.g. line to the pixels)
Explain the midpoint algorithm
Explain howh to make use of the parametric line equation
We have a midpoint between two pixels and based on whether the point is above or below the line the pixel that gets lighted is chosen. -> Draws the thinnest line possible without gaps
Compute t and then compute y. Then round y to the nearest pixel
How does interpolation in barycentric coordinates work?
We extend the parametric line equation to beta and gamma instead of just t
beta and gamme must be between 0 and 1
How can we decide whether a pixel is in the triangel or not?
by brutforcing by calculating the x y coordinates via the beta and gamma values -> not efficient to do for whole screen
What is aliasing and what can we do about it?
One problem with all of these rasterization techniques, is that lines or edges of triangles appear jaggy
Antialiasing -> Apply a box filter or convolution to smoothen the edges or calculate the frame multiple times with a slight offset and overlay them
What is alpha blending and how can we do alpha blending?
It is used for bleding together differntly rasterized portions (allows to simulate simple transparency effects)
Zuletzt geändertvor einem Monat