MakeVBM: Difference between revisions

From Red Faction Wiki
No edit summary
(Redirected page to Official RF Toolkit#MakeVBM)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
MakeVBM is a standalone command-line utility used to create [[.vbm]] files for use in [[Red Faction|Red Faction 1]]. These are animated or single-frame 2D bitmaps, in a proprietary Volition format. Volition's MakeVBM program is included in the [https://www.factionfiles.com/ff.php?action=file&id=517191 Official RF Toolkit].
#REDIRECT:[[Official RF Toolkit#MakeVBM]]
 
In 2020, rafalh released his [https://www.factionfiles.com/ff.php?action=file&id=518331 own completely rewritten version of MakeVBM], which adds many enhanced features over the original. This enhanced tool uses the same syntax as the Volition tool, adds additional functionality, and retains all functionality of the original.
 
Key improvements in rafalh's enhanced MakeVBM are:
*Support for high resolution image files
*Support for many common image formats as input (.jpg, .png, .dds, etc.), rather than only .tga like the Volition tool
 
==Usage==
The source input for MakeVBM is one or more image files, either 24 or 32 bit with alpha, in a supported image file format. A list of supported image file formats is available [https://crates.io/crates/image here.]
 
The first step is to get your image files in one place, and name them correctly. MakeVBM requires sequences to be named like so:
 
<pre>name-0000.tga
name-0001.tga
...
and so on.
</pre>
 
“name” can be any prefix you like, but it must be followed by the “-XXXX” ending. Once you have your files together, decide what color format your VBM will use.
 
While all VBMs use 16 bits of color, that 16 bits can be broken down several ways. The output VBMs can be in one of four color formats. The numbers represent the ARG and B channels (alpha, red, green, and blue).
 
{| class="wikitable"
|-
|'''4444'''
|4 bits for each RGB channel, 4 bits for alpha. Use this format when you want a full, varied alpha channel with semi-transparency.
|-
|'''1555'''
|5 bits of color for the RG and B channels, 1 bit for alpha. Use this when you have alpha, but it’s only the “on/off” variety. Pixels are either totally opaque or totally transparent. Useful largely for interface art.
|-
|'''565'''
|5 bits of alpha for the R and B channels, 6 bits for Green, and zero for alpha. Use this when the image needs no alpha transparency at all.
|}
 
Next, decide what framerate the animation will need, measured in frames-per-second.
 
When you’re ready, open a command prompt window, make sure “makevbm.exe” is on your path, and go to the directory where your frames are located. Then type:
 
<pre>makevbm <colormode> <framerate> <prefix>.tga</pre>
 
Where <colormode> is either 4444, 1555, or 565, <framerate> is an integer like 15 or 30, and <prefix> is the first part of your sequence filenames, minus the “-XXXX” suffix.
 
The Red Faction invulnerability overlay effect is a [[.vbm]] using 565 color mode at 8 frames per second. To create that file from its frames, I would type:
 
<pre>makevbm 565 15 pow.tga</pre>
 
This would create “pow.vbm”, which the game can now use.
 
When everything is run correctly, the output spew looks like this:
 
[[File:Makevbmsample01.jpg|MakeVBM Output]]
 
[[Category: Red Faction]]
[[Category: RF1 Editing]]

Latest revision as of 16:51, 4 November 2020