How StepMania Loads Images
What are textures?
"Texture" is simply another name for graphics file. The name "texture" is more common when taking about 3D graphics. This document uses "texture" and "graphic" interchangeably.
How to you specify that a texture has multiple frames (for animation)?
Simply add the string "(NxN)". Immediately before the "." that separates the main file name and the extension. For example, suppose there is a file called "title menu logo.png" that you would like to turn into an animation. Now, you create an graphic file with 9 frames of animation - 3 frames wide and 3 frames high. Name this file, "title menu logo 3x3.png", and StepMania will play the graphic as an animation with frames in the order left-to-right, top-to-bottom, with 0.20 seconds separating each frame.
What are .sprite files? (for 3.9 only)
.sprite files are a way to have even more precise control over how your graphics animate. Each sprite has multiple "states". For each state, you may specify: 1) What frame of the graphic to show, and 2) how long to show this state before moving to the next state.
Let's look at an example .sprite file:
Texture=dancer p1 1x3.png
Texture is the name of the texture file to use. This must reside in the same directory as the .sprite file. If your texture has multiple frames, be sure to specify the dimensions in the file name using the convention described above.
FrameNNNN is the index of the frame number to use for the first state of the animation. Frame may range between 0 and (total number of frames - 1). Frame indicies move left-to-right, top-to-bottom over the frames in an image.
DelayNNNN is the time in seconds to show the state.
My graphics show ugly banding or look washed out. What can I do?
Change your PNG images to use "palette mode" instead of "RGB mode". Paletted images have three advantages:
- StepMania can load paletted images with higher color precision than RGB images.
- paletted images use much less texture memory than RGB images.
- paletted images often have a smaller file size than an equivalent RGB mode image.
However, paletted PNGs have a couple limitations:
- they support you to only "on/off" alpha.
- they support a maximum of 256 colors. This can make smooth gradients look ugly.
Alternatively, inserting "dither" into filenames will instruct StepMania to dither the image when loading.
Why do the graphics look so blurry?
Some 3D graphics cards (the Voodoo3 in particular) do not support textures greater in size than 256x256. If a texture is larger than the card's maximum texture size, the image will scaled down internally resulting in output that looks blurry.