Projects by JT Schafer

Meridian (2013)

Lately I’ve been experimenting with building an extremely high quality path tracer in C++. I needed to add some CGI effects to a film I’ve been working on and quickly realized that I could write my own renderer to produce images with a higher quality than any of my outdated 3D software could produce. Meridian is the result. The goals for the project were to keep the code as clean and simple as possible, to not use any libraries to make running on different platform painless and to produce the highest quality images possible. So far I have full global illumination, custom BRDFs, refraction and motion blur implemented.

The interesting part about the renderer is that it does not use polygons. The scene is represented as a signed distance field (SDF) which is constructed algorithmically. Objects can be defined in C++ by overriding methods to control the SDF value as well as the BRDF. This makes it easy to construct certain kinds of objects but quite hard to render anything that can’t easily be defined procedurally.

I am currently building a compiler that will be used for a scripting language for defining objects in Meridian. This will make it easier to quickly visualize the output of the procedural algorithms since the program won’t have to be recompiled. Eventually this will be incorporated into an IDE that can automatically display the output of the script.

Even though performance wasn’t a major consideration when building Meridian, path tracing is always slow so it would be nice to speed up the program. I am currently investigating noise reduction techniques to allow fewer samples to be used per pixel while still attaining a higher image quality.

Multi-core support has been added with OpenMP. The renderer can scale to any number of cores linearly. Meridian has also been run on Amazon’s cloud servers.

Musicator (2009)

Musicator is a simple music sequencer that can be played with the computer keyboard. The top row of letters act as the white keys and the numbers act as the black keys. Multiple tracks with different instruments can be added to the project. Instruments are defined with a simple text file which specifies a .wav file to use as a sample as well as in and out points for looping and fading.

Musicator’s sound processing library was built in C++ with XAudio2 and its UI was built with WinForms in C#. The application uses C++/CLI to interface the two components.

Pigeon (2009)

Pigeon stands for Pretty Insane Gaming Electronic Online Network. That doesn’t make too much sense but that’s fine because it spells pigeon. Back in 2009 I wanted a platform to be able to create simple games and have them run on any platform that could run .NET code (which admittedly isn’t an overwhelming number). I accomplished this by writing a full set of APIs to write games with in C#. This included keyboard input, mouse input, display and networking. These APIs were then implemented in standard .NET and Silverlight. Games could then be uploaded to my website and the .NET assemblies could be downloaded with the Pigeon client on standard .NET, Silverlight or Mono. The games could request content to be streamed from the server as they needed it. This allowed the initial download to remain small.

Since the Pigeon display API was just a function taking a byte array for the pixel values of the screen, I ended up writing 2D and 3D graphics libraries for use with Pigeon games. Both were fast enough to be used in real-time, even in managed code. The 3D graphics library included a software rasterizer with support for perspective correct texture mapping and tessellation.

The Pigeon networking API handled multiplayer lobbies on the server. Users could then see game specific info on my website. Since the graphics APIs were written in C#, I could even perform remote rendering on the server and create a jpeg of a user’s current game session that could be displayed on my website.