computer graphics on gerritâ€™s notes
https://www.wessendorf.org/categories/computer-graphics/
Recent content in computer graphics on gerritâ€™s notesHugo -- gohugo.ioen-usSat, 20 Apr 2019 00:00:00 +0000Computer Graphics Bookmarks
https://www.wessendorf.org/computer-graphics/2019/computer-graphics-bookmarks/
Wed, 02 Jan 2019 00:00:00 +0000https://www.wessendorf.org/computer-graphics/2019/computer-graphics-bookmarks/ People Jendrik Illner (twitter) Peter Shirley (twitter) Morgan McGuire (twitter) Inigo Quilez (twitter) Real-Time Rendering Open Problems in Real-Time Rendering Physically Based Rendering (PBR) GitHub: Enterprise PBR (Physics Based Rendering) Shading Model Zink Zink Is Moving Ahead In 2019 As Mesa-Based OpenGL-Over-Vulkan Ray Tracing An Introduction to Ray Tracing, 1989 free for download
Ray Tracing Gems Preview
Computational Photography Computational periscopy with an ordinary digital camera (github) Ray Tracing S01E07
https://www.wessendorf.org/ray-tracing/ray-tracing-s01e07/
Sat, 20 Apr 2019 00:00:00 +0000https://www.wessendorf.org/ray-tracing/ray-tracing-s01e07/Multiple Objects So far the scene included only a single sphere set in the center. In this episode we’re going to add support for multiple objects in a scene. This could be done with an array of sphere objects, but a cleaner solution is to use an abstract class for anything a ray can hit, may it be a single sphere, a list of spheres, triangles, boxes, etc.
The hittable abstract class has a hit function that takes the ray r, a range of t from $t_{min}$ and $t_{max}$ and a hit_record structure.Ray Tracing S01E06
https://www.wessendorf.org/ray-tracing/ray-tracing-s01e06/
Fri, 19 Apr 2019 00:00:00 +0000https://www.wessendorf.org/ray-tracing/ray-tracing-s01e06/Surface Normals The sphere I added in the last episode was rendered as a flat red circle. In the following step I’m going to add a surface normal to shade the sphere.
Surface normals are used for several purposes in graphics, primarily for lighting. A surface normal is a vector that is perpendicular to the surface at a given point. This vector can either point outward or inward. They usually point outward by convention, but inward pointing normals can be useful, for example, to distinguish between solid spheres and spherical bubbles.Ray Tracing S01E05
https://www.wessendorf.org/ray-tracing/ray-tracing-s01e05/
Thu, 18 Apr 2019 00:00:00 +0000https://www.wessendorf.org/ray-tracing/ray-tracing-s01e05/Adding a Sphere Episode 4 introduced a ray class. Now it’s time to let the ray hit the first object: a sphere.
The equation of a sphere centered at the origin is[1]
\[ x^2 + y^2 + z^2 = R^2 \]
which is essentially derived from Pythagoras’ Theorem extended to three dimensions.[2]
For any \( (x,y,z) \), if \( x^2 + y^2 + z^2 = R^2 \) then \( (x,y,z) \) is on the sphere, otherwise it’s not.Ray Tracing S01E04
https://www.wessendorf.org/ray-tracing/ray-tracing-s01e04/
Wed, 17 Apr 2019 00:00:00 +0000https://www.wessendorf.org/ray-tracing/ray-tracing-s01e04/The Ray Class In episode 3 I added a vec3 class to help with 3-dimensional vector calculations.
This chapter moves it one step further by introducing a new ray class. A ray can be thought of as a function
\[ p(t) = A + t * B \]
where p is a 3D position along a line, A is the ray origin, B is the ray direction, and t is the ray parameter which moves p(t) along the ray.Ray Tracing S01E03
https://www.wessendorf.org/ray-tracing/ray-tracing-s01e03/
Tue, 16 Apr 2019 00:00:00 +0000https://www.wessendorf.org/ray-tracing/ray-tracing-s01e03/The vec3 Class In episode 1 I made a simple image by assigning rgb values to individual variables in a loop across the x- and y-coordinates.
This example produces the same image, but it introduces the vec3 class to perform calculations with 3-dimensional vectors. To keep it simple, this class can be used for x, y, z-coordinates as well as r, g, b-color values. There are getter methods for both x, y, and z as well as r, g, b.Ray Tracing S01E02
https://www.wessendorf.org/ray-tracing/ray-tracing-s01e02/
Mon, 15 Apr 2019 00:00:00 +0000https://www.wessendorf.org/ray-tracing/ray-tracing-s01e02/Other Image Formats with stb_image.h The stb_image.h single-file library makes it pretty easy to write and convert images to other file formats. I love the simplicity of the PPM format, but it’s not very web-friendly. If you want to share the image you will likely end up having to convert it to a different format.
Here’s a sample in C++:
// stb-example.cpp #include <iostream> #define STB_IMAGE_IMPLEMENTATION #include "stb_image.h" #define STB_IMAGE_WRITE_IMPLEMENTATION #include "stb_image_write.Ray Tracing S01E01
https://www.wessendorf.org/ray-tracing/ray-tracing-s01e01/
Sun, 14 Apr 2019 00:00:00 +0000https://www.wessendorf.org/ray-tracing/ray-tracing-s01e01/Introduction The following series of posts will document my learning journey to building a ray tracer.
I will begin with Peter Shirley’s excellent book Ray Tracing in a Weekend and his following two volumes Ray Tracing - The Next Week and Ray Tracing - The Rest of Your Life. I found the first book on Amazon Kindle some time ago, but it’s now available for free at raytracing.github.io.
This series will not be limited to these books alone.Making a Heart with Maths
https://www.wessendorf.org/computer-graphics/2017/making-heart-with-maths/
Sun, 26 Feb 2017 00:00:00 +0000https://www.wessendorf.org/computer-graphics/2017/making-heart-with-maths/Inigo Quilez (iq) explains how to model a simple heart with mathematics. Shadertoy code and real-time version can be found here.
I love how he embedded the model into the video.
Need to explore how to develop plugins for AfterEffects.
Jim Fowler, Professor at Ohio State University applied a similar technique in his Calculus course on Coursera. He used the old ray tracing tool POV-Ray with ArUco, a library for augmented reality applications.