Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ssloy/tinykaboom
A brief computer graphics / rendering course
https://github.com/ssloy/tinykaboom
3d 3d-graphics c-plus-plus computer-graphics cpp fun graphics graphics-programming learning raytracer raytracing raytracing-engine rendering rendering-engine shaders tutorial
Last synced: 5 days ago
JSON representation
A brief computer graphics / rendering course
- Host: GitHub
- URL: https://github.com/ssloy/tinykaboom
- Owner: ssloy
- Created: 2019-01-27T13:03:40.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2023-02-22T02:44:54.000Z (almost 2 years ago)
- Last Synced: 2024-11-30T04:02:35.380Z (13 days ago)
- Topics: 3d, 3d-graphics, c-plus-plus, computer-graphics, cpp, fun, graphics, graphics-programming, learning, raytracer, raytracing, raytracing-engine, rendering, rendering-engine, shaders, tutorial
- Language: C++
- Homepage: https://github.com/ssloy/tinykaboom/wiki
- Size: 10.6 MB
- Stars: 2,360
- Watchers: 52
- Forks: 107
- Open Issues: 2
-
Metadata Files:
- Readme: Readme.md
Awesome Lists containing this project
- awesome-list - tinykaboom - KABOOM! in 180 lines of bare C++. (CG Tutorials / Data Management)
README
# KABOOM! in 180 lines of bare C++
This repository is a teaching aid for my computer graphics lectures. It is not meant to produce the ultimate or even physically realistic renders. It is meant to be **simple**. This project is distributed under the [DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE](https://en.wikipedia.org/wiki/WTFPL).
**Check [the article](https://github.com/ssloy/tinykaboom/wiki) that accompanies the source code.**
This project is closely related to my [software raytracer](https://github.com/ssloy/tinyraytracer/wiki). If you are looking for a software rasterizer, check the [other part of the lectures](https://github.com/ssloy/tinyrenderer/wiki).
In my lectures I tend to avoid third party libraries as long as it is reasonable, because it forces to understand what is happening under the hood. So, the raytracing in 180 lines of plain C++ produces this result:
![](https://raw.githubusercontent.com/ssloy/tinykaboom/master/out.jpg)## compilation
```sh
git clone https://github.com/ssloy/tinykaboom.git
cd tinykaboom
mkdir build
cd build
cmake ..
make
```You can open the project in Gitpod, a free online dev evironment for GitHub:
[![Open in Gitpod](https://gitpod.io/button/open-in-gitpod.svg)](https://gitpod.io/#https://github.com/ssloy/tinykaboom)
On open, the editor will compile & run the program as well as open the resulting image in the editor's preview.
Just change the code in the editor and rerun the script (use the terminal's history) to see updated images.## Homework
The possibilities are infinte. For example, you can add the environment map and some transparency:
![](https://raw.githubusercontent.com/ssloy/tinykaboom/homework_assignment/envmap1.jpg)Add other objects and illuminate them:
![](https://raw.githubusercontent.com/ssloy/tinykaboom/homework_assignment/envmap2.jpg)