Category Archives: Art

Things related to the visual side.

You won’t believe what my dog did…

Last week my mom sent me a picture of a ‘surprise’ her dog did that had a suspiciously interesting shape. Not to be outdone, I sent her a few of my own. I mean, my dog is even more special.

That’s one smart dog.My mom’s name

Ok, if you hadn’t guessed, these were not exactly totally natural. I used 3dsMax and a font called poo. The text was extruded, a smooth modifier applied, then a material with ‘noise’ applied to the bump and displacement properties.

The possibilities are endless! Well.. I guess what I did is pretty much the end, actually.

Smartcropper V2.00 released

A while back I wrote a freebie utility that checks a series of images and then crops them all to the smallest enclosing rect.

In my BREW phone game making adventures, I had single-image horizontal sprite strips that were wasting a lot of space and added features to handle finding the smallest enclosing rect and writing out an optimized version of the image.

Smart cropper v2 example

8 bit support, color key support (can be used instead of alpha) and some examples were also added.

Download SmartCropper V2.50 with source and examples (updated 12/30/2008)

Automated sprite rendering and cropping from 3DSmax

If you’re as lazy as me you want to be able to press one button (or run one .bat file) to get your game sprites rendered and processed right into the final format and directory, so you can see them in the game.

First, you need a model with animations. In this example, I’m using “Male NPC Pack” from Cubix Studio.

They make excellent stuff, easy to work with and very reasonably priced to boot.

Next, get Sprite Render Tool. It’s a neat little max script utility that automates the rendering of different angles.


I made a few additions to the script for my specific needs:

  • Always renders 0,1,2 etc even with frame skipping
  • Restores default settings upon most errors now (how they were before the script was run)
  • Added direction in text option (uses “left” in filename instead of the degrees)
  • Added “ignore directions that can be mirrored” option
  • Added way to reverse the rotation
  • Added “set_target_dir” command to batch commands
  • Add batch commands to change directions, nth frames, etc flexibly for certain anims
  • Automatically sets up batch.txt as the batchfile if found in the same dir as the model
  • Added dos_command_in_target_dir batch command, so I can do various dos-things on the fly

Here is my hacked up version if you want it:

Here is the Sprite Tool batch file used to render our three animations (walk, attack, idle) in all directions (actually 5, because we mirror some of them):


#help_batchfile usage: (outputfile) (startframe) (endframe)
set_target_dir "../../../bin/worlds/RT_TopViewRPGTest/script/char/man/art"
#Sure, I could just do *.png but who knows when a dir won't exist or something and it will run this in the
#wrong place  Safety first.

dos_command_in_target_dir "del walk*.png"
dos_command_in_target_dir "del idle*.png"
dos_command_in_target_dir "del attack*.png"
dos_command_in_target_dir "del die*.png"

nth_frame 13
directions 8
idle_$.png 6 65
dos_command_in_target_dir "smartcropper idle"

nth_frame 3
directions 8
walk_$.png 67 99
dos_command_in_target_dir "smartcropper walk"

nth_frame 3
directions 8
attack_$.png 406 424
dos_command_in_target_dir "smartcropper attack"

Note: My script requires that you install the free Max plug-in HiddenDOSCommand. If you have 3DS Max 9 64 bit, here is a 64 bit version I compiled.

Now, one issue with my particular game engine is all the sprites in a single animation should all be the same size, yet be small as possible.

In the example batch file above, the “smartcropper attack” command does this.

SmartCropper is a tiny command-line utility that scans a sequence of images, then crops them all at the smallest combined enclosing rectangle.

That way, you don’t have to worry about making the camera tightly fit the subject in Max.

Looking at the output, you can see it cropped the images to the best fit per sequence.


Here is SmartCropper with source (with a MSVS 2005 project), you’d need ClanLib if you wanted to modify/compile it.

Download Smartcropper with source

And here they are in the test RPG level, “Smart shadows” have been enabled for them.