Posts

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.

Chess engine visualization

In the previous post Remaking World 1-1 with Vulkan, mostly I’ve shown my progress with learning graphics programming. In the meantime, I finished another project pawn, a UCI protocol “compatible” GUI rendered with Vulkan API. Link to the source code: jan-kelemen/pawn.

The original idea that I had in mind when I started was to allow the player to play against the chess engine and for the board to be rendered in an isometric projection and 2.5D, kind of like IsoChess. This changed a bit along the way, I’ve kept the isometric view of the board, but the pieces and the board are full 3D models, it turns out it’s easier to find 3D models than the ones that would fit into the 2.5D style. The second difference is that the player doesn’t exist, the chess engine plays against itself, I’ll explain the reasons for this later.

Jan Kelemen

Software, mountain bikes and old cars