O-Town Graphics

Friday, April 28, 2006

IGDA meeting, FSAA, alpha

The IGDA meeting was okay. Yes, I wish I had my 50 dollars back for the yearly fee. But it was cool to hear about a few things from the president of a real game company. I have to admit I was very unimpressed with the same types of questions by everyone in the audience, who seemed more interested in the fuzzy-wuzzy details of starting a company or the challenges of one rather than the nuts and bolts of the technology involved. Indeed, fifty or more people can't all be filling that one position of being some sort of game designer / liaison, so I'm not sure what they are thinking. They may be living on cloud 9, because the questions are far removed from reality for what they would be doing, even if they were hired. I suspect and hope a few of the more quiet ones probably were just as well bored, but too shy to speak up and ask questions that involved *gasp* technology.

Perhaps the most important thing said by Erick Dyke of n-space was that the most important asset a programmer can have that most lack is personality. He says that a programmer with solid communication skills and the right personality can rise high. That is actually a very interesting point, and it follows the same lines of thinking you could read in say a Dale Carnegie or Napoleon Hill book.

Today I’ve given a demo demonstrating our avatar product. I’ve been able to add alpha channel support so when we export to AVI, you can do some really need things like import it in a flash movie. I’m also working on supporting FSAA (full-screen anti-aliasing) natively in our VRML 3D renderer, so p-buffer support will allow for the FSAA support as well. It seems, at least in my NVIDIA card, that p-buffer support isn't automagically supported just because you set the FSAA in the video card. Likely you'll need to support the WGL_EXT_multisample extension and tie it into the WGL_EXT_pbuffer extension. These extensions are really quite messy to use, and since I came on as a maintenance programmer I am lucky that much of the groundwork has been done for me.

As an example of the coolness factor of alpha support, I imported a video of Andy our avatar in a flash movie and he looked very natural with both background and foreground vector graphics. He “fit right in” with no jagged edges whatsoever. In addition, with the closed captioning I added (thanks to FreeText) we now have a little captioning system as well for the hearing disabled. Go technology.

Some of these “eye-candy” changes allow has to have a very visually pleasing product. This is great because I am "pro paycheck" so they can sell whatever they want, as long as I'm paid for it ;-)

Thursday, April 27, 2006

East side

As a follow-up from my prior rant about California, I'd like to point out two studios in Florida that are doing some pretty cutting edge work.

Artificial Studios in Gainesville, Florida is developing a state of the art 3D engine available for licensing. This engine supports the crowd pleasers - you know, High-Dynamic Range Rendering (which simulates the eyes adjustment to different and sudden changes in light levels) and Subsurface scattering (good for certain reflective translucent materials such as milk or skin). One thing is supports is caleld "Hierarchical Per-pixel Occlusion Culling". This allows for "No more portals, zones, vis-gen waiting times, or manual occluders! Occlusion is fully automatic, fast, and accurate to the pixel."

That of course is impressive, and the technique seems to be described here: http://www.cg.tuwien.ac.at/research/vr/chcull/bittner-eg04-chcull.pdf

I'm not sure what it does if the GPU does not support hardware occlusion checking. It must fall back to some software method involving a heirarchical z-buffer, which I'm not sure of the details of how this works, except that I believe the pyramid like structure can be maintained in the GPU by using a shader program and texture as the memory.

