Projects

Selected projects:

Voxel World C/C++/OpenCL Template

Create games using C/C++ in a world that consists of 1024x1024x1024 voxels, with the ease of creating 2D games. The template offers tiles and sprites, with animation and MagicaVoxel .vox file loading. Jump in as a beginner and recreate your favorites in 3D. Jump in at the intermediate level to add or optimize engine functionality. Jump in at the advanced level to extend the low-level rendering technology in OpenCL, using the existing multi-level voxel grid ray queries.

More information on the project page and in a recent blog post.

Lighthouse 2 / RTX Path Tracing Benchmark

Real-time path tracing demo that lets you measure the path tracing performance of a system. Requires an NVIDIA / CUDA capable device; runs with and without RTX hardware.

More information, videos and downloads on the project page.

Arauna

High-performance Whitted-style ray tracer, designed for multi-core / SIMD-enabled CPUs. Used to build several student games, including “Let There Be Light“, “A Time of Light“, “Pirates on the Edge” and “Outbound“. The center image was rendered for Edge magazine. Arauna is open source and can be used freely.

Downloads: “Arauna“  “Let There Be Light” “A Time Of Light” “Pirates on the Edge”

Brigade 1 Path Tracer

Experimental path tracer, designed for games. Used for several titles, including “Reflect” and “It’s About Time” (later re-implemented using Brigade 2). Brigade 1 uses all CPUs and GPUs for rendering. As Brigade 2 was sold to OTOY, source code for Brigade 1 is no longer available.

Brigade 2 Path Tracer

High-performance path tracer designed for interactive applications.

Downloads: High quality trailer for “It’s About Time” (59MB)

Arauna 2 Path Tracer

Experimental path tracer, with efficient sampling of complex BRDFs and light sources. Video here.

Unity Robot Lab rendered in Arauna2.

Other Projects

Unnamed reference software rasterizer, developed for a course on ray tracing for games for the Czech Technical University in Prague. Features: texture mapping with palette, scene graph, sub-pixel and sub-texel correction.

softrast

Unnamed OpenGL engine with depth of field, shadow mapping for spotlights and point lights, ambient occlusion and screen space reflections.

ogllab

Hatched!: summer family project. Full Android puzzle game, with 64 levels, inspired by Eggerland (HAL). The game was built on a custom C++ framework. Get Hatched! now from the Play Store and become my second customer. 🙂

hatched

And here is a tiny ray tracer, based on some BBC Basic code:

#include<cmath> // sqrt
#include<cstdio> // fopen
int i,p=0,h[]={3<<16,8<<24,0,41944064,8};FILE*f=fopen("o","wb");int
main(){fwrite(h,2,9,f);for(;p<9<<17;){float x=0,T=.2,Y=p%1024/430.-
1,R=p++/327680.-1,E=3,C=1/sqrt(Y*Y+R*R+1),I,t,N,A;Y*=C,I=1|-(Y<0),R
*=C;a:t=x-I,A=T-I,N=Y*t+R*A-C*E,A=N*N-t*t-A*A-E*E+1;N+=sqrt(A);if(N
<0){E+=N*C,x-=N*Y,T-=N*R,t=x-I,A=T-I,N=2*(Y*t+R*A-C*E),I=-I,Y-=N*t,
R-=N*A,C+=N*E;goto a;}fputc(i,f);if(R<0)N=(3-T)/R,i=Y*N,R*=.4-(((i+
int(C*N))&1)+.6);i=R>1?255:R*255;}} // "TINY TRACE" edition - JB'22

A tiny path tracer:

#include"math.h" // sqrt
#include"stdio.h" // fopen
float a,b,c,x,y,z,u,v,w,i,j,d,e,s,t,X,Y,Z,A[1966080]={0};unsigned l,N=0,r=9,p,q
,n=1966080;float U(){r+=r*r|5;return r*4.7e-10f-1;}void I(){float h[]={a,b,c,x,
y,z};q=4,t=n;d=a*x+b*y+c*z;e=d*x-a,i=d*y-b,j=d*z-c;j=e*e+i*i+j*j;d=-sqrt(1-j)-d
;if(j<1&d<t&d>0)t=d,i=3;if(t>24)for(;q;){j=(1-h[--q])/h[q+3];if(j<t&j>0)i=q,t=j
;}}void P(){N++;for(p=0;p<n;){a=b=0,c=-6,x=p/3%1024/90.-7,y=p/3072/80.-4,z=9;j=
sqrt(x*x+y*y+81);x/=j,y/=j,z/=j;l=0,X=Y=Z=1.7;for(;I(),l<9;l++)if(t>24)l=9;else
{a+=t*x,b+=t*y,c+=t*z,u=a,v=b,w=c;if(i<3){u=v=w=0;if(i<2){Y/=4,Z/=4;if(!i)u=-1;
else v=-1,X/=4;}else w=-1;}j=(u*x+v*y+w*z)*2,x-=u*j+U()/6,y-=v*j+U()/6,z-=w*j+U
()/6;if(i<3|U()<0.4){if(i>2)X/=3,Y/=3;x=U()*5-2-a,y=-8-b,z=U()*3-3-c;s=sqrt(x*x
+y*y+z*z);x/=s,y/=s,z/=s;I();d=u*x+v*y+w*z;if(t>24&d>0)d/=s*s/80,A[p]+=d*X,A[p+
1]+=d*Y,A[p+2]+=d*Z;x=U(),y=U(),z=U();s=sqrt(x*x+y*y+z*z);if((d=x*u+y*v+z*w)<0)
s=-s;x/=s,y/=s,z/=s;d/=s/2;X*=d,Y*=d,Z*=d;}}p+=3;}}int main(){FILE*g=fopen("o",
"wb");int h[]={2<<16,2<<28,0,41944064,24},i=0;fwrite(h,2,9,g);for(;i<999;i++)P(
);for(p=n;p;){i=A[--p]/N*255;i=i>255?-1:i;fwrite(&i,1,1,g);}} // JB, Jan 8 2022