🖥️

Computer Graphics (CG)

Tags
Created
Updated

Resources

Artistic skills and product management

https://www.khanacademy.org/computing/pixar/

Fundamentals of computer graphics

https://www.youtube.com/watch?v=-LqUu61oRdk&list=PLQ3UicqQtfNuBjzJ-KEWmG1yjiRMXYKhh&ab_channel=JustinSolomon

https://www.cs.middlebury.edu/~candrews/classes/cs461/

https://www.scratchapixel.com

Fundamentals of Computer Graphics, 4th Edition. ISBN 9781315360201

Interactive Computer Graphics A Top-Down Approach with WebGL Edward Angel and Dave Shreiner Seventh Edition, Addison-Wesley 2015

https://www.youtube.com/c/InigoQuilez/videos

https://graphtoy.com/

Software packages (Blender)

https://cgcookie.com/lesson/intro-to-blender-and-cg-cookie

https://www.youtube.com/watch?v=kSrqpVZ1raY&list=PLn3ukorJv4vuU3ILv3g3xnUyEGOQR-D8J&index=5&ab_channel=GrantAbbitt

https://www.youtube.com/c/GlebAlexandrov/playlists

Libraries

https://learnopengl.com

Videogames

"Some people think games are kid's stuff, but gamedev is one of the few areas that uses almost every item of the standard CS curriculum."- Dr. Sepideh Chakaveh

https://www.conted.ox.ac.uk/profiles/sepideh-chakaveh

Meaning

History of Computer Graphics

https://deseng.ryerson.ca/dokuwiki/mec222:brief_history_of_computer_graphics

The world of computer graphics

Research

https://www.youtube.com/watch?v=cw88Y36qgDg&ab_channel=SilviaSellán

CG industry

Actual ecosystem

GitHub Repository

https://github.com/sanchezcarlosjr/computer-graphics/

Examples

https://cg.sanchezcarlosjr.com/

How do I render my models when don’t have enough computational power?

Render farm

https://www.sheepit-renderfarm.com

How Many FPS Can the Human Eye See? and Frame rate

30-60 is an animation.

Description and ecosystem

People

Frank Thomas

Johnston

https://frankandollie.com/

Disney's Nine Old Men

Disney Legends

Multimedia and blobs

PDF, SVG, ...

Visual system

https://www.geogebra.org/calculator/vuvjfafb

Introduction

Math

Bitmap

Raster images

Images are presented on some raster display. So, raster images are the most common way to store and process images.

Raster means converting vector images to pixel images.

Raster displays:

https://en.wikipedia.org/wiki/Bayer_filter

Render means generating from a 3D model, 2D model, or effects to an image by a computer program. Raster displays show images as rectangular arrays of pixels. A raster image is a 2D array that stores the pixel value for each pixel.

Render programs:

Rasterization, Ray Tracing, and Ray Tracing are rendering techniques.

Rendering Equation.

Vector images vs raster images

Rendering

Perspective

Ray Tracing

In computing, Ray Tracing is a process that draws a set of objects producing an array of pixels. From a material way, rendering means converting 3D objects to 2D images into realistic images, which considers how each object contributes to each pixel. So, if you want it, you need an image-order algorithm called Ray Tracing. Reversing reality, it takes an image based on the camera geometry, known as an array of pixels, running through each pixel in the image shoots rays through the normal surface, checking every object of the scene to see if it intersects with any of them. Also, it computes the pixel color based on the results of the ray intersection. My implementation of the algorithm in pseudocode, thanks to Appel:

for each pixel on the scene based on the camera geometry do
	compute the ray direction
	find first object hit by ray and its surface normal
	compute illumination
	calculate color

https://www.desmos.com/calculator/s4zfc085d4

Notes

https://www.khanacademy.org/computing/pixar/rendering

“Ray Tracing in One Weekend.” raytracing.github.io/book/RayTracingInOneWeekend.html (accessed Feb. 21, 2022)

https://en.wikipedia.org/wiki/Netpbm#File_formats

https://developer.mozilla.org/en-US/docs/Web/API/Canvas_API/A_basic_ray-caster

Properties of lighting & Light rays

There are properties of lighting and lights rays. So this lesson is about the spotlight, diffuse reflection, specular reflection, refraction, shadows rays, and how does work light rays with different mediums.

* Spotlight means the intensity of a lamp. When the light comes from directly a source, it's called direct illumination. Otherwise, it's called indirect illumination, that is, either refraction or reflection.

Direct illumination

* Refraction signifies the change in direction of light passing from one medium. For example, a glass with water.

* Ray tracing determines shadows rays from the object intersection to the light source.

https://smartclass4kids.com/refraction-of-light/

* The camera is a factor to determine the brightness and racy tracing -image plane-.

Rasterization and his graphic pipeline

The process of taking a primitive, generally a triangle, and figuring out which pixels it covers is called rasterization

https://www.youtube.com/watch?v=t7Ztio8cwqM

https://ocw.mit.edu/courses/electrical-engineering-and-computer-science/6-837-computer-graphics-fall-2012/lecture-notes/MIT6_837F12_Lec21.pdf

Notes

https://www.scratchapixel.com/lessons/3d-basic-rendering/rasterization-practical-implementation

Transformations

