Featured demo – Konami/Raze

Today’s featured demo is Konami/Raze by PlayPsyCo.

3 things about the demo download:

  • You need to work with RAR file, as opposed to a ZIP file. Try RarZilla.
  • Doesn’t work on Microsoft Vista
  • Your ATI graphics card renders only grayscale

Now that unpleasantries are out of the way, let’s get on with it. What do you mean you haven’t downloaded the demo yet? Do that now. It’s about 160 KB and 4 minutes in length.

3 points to take note while watching:

  • Constructive solid geometry or CSG
  • Cel shading or cartoon style rendering
  • Shadow rendering

At the start of the demo, there’s a note referring to CSG or constructive solid geometry. It’s a way to build 3D models. An example in the demo is the cube with a square hole in each side. Let me show you how it works. First you have a cube.

CSG cube

Then you stick in stuff, like cylinders (the demo used cuboids).

CSG cube with cylinders

Then imagine the cube having a positive trait, and the cylinders a negative trait. And the cylinders “cut” into the cube. Then you render only the positive parts (so the cylinders disappear). The result is this (I rotated the cube a little to better show off the result):

CSG cube without cylinders

Here’s one where a negative torus (that’s donut for the non-math people) cuts a positive cylinder. Can you see where the torus is?

CSG cylinder without torus

Basically you construct the 3D model by cutting basic geometric shapes such as cuboids, cylinders and spheres. You can also merge shapes together. For example, you can stick 2 half spheres to the ends of a cylinder to get a capsule.

Next up, you should have noticed the cartoony feel of the demo. This is brought to you by means of cel shading. There’s a web site dedicated to this. I’ll refer you to an article which can explain cel shading better than I do. And here’s the supporting source code.

The best use of this technique was in Okami, a Playstation 2 game. I was awed by the use in rendering brush strokes in a 3D scene. You have to check it out. That game was just beautiful, the music authentically ancient Japanese, and the dialogue funny.

Lastly, the use of shadows. You never really think about shadows until they’re not there because the sense of depth is missing. Real-time shadow calculation is very intensive. I haven’t implemented any technique before, so I can only point you to some resources. Simulation of natural phenomena doesn’t seem so easy now does it?

Have fun!

  1. datsua

    Hi, a friend sent me the URL to your article on Konami/Raze.
    And you’ve got a nice breakdown of the parts that make up the sum 🙂

    A few supplemental notes about the techniques:
    – “cell shading” was done by applying a convolution shader on the depth buffer as a post processing step.
    – All the shadows are done with shadow maps.
    – The CSG is basically done by converting two meshes to BSP-trees. Then intersecting the two BSP-trees against each other and selecting which triangles (from the two trees) should form a new mesh.

    And,.. Last but not least,..
    Konami = Okami + n
    Which should explain the name.

  2. Vincent Tan

    Hey thanks for visiting! Always good to have the creator explain stuff. One can only deduce so much…

    “Konami = Okami + n”
    I didn’t notice that! My understanding was Okami can be interpreted as either “great god” or “wolf”. Thanks.

Comments are closed.