Sunday, June 27, 2010

3D Game Sprites


I got this idea after playing a game called 3D Dot Game Heroes.

This is very easy to do in Houdini. I just found some sprite sheets from old 8-bit video games on the web. Then I just UV mapped them on a grid of points and copied boxes on them inheriting their point colors.

Basic Procedure

Sprite Sheet

Pick out a specific sprite

After I cropped out my chosen sprite, I needed to save the image as a TIFF or PNG to keep the Alpha channel. It comes useful later.

Houdini Network

VOPSOP Network

The image is UV mapped on to a grid of points. Then Color and Alpha point attributes are fetched from the image. If the value of Alpha is zero, the point is deleted, creating a cookie cut-out of points.

Boxes copied to remaining points

Dealing with Sizes

Grid SOP

The game sprites can vary in pixel size, width and height. To ensure that the grid will have the correct number of rows and columns, I brought the image into COPs and was able to fetch its size data using an expression.

16-Bit Sprite

Arcade Size

Guilty Gear vs Street Fighter

As technology advanced, game sprites became larger and could create more detail. Also a wider range of color values could be used. This might explain why earlier game character designs were more simple and used fewer colors. Like MegaMan, who still to this day retains the simple design he had way back. I think its interesting to see how the designers were able to do this stuff with such limited resources and still create something pretty entertaining.

Sunday, June 13, 2010

Pinball Machine



Another combination of DOPs and CHOPs.

By using the Impact data that's created in a dynamics network when two objects collide, I created a graph in CHOPs that drives the size and color of the bumpers.

In the details view in DOPs, when two objects are colliding with each other, an Impact record will appear on each object involved. It will only appear on the frame where they touch, and will disappear until they interact again.

If you look at one object's Impact record, you can see object ID of the other object involved, the simulation time at which it took place, etc. The main piece of data I used in CHOPs from the record was the flags data, which is just "flagging" that the data exists and is set to a value of zero.

After bringing the raw Impact flags to CHOPs using a Dynamics CHOP, I needed to make some math adjustments and then record the graph.

Then I added a Spring CHOP to it and exported it to the bumpers' scale, ....

and in another branch use a Lag CHOP and bring it to the bumpers' color.


RBD vs ODE
I later converted all of the objects in the simulation into ODE objects for more accurate results. I then realized that when using the ODE solver, you cannot create Impact data. So later I only used the ODE solver for the pinballs and used the original RBD solver for the bumpers. So now the bumpers were able to receive Impacts.