Finally, Ballistic Pixel Labs in Lake Mary, FL are doing some pretty fucking impressive graphics for all sorts of stuff, including video games and medical work (http://ballisticpixel.com/bpl_home.htm)

IGDA is holding a meeting in the Full-Sail building at 7:30PM with a guy from the local studio N-Space in Orlando. I'm going to attend and hopefully real game programmers (not Full-Sail students) will be there. It is my first time I've ever attended one of these things.

Wednesday, April 26, 2006

3D Engines and rant about California

We all know the open source community is great. Teams of people with too much free time gather and code up some really amazing stuff that is too good to be free. For people who do not like to spend money, this is a plus.

In the case of 3D engines, there are a few really good open source engines out there that I’ve looked at. The two engines which seem to be the most impressive are OGRE (http://www.ogre3d.org) and Irrlicht (http://irrlicht.sourceforge.net). Both these engines support OpenGL and Direct3D. Irrlicht supports two different software renderers as well. This has to be for bragging rights. There is always some jack-ass on a public forum who demands some obscure feature for his underpowered PC. Mr. Gebhardt can now be like “I support two software based renderers, bitches”. One for each middle finger.

OGRE is an LGPL-based and more widely-maintained version that has tons of people contributing and tons of little projects spun off from it. Irrlicht is a nearly one man Austrian tank project with some impressive features as well. My favorite part about Irrlicht is its license is as liberal as the last hippie girlfriend you dated. You know who I mean – the girl who basically would let you do whatever you wanted with her and she was perfectly cool with it. That’s the type of girlfriend you want when you want to sell a company on a new rendering platform. They love the idea of any software with a BSD style license, because you are free to modify the source code however you feel content and keep the changes. Compiling one of the example projects was a pleasure. One library path, one include path, and a modest DLL and you’re already running it. The largest problem with Irrlicht though is it does not seem to have a very extensive class library, and it seems to rely heavily on a few intrinsic data formats it supports, such as the DirectX .X format and the Milkshape3D format. This makes things more tedious; you have to study the source code to say, implement another bone based format, instead of using their bone classes and parsing the file itself. That is because, unlike OGRE, Irrlicht does not really have their own bone classes per say (they support bones, but it seems tied into the file format). A more tightly coupled class hierarchy makes extension more difficult. But it does make it more lightweight and in some ways make it easier to get started.

Aside from engines, one thing I can’t figure out is why California has such a huge stranglehold on the game entertainment industry. My rant, which is oh so moderated and blocked on the IGDA mailing list, basically began like this. What is so special about California? Are we to say that with our plush Coconut Grove style Latin-haven (this is Miami to you less astute readers) or our world renowned O-Town, we can’t throw a decent party for game developers? The GDC and their ticket price costs more than a full-time semester of college! I have a hard time believing that Florida, with its super low cost of living (0% state tax compared to California’s 9.3%), we can’t attract more game companies down here or at least throw a decent party. So California throws all the parties and gets all the respect and we can barely gather a roomful of people. That is purely pathetic. My best reasoning is that game developers are coming in droves but are stuck behind a few old people going 30 miles per hour. Therefore it will be 2008 before they finally make it!

Tuesday, April 25, 2006

Welcome to O-Town Graphics

My name is Matthew, I'm a 23 year old professional graphics programmer in downtown Orlando. Orlando is called "O-Town" and I just thought hey let that be the subject of my new Blog. Orlando has an interesting rep - we all know that EA is a slave driver so I'm rather happy I do not work for them. Although it is a tourist town, downtown Orlando has sort of a Seattlesque feel to it (sans the coffee addicts and higher IQ)... because well, there is seems to be a sort of grunge look!

I work for a company that develops products for character animation, specifically a product which helps students learn sign language (especially deaf students) - and geared and funded by an educational grant. We also receive other grants, so I suppose you could say we are primarily a research company.

My first entry will be a tutorial I wrote for those who feel the passion to understand how to effectively find the collision between a triangle and cube.


The first thing you notice about 3D graphics is that things often take a lot longer to learn. It is simply much more involved when you are dealing with the 3rd dimension. While some things are easier, other things are harder. It all depends on what you’re trying to accomplish.

The latest developments in graphics come so quick, it is going to force me to become a mathematician. For example, most 3d graphics can be done using matrix and vector math. As you may know, the matrices are 4x4 which encapsulate affine transformations including skew, scaling, perspective, translation, reflection, and rotation. These are done using 4-dimensional coordinates, but the 4th coordinate (the perspective divide) is fairly easy to conceputalize.

Quaternions are an extension of complex math that deal with hyperspheres, where the unit quaternion encapsulates an orientation, but the operations on quaternions allow for things such as the rotation of a point about an axis of rotation with a given angle. SLERP is a term used to refer to spherical linear interpolation, allowing a smooth interpolation between two orientations (say, like being able to smoothly reorient a skeletal model's arm from one pose to another). I've learned most of all I need to know about quaternion math.

Another branch, which is supposed to simply math of line segments, is called Plücker coordinates. Plücker coordinates are able to take a line-segment and turn it into a 6-D point. These simplify operations for plane-plane intersection, line to plane intersection, and line to polygon intersection. These are useful for speeding up operations for intersecting polygons with rays, such as when you are doing portal clipping. This is because there are algorithms which can take a piece of polyhedra and slice it into a plane. And portal regions are usually convex polyhedra. I have no clue how Plücker coordinates work, currently. Many implementations do this using vector algorithms only, which require you to do additional checks and work.

Finally, the latest, which is much more encompassing, is Geometric algebra. This apparently is a complete new math, a math which apparently encompasses linear, vector, and complex algebra in a way of being able to handle dealing with geometric concepts easily. When I first learned quaternion’s and how they kept on extending and simplifying things by extending dimensions, I wondered well if you can have an orientation encoded as 4-dimensions, can't you tack on more dimensions to somehow handle the position as well as the orientation? Indeed, apparently, geometric algebra has a construct that not only encompasses the orientation of a geometric "thing", but also a position. I'm not sure it does this by simplify tacking on a dimension, but it is a new algebra which defines new terms and ways of thinking of things.

You ever try to do physics without calculus? Sometimes the tricks necessary in standard algebra to do what is necessary is nearly impossible without calculus. Calculus defines the tools necessary to handle the incongruities at things where the limit approaches 0. In fact, these nasty cases are hard to program for if you didn't use the proper math construct, the proper tools, to do the job. Same with geometry. There are nasty things that occur with vertical lines (OH no, division by 0), leading to coordinate-free approaches, i.e. purely a vector approach. Yet still, there are other nasty things - for example, gimbal lock, a way of losing an axis of freedom by using Euler angles, all derived from vector algebra. These "nasties" destroy calculations, force you to take steps to avert it by chasing schemes. There are many times where when your using a simpler math construct, you are dealing with hidden “gotchas” and singularities that can "nastify" the implementation of a graphic algorithm at times.

Case in point, geometric algebra has been given credit now to one of the latest lighting techniques that is supposed to be beyond spherical harmonics, in combination with wavelets.

Check out this GDC demo -


Luckily, as I am very new to this field, I’m glad this technology isn’t yet required for what we do. It is always useful to aspire to push the envelope and be aware of where the industry is heading. In addition, the size of your paychecks often correlate to your level of aspiration :)