Goxel Voxel Editor Internals - Part 2: voxel data structure

In this second part of my series about goxel voxel editor internals, I will talk about the way voxel data is stored in memory. As usual, all the code is open source and accessible on the github repo. The voxel models are composed of many individual voxel, each of them having a color. For the structure of the voxel I wanted: Optimized memory usage: if a model is large but composed of few voxels I don’t want to use extra memory for the empty spaces....

2017 March 13

Goxel Voxel Editor Internals - Part 1: voxels and pixels

This is the first in a series of posts I want to write about the technical aspect of writing a voxel engine / editor. I wrote a free and open source voxel editor available on github, and I wanted to share the things I learned in the process. Today’s post is just an introduction, where I am going to talk about the evolution of computer graphics and the advent of voxels....

2017 March 9

Introducing Noctua Sky

I just released Noctua Sky, a new project I am working on. This is an online planetarium (or sky map) software similar to the open source project Stellarium made by my brother. The goal of the project is ultimately to provide a set of tools and API for amateur astronomers to share their observations online. The first step toward this is to create a JavaScript planetarium that can run directly on the browser....

2017 March 1

Swift vs C++: lambda functions

Recently I got interested in the new Apple language Swift, that will probably replace objective-c as the language of choice for native iOS and OSX applications. There are many things I like in Swift, and also other things I don’t like. But one thing that I really enjoy is the support for lambdas, specially compared to the way it works in C++. Why do I think the lambdas in swift are better?...

2016 November 12

Hacking Doom code for transparent POV display

Doom (the original version), is not only one of the best game ever made, but it’s also a great example of C code. Thanks to id Software decision to release the code as open source in 1999, anybody can have a look and modify it. I had this project of changing the rendering of doom, to add a border effect to the walls, or cel shading. You can check the video at the end of this post to see why I wanted to do this to start with....

2016 September 2

Unit Tests in C with the constructor attribute

In one of my project, I used GNU constructor attribute to add some simple unit tests to any C file. I liked this approach, but I don’t see many open source projects using anything similar, so I though I’ll describe it here. Here is an example of a C file containing a function: ... // Test if a string ends with an other string. // If any of the string if NULL, return false....

2016 September 2

Keeping notes in unformatted text files

For years I have been looking for the best way to keep organized notes on my computer(s). I tried a lot of different approaches, from web based tools to emacs org mode and desktop wiki. Now I think I can say that I found the best way (for my personal case) to do it: I keep all my notes as unformatted text files, in a single flat directory. Here is how it works: I have a directory Notes in my computer home folder....

2016 July 25

Goxel 0.3 Released

I just released the version 0.3.0 of my open source voxel editor Goxel. This release brings: Import/Export support for the popular editor Magica Voxel. Render shadows. Better shapes support, specially when we use marching cube rendering. Multiple palettes. Better UI, with new tools icons. Here is a video of the laser tool:

2016 July 9

OpenCV Camera to OpenGL Projection

I am sure some people are hitting their heads trying to solve this simple problem when doing augmented reality with OpenCV and OpenGL: How to get the proper OpenGL projection matrix from the OpenCV camera calibration values? For the simple common case where the OpenCV camera matrix has the form: |fx 0 cx| |0 fy cy| |0 0 1| The corresponding OpenGL projection matrix can be computed like this:...

2016 March 23

Goxel 3D procedural rendering

In this post I introduce a new experimental feature I am adding to goxel: procedural voxel generation. For this I created a mini language specifically designed to describe drawing operations. Think of it as the logo language, but in 3D. Note: this is still experimental at this point, so anything in the language could change in the future. I will try to keep this page up to date as a reference documentation....

2016 March 10