3D

I’ve always been interested in 3D, and this is the start of an attempt to write a 3D engine in Java for learning purposes, based on OpenGL and ideally in an immutable function-programming style.

So far I’ve developed a basic-but-functioning 3D renderer, including support for shadows, lighting (directional & point-based), textures and models. Like any renderer, it has help: it uses JAssimp for model loading, OpenGL via the LWJGL bindings for the drawcalls, and an image library for loading textures. Everything else, including all the vector & matrix maths for model, camera and world transforms; the shaders (written in GLSL); and the lighting, colour and texture calculations, are all performed by the renderer.

The first finished project to drop out is a 3D model viewer, in Java. Check it out on Github, including the renderer source.

3D Model Viewer

I’ve also written a micro library for vector and matrix maths in Scala, dorkily named Enter the Matrix. There’s a surprising lack of these, with the existing Scala matrix libraries being heavyweight, rather complex, and generally part of a much large statistical package. I wanted something lightweight for 3D maths. It’s available on Github.