Posts

I See Spheres Now

Since I had never actually written a raytracer, I wanted to learn about this topic by following along with the popular Ray Tracing in One Weekend book. The title doesn’t lie, my first CPU raytracer did take only one weekend.

Afterward, I tried making the same raytracer using a compute shader and with the possibility to move around the scene in real time. Results are in the video below, link to the source code: jan-kelemen/beam

Rendering Medvednica From a Heightmap

Na Sljeme, na Sljeme na Sljeme…. I started this project to explore the usage of Bullet’s btHeightfieldTerrainShape collision shape, initial idea was to generate a heightmap using Perlin noise. I ended up using a static heightmap as I didn’t like the results I was getting with the terrain generated from using plain noise.

Results are in the video below, Link to the source code: jan-kelemen/soil

Heightmaps

Heightmaps are images that are used to represent the height of a terrain. Values taken from this image are mapped to a rectangular grid, combining these two things gives us a coordinate in 3D space. Brighter values represent a higher point in the space. Below is the image I’ve used for this project, although you can generate a heightmap for any point of Earth with a site like manticorp.github.io/unrealheightmap.

It Goes In The Square Hole

I gave a hint that I wanted to study how to do mouse picking in a 3D environment properly. For that, I’ve chosen to go with the route of raycasting from the mouse position into the scene and remake the scene from the popular video The Original Square Hole Girl Video + The Redemption. Link to the source code: jan-kelemen/geos

You can see the results in the video below.

Mouse picking

As mentioned, mouse picking is implemented by raycasting. For this, I’ve started with a single cube with 2x2x2 dimensions, also known as the default Blender cube. This was much easier to start since the dimensions it uses are trivial to debug if some part of the calculation isn’t correct.

Jan Kelemen

Software, mountain bikes and old cars