resume

Shaders

Morphing Vertex Shader

This vertex shader takes two different models and interpolates between the sets of vertices over a specified time. This allows a model to grow smoothly from one formation into another as if it was "morphing." This shader was written in HLSL as well as supported in C# with Microsoft's XNA Game Studio.

Morph Shader V.1 from Shawn Kirsch on Vimeo.

My task was to create a way to "morph" a ship from one configuration to another. I researched previous solutions for XNA, but found none. This led to designing the effect from the ground up. After running into multiple dead ends, I ended up writing a custom vertex declaration which stores the vertices of both models in a single stream. I wrote a small testbed application to test the morphing of simple triangles and quads. Once I had them working, I integrated the app into the game. We ran into some problems using a custom vertex declaration such as having to rewrite our lighting equations, but in the end gave us the functionality we initially designed.

Pixel Shader Testbed

This is a selection of pixel shaders I created when working on Alpha Morph. Never having worked with shaders before, I had a week to learn shaders and understand the pipeline. This testbed was created to prepare myself for creating the morphing vertex shader above.

XNA Shader Testbed from Shawn Kirsch on Vimeo.

Listed by order of appearance

  • Blur
  • High Contrast
  • Negative
  • Embossed
  • Sobel Edge Detection
These shaders were created in HLSL in Microsoft's XNA Game Studio.

Scripts

Maya/Panda3D Level Editor

While working as a research assistant on a simulation environment for the Game Intelligence Group, I spent most of my time writing scripts to aid the production process of PHD students. One of the most repetitive and time-wasting procedures was the placement of objects in our game world. We were constantly adding new models into the environment and guess-checking their coordinates. Since I had already created a xml based level editor for Softimage XSI, I ported the system over to Autodesk Maya 2008.


I must clarify there are two solutions below. The first solution I created is a level editor developed inside of Maya. After finishing the Maya solution, our team realized that not everyone who would be using our system would own a copy of Maya. The decision was made to create a stand-alone program in wxPython which allows for the importing of panda's native model files which can be created with any 3D software.

Maya Solution


Level Editor - Maya/Panda3d from Shawn Kirsch on Vimeo.

Initially I wrote a solution for Autodesk Maya 2008, which allowed the user to create/load objects, position them, and export the models and their data. It was a simple process that involved selecting objects to be exported and clicking 3 buttons.

The pseudocode is as follows:
  1. First, save the position's of all the objects in the scene (xml).
  2. Second, transform all objects to the origin.
  3. Lastly, export all objects as maya binary files (.mb)
I also created a Panda3D script which read the XML file and loaded the models into the game world. Nick Crook, one of my collegues wrote a handy GUI batch model converter, Carton.py which takes in various model formats and converts them into .egg files. (panda's default model type These scripts give designers the tools they need to create and populate an everchanging game world without worrying about technical issues.

wxPython Solution




As I said earlier, the Maya solution worked, but because we would be shipping the product for anyone to use, we couldn't expect them to have Maya, therefore we decided to write a stand-alone editor in wxpython which would allow anyone to import .egg models. (pandas default model format)

I designed an interface for the program and began writing the UI in BoaConstructor. I then linked the UI to a Panda3D game window and got communication flowing back and forth. The editor allowed for importing of .egg models and tweaking the position, scale, and rotation of objects. Once the designer was done editing the level, he/she would export the XML that contained the data for each object. Again this XML was imported into the game by the same code written by the Maya solution.

Realtime Visual Debugger

This is a python script I created to aid the debugging process for one of our A.I. developers. While trying to debug agents in game, he was relying on the console for information. We got together and talked about a real-time visual debugging system. We created an interface which would allow him to populate the world with relevant information.

It only took me one day to create. I combined some classes and extended them to create a new class marker.py. Now all he had to do to get information about the agents is make the agents populate a manager class, and they would create their own debugging information.