• Add Review
  • Subscribe
  • Nominate
  • Submit Media
  • RSS

Progress Report

Implicit Surface Shenanigans



I'm still playing around a little bit with things which I would like to see in the game. In particular I wanted to be able to have the ray tracer animate a collapsing floor as can be seen in the gif above.

What's happening there is that I'm tracing something referred to as an implicit surface, in particular one in the form of something to the tune of
-1 / (x² + y²) + z = 0

Initially I was thinking I could just spline together two 2nd degree polynomials, but when I thought I little bit about it, I realized it wouldn't really be depressing in a circular fashion if I'd go for that, so I had to go for something more like described above... which unfortunately leads to a third degree polynomial and needing to solve it for its roots.

There is an analytical formula for solving a cubic equation, but it generally involves messing about with complex numbers. That's fine enough in itself, but it can quickly lead to a bunch of numerical issues due to the imperfect accuracy of such numbers on a computer. You only want to consider the solutions with real numbers, but there will often be a tiny little something left in the imaginary part which you need to ignore. I needed to set the thresholds surprisingly high to avoid artifacts from popping up.

I could have chosen an iterative solution for this as well. Would have avoided complex numbers, but comes with it's own set of issues. I've never really used the cubic formula before, so it was interesting to mess around a little bit with it, and I'm happy with the end result

Miscellaneous

Profile and download up

The profile and download is up so go give it a try. A tiny note on a couple of things related to the game. This game heavily utilizes the DynRPG SDK in the form of a custom plugin. If you're playing on a desktop with a dedicated graphics card, you might want to go to the "DynPlugin" folder and rename the "kaze_ssaa.cl" file to "kaze.cl" (and renaming the existing file to something else as well). What this does is that it will turn on anti-aliasing for a segment of the game, which makes a pretty big difference at a resolution of 320x240 (the rm2k3 real resolution). More specifically, it turns on ssaa2x, for those interested.

Basically it makes the game go from looking like this

to look like this

Yes, this is really part of the game, it's not all just black and white

Also note that there is a distinct chance that the game will simply not run at all for your laptop (it should probably run for most desktops). If you try to start the game and it closes without showing you any errors or game, then this is likely because because the underlying plugin could not find any device with a compatible OpenCL driver, which is used to get access to the graphics card to speed up the 3D segment of the game. This _should_ probably not be a problem for most people since most devices not entirely ancient often have OpenCL drivers pre-installed, but there are some cases where if you have a CPU only system you will not have it.

I don't know the extent to which this is a problem, as I don't have infinite amounts of hardware to test on myself, and I haven't had a very large pool of testers, so this might turn out to be a real non-issue for practically everyone, but I still wanted to list an explanation if someone should run into the issue
Pages: 1