Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I suggest learning and doing the hard way(tm) without acceleration from very primitive rendering techniques moving from basic to advanced, and old to new, gradually

Step -1. Math - Learn about quaternions, frustums, camera matrix, and transformation matrixes.

Step 0. Pixels - Draw pixels / scan lines to a window or display

Step 1. "Triangles" - Draw scan-line aligned trapezoids with a W-/Z-buffer painter's algorithm (back to front). Multiple or single trapezoids in 2D are the results of projected triangles in 3D.

Step 2. Constructive Solid Geometry - Generate triangles given additive and/or subtractive shapes - Cube minus sphere intersecting

Step 3. Lighting and shading - The old school Phong and Gouraud materials and lighting

Step 4. Texture mapping - The math to map a raster image onto triangles

Step 5. Simple MIP mapping - The math to map various resolutions of raster images onto triangles

Step 6. Isotropic (bilinear and trilinear) filtering

Step 7. Anisotropic filtering

Step 8. Bump mapping - Perturb the normals

Step 9. Oversampling (FSAA) - Render on an N-times bigger virtual canvas, apply a kernel reduction matrix (possibly mean average), and copy to the real display area

Step 10. Clipping and culling - Octrees, quadtrees, AABBtree, BVH, BSP, and k-d trees

Step 11. Get fancy with animation



I agree. Any materials you recommend to guide people in each of the steps? Maybe a software 3D renderer that is well written and documented?



Cool. Here's a list of more resources:

https://web.archive.org/web/20170705193028/http://graphics.c...

v-- Vector, matrix, point, color, material, and lighting classes for C++9x, easy to port to C++11 onwards --v

https://web.archive.org/web/20150305000047/http://graphics.i...


If you're willing to spend some money, the classical,

https://www.amazon.com/Computer-Graphics-Principles-Practice...

Don't be scared by the price, it tends to be available on many university libraries, and I guess some 2nd hand deals as well. So that could be a way to try to get hold of it.

First edition used Fortran and Pascal, 2nd edition C, the latest C# and C++ for the samples.


a. Linear algebra: vector and matrix math

b. OpenGL resources here https://www.cs.ucdavis.edu/~ma/ECS175/syllabus.html

c. There are 2 main ways to "make an app" to draw to the screen: webassembly canvas [0] and DirectX/OpenGL native with a library like SDL.

0. https://github.com/aminya/webassembly-canvas

1. https://www.libsdl.org


Abrash's Black Book is worth a read, even if it's not very modern.


thank you so much for this! this is invaluable




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: