Front Page Archive

Cessen's Ramblings

2014 - 06 - 25

Psychopath Renderer Website

I've created a blog/website for my 3d renderer:

Woo hoo!

2014 - 02 - 14

Ray Reordering and Breadth-First Ray Tracing

As I mentioned in my post about random number generation, I've been working on an experimental 3d renderer named "Psychopath".

I haven't posted much about it, but I would like to change that. Psychopath is easily the largest one-man personal project I've ever undertaken, and it's something I regularly get excited and obsessed about, disappearing into my own little programming world, often not eating for extended periods because I don't want to stop working on it.

So I'm going to start by writing about a core aspect of Psychopath that makes it different from most renderers I've seen out there: ray reordering.

Psychopath is what is commonly referred to as a "path tracer", which means (in over-simplified terms) that it is based on tracing rays of light through the scene, bouncing all over the place.

The traditional way to do this kind of ray tracing is to trace one ray through the scene at a time. This has the advantage that you only have to store one ray at a time in memory, and also has the advantage of a large body of research to draw from for making it as fast as possible. It has the disadvantage, however, of accessing the scene in a very incoherent way.

There are a couple of alternative ways of doing ray tracing, both of which are based around the idea of handling many rays at once, and both of which have many variations (some of which blur the distinction between the two).

2012 - 06 - 26

Pseudo-Random Number Generators

Holy crap it's been a long time since I've blogged here. And you know what? I'm fine with that. I'll blog when I actually have something I want to share. Like now, for example.

So, I've been pecking away at a 3d renderer that I've dubbed "Psychopath". I've put it up on GitHub:

Anyway, I'm discovering all sorts of nifty little things as I'm working on this, many of which are handy and general-purpose. The latest one is a simple pseudo-random number generator that is quite robust.

For most simulation applications (advanced 3d rendering can be considered such) the included random functions in e.g. most C or C++ standard libraries are insufficient. Moreover, it is important to be able to guarantee that the RNG you are using is consistent across platforms and satisfies specific properties of randomness. Therefore it is generally a good idea, in these applications, to include a custom RNG implementation and use that.

The go-to RNG for such purposes these days is the Mersenne Twister, and as such that is the RNG I've been using in Psychopath up to this point. But the code for it is quite complex. And as it turns out, there are other RNG's out there that are pretty much just as good, but have far simpler code.

2011 - 10 - 09

Middle Schools In Seattle

I have been helping one of Tiffany’s daughters with her math homework recently. She’s currently learning about ratios. It is no wonder to me that she needs help. Not because she isn’t bright. In fact, she is very bright and has a natural knack for math, I would say. Rather, the text book is horrendous.

I am pretty decent at math, and I deal with ratios all the time in computer graphics and animation. But this text book confuses me. And I already know the topics it is covering. How on earth is someone new to the material supposed to find it helpful? And from what I hear, the teachers are extremely hit-or-miss.

Good god. This makes me really angry. The only kids that are going to learn this math are the kids that go off and learn it from completely separate sources. And at that point, what is the point of the school system? It seems like all it’s doing then is taking up valuable time that the kids could otherwise spend actually learning things. And how are kids supposed to develop a love of learning if this is their experience of it? It is sabotaging these kid’s lives.

Public schools need to be better than this. Why aren’t we funding them well, again? Why are we throwing them bone scraps? How do we stop this?

2011 - 05 - 26

DRCS For Content Creation

I love distributed revision control systems (DRCS). Git, Mercurial, Bazaar... fantastic things. And I use DRCS's all the time for code. They have a lot of benefits over centralized models.

Unfortunately, they are not quite so nice for content creation. And there are two main reasons for this:

  1. Media files are often large. A whole project of media files is typically huge. And a bunch of revisions of a project of media files is enormous. And that enormity takes a freakin' huge time to transfer over a network. All of the DRCS's that I am aware of force you to get a copy of the entire repo (excepting for Git, but the result of a partial clone is a repo that can't push/pull). This is pretty much a deal breaker.
  2. Changes to media files cannot be merged. In a distributed system this is particularly problematic. Most RCS's that are used for media (e.g. Perforce) have locking systems to prevent more than one person from editing a file at the same time, which prevents conflicts. This is not possible with DRCS's due to their nature, which makes the ability to merge changes critical.