Geometric transformations and projections in computer graphics are linear transformations such that they are matrices, so we will be able to operate on Linear Algebra ideas. As shown below

Ta=[100vx010vy001vz0011]T_a=\begin{bmatrix} 1 & 0 & 0 & v_x \\ 0 & 1 & 0 & v_y \\ 0 & 0 & 1 & v_z \\ 0 & 0 & 1 & 1 \\ \end{bmatrix}

is called translation.

Tap=Ta[pxpypz1]=[px+vxpy+vypz+vz1]T_ap=T_a \begin{bmatrix} p_x \\ p_y \\ p_z \\ 1 \end{bmatrix} = \begin{bmatrix} p_x+v_x \\ p_y+v_y \\ p_z+v_z \\ 1 \end{bmatrix}
Tb=[x000y0001]T_b=\begin{bmatrix} x & 0 & 0 \\ 0 & y & 0 \\ 0 & 0 & 1 \end{bmatrix}

is called scaling.

Tbp=Tb[pxpy1]=[xpxypy1]T_bp=T_b \begin{bmatrix} p_x \\ p_y \\ 1 \\ \end{bmatrix} = \begin{bmatrix} xp_x \\ yp_y \\ 1\end{bmatrix}
Tc=[cosθ−sinθ0sinθcosθ0001]T_c=\begin{bmatrix} cos \theta & -sin \theta & 0 \\ sin \theta & cos \theta & 0 \\ 0 & 0 & 1 \end{bmatrix}

is called rotating.

Tcp=Tc[pxpy1]=[pxcosθ−pxsinθpysinθ+pycosθ1]T_cp=T_c \begin{bmatrix} p_x \\ p_y \\ 1 \\ \end{bmatrix} = \begin{bmatrix} p_x cos \theta - p_x sin \theta \\ p_y sin \theta + p_y cos \theta \\ 1 \end{bmatrix}

We are ready to introduce composite transformations, i.e. multiply matrices. TaTbT_aT_b means applying translation and after scaling. How we can check TaTb≠TbTaT_aT_b \neq T_bT_a, but Ta1Ta2=Ta2Ta1T_{a1}T_{a_2} = T_{a2}T_{a_1} and Tb1Tb2=Tb2Tb1T_{b1}T_{b_2} = T_{b2}T_{b_1}.

How does a low-level library work?

https://github.com/nothings/single_file_libs
https://github.com/nothings/stb

Blender

https://git.blender.org/gitweb/

Storytelling

Color

Camera

Virtual cameras work similar way to real cameras simulating optics and their behavior. The camera lens is about focal length, f-stop, diameter, and their relationship is fstop=focal lengthdiameterf_{stop}=\dfrac{\text{focal length}}{diameter}. Focal length is the distance between the lens and focal point on mm, and it’s possible manipulating in-camera with Lens Curvature. Diameter measures the diameter of the aperture on mm. Focal length classifies as a natural view (~50mm), narrow view (~150mm), and wide view (~28mm).

Another hand, the Depth of field is a region where the objects in a scene are in focus. It determines choosing of a lens, aperture, and f-stop. A narrow depth of field gets by a small f-stop. A wide depth of field gets by a bigger f-stop.

Animation

Bouncing Ball Equation

Raster images

Ray tracing

Linear Algebra

Viewing

Image-based rendering

https://www.inf.ufrgs.br/~oliveira/pubs_files/RITA_IBMR.pdf

https://graphics.stanford.edu/courses/cs248-05/IBR/IBR.pdf

https://pages.cs.wisc.edu/~dyer/cs534/papers/ibr-survey.pdf

Animation

Twelve basic principles of animation

Disney Animation: The Illusion of Life

The Graphics Pipeline

Date:

Topic: Rasterization

Recall

How does a developer write his own animation?

The developer writes vertices and modes -geometric objects, and the computer interpolates.

Curves? Chain of line segments.

Polygons? Break them up into triangles.

Notes

  • INPUT: Geometric primitive by clipper.
  1. It enumerates the pixels.
  1. It interpolates values.
  • OUTPUT: A set of fragments -pixels, with their information, including color, location, and depth- for each primitive in the frame buffer.
  • A raster is a matrix of pixels.
  • Geometric primitive to pixels is called rasterization.
  • Triangles are the most often used primitive.
  • A fragment shader is a shader about fragments.
  • A vertex shader is a shader about vertices.
  • A shader is a program that runs over GPU.
📌
SUMMARY: The computer draws objects converting objects to pixels, so the central operation is rasterization—NO printer algorithm.

Date:

Topic: Clipping

https://www.tutorialandexample.com/clipping-in-computer-graphics

Recall

Square is the computer screen.

Notes

  • It’s implemented to improve rendering performance.
  • ...
📌
SUMMARY:

Clipping is a process to remove o disabling objects within a defined region of interest, generally outside the computer screen or viewing pane.


References

Worked examples

Pipeline

Textures

Data Structures

Curves

Animation

Computer Graphics in Games

Visual perception

Imaging systems, visual science, and computer vision

oPhysics
Description This is a simulation demonstrating the optics of the human eye. It also shows how various lenses can be used to correct for faulty vision. Be aware that it is a simplified version of what actually happens. In the simulation, there is no bending when light moves from the air into the eye (when most of the actual bending happens).
https://ophysics.com/l16.html

https://zillalib.github.io/