Scratch A Pixel
Following excellent scratchapixel.com ❤️
19 flashcards · Computer Science · by lakesare
What's a voxel?
The three-dimensional analogue of a pixel.
[Mathematics] What's an implicit equation?
Implicit equation is a relation of the form R(x1,…, xn) = 0 Where R is a function of several variables (often a polynomial). For example, the implicit equation of the unit circle is x2 + y2 − 1 = 0.
[Mathematics] What's an implicit curve VS implicit surface?
Implicit curve: F(x, y) = 0 Implicit surface: F(x, y, z) = 0 Implicit surfaces are very useful in modeling but are not very common (and certainly less common than they used to). It is possible to use implicit surfaces to create more complex shapes (implicit primitives such as spheres, cubes, cones, etc. are combined through boolean operations), a technique called constructive solid geometry (or CSG). Metaballs (invented in the early 1980s by Jim Blinn) is another form of implicit geometry used…
Why do we use a one-point perspective projection in computer graphics?
This is generally how we do things in CG because this is how the eyes and cameras work (cameras were obviously designed to produce images similar to the sort of images our eyes create). But in the art world, nothing stops you from coming up with totally different rules. You can in particular get images with several (two, three, four) points perspective.
What's frustum in geometry?
Portion of a solid (normally a cone or pyramid) that lies between 2 parallel planes cutting it.
What's a viewing frustum in computer graphics?
The frustum is the pyramid defined by tracing lines: from each corner of the canvas towards the eye, and extending these lines further down into the scene (as far as the eye can see). You can can easily see that the only objects visible to the camera are those which are contained within the volume of that pyramid. By changing the size of the canvas we can either extend that volume or make it smaller. The larger the volume the more of the scene we see. If you are familiar with the concept of foc…
What's the perspective projection matrix?
It's a matrix which when applied to points, projects them to the canvas.
P' is the projection of P on the canvas. Find P'.y if we know P.y and P.z.
ABC and AB'C' triangles are similar (angle A & ⟂ angle). Then BCAB=B′C′AB′{ BC \over AB } = { B'C' \over AB' }ABBC=AB′B′C′ . We make AB' = 1 to ease the calculation. "This is purely a convention to simplify this demonstration" So P'.y is: The same principle can be applied to P'.x: This is called a perspective divide, or z-divide.
What's a perspective divide, or z-divide?
It's a relationship: that lets us find the projection P' of point P.
Name 2 main methods for hidden surface determination. There are many names for hidden surface elimination: hidden surface determination, occlusion culling and visible surface determination.
Rasterization z-buffering algorithm This is probably the most commonly used one from this category. The REYES algorithm which we present in this section implements the z-buffer algorithm. It is very similar to the technique we described in which points on the surfaces of objects (objects are subdivided into very small surfaces, or fragments which are then projected onto the screen), are projected onto the screen and stored into depth lists.Painter algorithm Newell's algorithm Ray-tracing. Raste…
What's the difference between rasterization ray-tracing?
rasterization - we know P, we project P onto the canvas to compute P'. Perspective projection matrix is therefore needed.ray-tracing - we know P', we trace a ray passing through P' to find P. Obviously we don't need to project P anymore with this approach since we already know P', which means that in ray tracing, the perspective projection is actually technically not needed (and therefore never used).
How to go from Normalized Device Coordinates (NDC) to the raster space? Normalized device coordinates or NDC space is a screen independent display coordinate system; it encompasses a cube where the x, y, and z components range from −1 to 1.
Multiply the normalised coordinates by the image dimensions, and round them to the nearest integer. Once converted to NDC space, converting the point's coordinates to raster space is trivial: just multiply the normalised coordinates by the image dimensions, and round the number off to the nearest integer value (pixel coordinates are always round numbers, or integers if you prefer).
Describe the rasterization method of hidden surface determination.
Find the pixel each point maps to, and store the distance of that point to the eye in the depth list. This special list of depths maintained by each pixel is sometimes called the depth list.Sort each pixel's z-indexes. At the end of the process, sort the points in the list of each pixel, by order of increasing distance. The result of this process is that obviously, the point visible for any given pixel in the image, is the first point from that pixel's list. The concept of ordering objects in d…
In the rasterization method of hidden surface determination - why do we need to keep a list of z-indexes instead of remembering the closest index?
To account for transparency. What happens if they are not fully opaque? Clearly, if several semi-transparent points project to the same pixel, they may be visible throughout each other. In this particular case, it is necessary to keep track of all the points visible through that particular pixel, sort them out by distance, and use a special compositing technique (we will learn about this in the lesson on the REYES algorithm) to blend them correctly.
In case of transparent objects, - what happens to the light?
It's mostly reflected and transmitted. In the case of transparent objects (imagine a pane of glass for example), light is reflected and refracted. The term transmitted is also often used in place of refracted, but the terms means two slightly different things. By transmitted we mean, a fraction of the incident light enters the object on one side, and leaves the object on the other side (which is why we see objects through a window). However, as soon as it comes in contact with the surface of a…
What's subsurface scattering?
It's a technical term for translucency.
What's meant by saying that diffuse interaction is view-independent, while specular interaction is view-dependent?
diffuse surface - appears equally bright from all viewing directions. specular surface - brightness varies with viewing direction. Diffuse surface appears equally bright from all viewing directions, but a specular surface's brightness varies with the viewing direction (if you move around a mirror, the image you see in the mirror will change).
Why is Ray Tracing better than Rasterisation? Or Is It Actually Better?
If you use rasterisation for the visibility, you will need another method to compute global illumination. So while it's not impossible to compute GI (global illumination) if you don't use ray tracing, not doing so though requires a mismatch of techniques which is clearly less elegant. Rasterisation is still the method by which graphics card render 3D scenes. However to conclude, there's very little doubt though, that, all rendering solutions will ultimately migrate to ray tracing at some point…
What are these called?
Caustics. Caustics produced by a glass of water Caustics made by the surface of water