Category: Computer Graphics

Video Textures SIGGRAPH Paper Implementation

Posted: November 14th, 2011     Computer Graphics

I’m doing another course at Concordia to keep my brain active. This term, I was asked to implement the Video Textures SIGGRAPH paper by Schodl et al (2000). Schodl’s paper introduces a new medium called a “video texture” (not to be mistaken with a texture map that uses an video file as its source). Basically the paper involves taking arbitrary input video footage and turning it into infinitely looping videos. I implemented the video texture synthesis in C++ on Mac OS X, utilizing the OpenCV framework. I also integrated the video textures in an OpenGL application.

Read my paper here

YouTube Preview Image

Hello WebGL!

Posted: September 29th, 2011     Computer Graphics

I’m doing another course at Concordia University in the little spare time that I have to keep my skills sharp. This time, I’m doing a course on animation. I decided to try my hand at doing everything in WebGL instead of C++ GLUT. I managed to get my OBJ reader working in PHP which writes out JSON representations of the mesh. So here’s my Hello WebGL app!

kinectfusion = WIN

Posted: August 13th, 2011     Computer Graphics

This is awesome new tech:

YouTube Preview Image

Michael Bay is Awesome

Posted: July 13th, 2011     Computer Graphics   Eye Candy

In case there was ever any doubt….

YouTube Preview Image

Autodesk Virtual GDC Booth

Posted: March 1st, 2011     Computer Graphics   Web Development

I’m happy to post that my latest 3D project went live today. I built the virtual Autodesk GDC 2011 booth which is an interactive marketing experience showcasing on the Autodesk Media and Entertainment community site, The Area. In this simple interactive application, users can walk around a 3D model of the Autodesk booth at the Game Developers Conference this year.

Game-resolution booth in Maya

Game authoring in Unity.

Virtual GDC Booth

Teapot Master

Posted: December 15th, 2010     Computer Graphics   Eye Candy

One of my personal goals in 2010 was to learn 3D programming and make a game. I enrolled in a part time graduate course at Concordia University on Wednesday evenings and learned graphics from ground zero. I think about 75% of the course was math – linear algebra, quaternions, yikes. Anyway, for the final project, we were tasked to create a 3D game, so this was my effort.

Update: I got top marks in the class for the term overall (A+) and 99.6% for this game. Here’s the report with the making of in more detail.

Teapot Master

The Walking Teapots have been stolen and scattered over CG land. Your job is to bring them back.

The user controls a ball using the keyboard. Using the ball, you can roll around a 3D environment. The walking teapots are scared of anything that goes near them, so you have to “herd” them in the direction you want.

Your goal is to herd the walking teapots into the Cornell Box.

The teapots are scared of you and will try to run away. When they are alarmed, an exclamation mark appears.

Teapot Master was a one man project produced in my spare time. I had the term to make the game, but pretty much all of the work came down to the last three weeks of evenings and weekends as I’m pretty busy with my day job. I wrote the game using C++ and OpenGL, developing my own scene graph, AI, collision detection and shaders. I had already developed the scene graph in a previous assignment, as well as an OBJ file loader. I also produced all the assets in Maya and did the global illumination & ambient occlusion bake to texture.

Inspiration

The idea for the game was a mashup of concepts. I like the walking teapots that Pixar gives away at SIGGRAPH. I also liked the game mechanics of Flock by Proper Games where you herd animals into a spaceship. When I thought about how I could combine the two, I remembered that Pixar has a toy ball from Luxo Jr, which is used frequently as an inside joke for research papers (along with teapots). I also liked the “rolling around” player mechanics from Marble Blast.  So that was basically how I came up with the idea for the game.

For the level, I decided that since I was doing so much Pixar-inspired stuff, I’d model the room after Andy’s room in Toy Story.

As the goal for the teapots to run into, I still needed a box of some kind, so what better than a Cornell Box?

Content Creation

I modeled everything in Autodesk Maya using polygons. The models were then exported as OBJ’s which my scene graph could read.

Because I’m new to all this, and hadn’t touched GLSL before two weeks ago, I decided that in order to make the game look good, I’d attempt to bake global illumination and ambient occlusion to textures. I was able to do this with Maya.

All assets were modeled in Maya.

An early Global Illumination test using Mental Ray. The Buzz/Woody texture was removed in the game.

Global illumination was baked to texture. Here's the floor.

The walking teapot, with ambient occlusion baked to texture.

Technical

I developed Teapot Master in C++ and OpenGL. The application was built on Windows 7 and Mac OS X Snow Leopard.

The major software components that I developed were:

  • Hierarchical scene graph
  • OBJ loader
  • Player control and dynamics
  • Collision detection
  • AI
  • Blinn-Phong Shaders

I used these libraries:

Download Teapot Master

Windows 7 and Windows Vista
TeapotMasterInstaller.msi

Note: Apologies to OS X users. The game was developed on OS X in addition to Windows, but I wasn’t able to successfully test it on other machines, so I’m only making the Windows installer available.

Instructions

WASD keys: Roll the ball
Arrow keys: Orbit the camera
Escape: Quit the game

Herd the walking teapots into the Cornell Box.

OpenGL texturing

Posted: October 4th, 2010     Computer Graphics   Rambling

I continued working on my OBJ viewer application on the weekend and made a lot of improvements including texturing. Here are some pictures of models from various 3D World magazine discs. To my chagrin, all the good quality “free” 3D models I could readily find were of military vehicles.

Pretty much all the models had to be “normalized” in some way by importing the original 3ds into 3ds Max, then exporting it as an FBX. Opening the FBX in Maya, fixing the size and orientation, making sure that the UV’s were correct by applying the materials (my program currently only supports bitmaps, so the texture needed to be re-exported as a bitmap file). Finally, the model was triangulated (if needed) and exported as an OBJ.

First test - M1 Abrams tank OBJ

M1 Abrams tank model from 3DM3

UH Tiger model from Falling Pixel

Humvee model from Blue Brain 3D

US Soldier model from Blue Brain 3D

Fun with Materials

Posted: April 10th, 2010     Computer Graphics   Eye Candy

One of the most enjoyable parts of my work with Gnomon School of Visual Effects is that I get to do 3D again. I’m taking a texturing class with Eric Miller this term. Here’s my first assignment, produced in Maya 2010 and Mental Ray. Basically just trying to simulate some real life materials.

 
Leonard Teo
CEO, Ballistiq
Montreal, Canada