SRB2 Message Board  

Go Back   SRB2 Message Board > Sonic Robo Blast 2 > Editing

Thread Tools Search this Thread
Old 3 Weeks Ago   #1
Uninteresting the Character
Wumbo's Avatar
Default [Tutorial] Full-Length Video in SRB2!

How to make...

Full-length video in SRB2!

If you're a member of either of SRB2's Discord servers, you may have seen some talk (albeit limited) about full FMV videos in the form of cutscenes. Me, being a lazy no-brainer, decides to do the next best thing and shove full videos into SRB2... in-game.

The Tutorial

First off, you guessed it right, it uses animated textures. If you're not sure exactly how this works, it uses several individual textures and displays them one after another at a desired rate. The sequence of textures and the rate they're displayed at is indicated by a ANIMDEFS file. The Wiki has some useful information on the topic.

But you may be wondering, how do you extract frames from such a large video? If you have the right tools, it's an easy process. I bet there's ways to extract frames straight from a video file but I personally convert them to GIFs first. And no, I don't use a faulty online converter, I use Instagiffer. I stumbled upon this utility a while back and it sure packs a punch. You can change the size of the GIF, its framerate, its quality, and even add captions and filters. I only use this program because it allows for resizing videos of humongous wuality down to something more suitable for an SRB2 level. Note: Since 30 FPS is the max framerate for a GIF using this program, I recommend setting it to 17. I'll get to why I say this later.

After this, though, is where I get to extracting the frames. The GIF itself is useless, because it's more the frames it holds that comes in handy for porting to SRB2. For this, I use GifSplitter, which does a nice job extracting the frames of a GIF into BMP files that can be worked with directly. But no, I don't import it into a WAD directly from there, because there's one more important step in this process before we can get to importing the frames inside a WAD.

This step? Even more converting (don't worry, it's easy). This time, it involves renaming the images you just extracted and (optional) converting them into PNG files for better compatibility. First, download IrfanView, launch it, and select File > Batch Conversion/Rename... and type "[4-character phrase in caps]####" inside "Name pattern". Then select "Options" right next to the box and make sure that the #'s will turn into numbers starting at 1 and at an increment of 1 (which it should be by default). After this, if you want to, change the "Output format" to PNG. Additionally, you can check "Use advanced options" and make some further adjustments from there.

Now, navigate to the folder that contains the extracted frames and click "Add all". This should add all the image files contained inside the specified folder to the list of files to convert later. Then, navigate to the folder you want the new files to be placed inside and select "Use current directory". Finally, click "Start Batch" and wait until the process is finished.

Now for the actual SRB2-related part. Open your preferred WAD editor (I suggest SLADE), make a new WAD file and create a file named "ANIMDEFS". Open this entry as a text file and type either "Texture" or "Flat" corresponding with what you intend to use the images as. Press space and name the first image file of the sequence. This should be named ????0001, obviously with letters in place of the question marks. Press space again and type "Range". Space again, now type the name of the last file in the sequence. Space again, type "Tics" and specify how many tics you want it to wait before proceeding to the next frame. Remember, there are 35 tics in a second, so an animation at 2 tics per frame would have a framerate of 17.5 FPS. This is why I recommended setting the original GIF to 17 FPS, because it's the closest thing you'll get to a solid 17.5 frames. Afterwards, import the images and convert them into the format you chose. Remember to use markers!

Now that the animation has been ported successfully, it's time to view them in-game. All you have to do is simply load up or create a map and set a texture and/or flat to the first image of the sequence and save. Yes, it's that simple.

If you want to add sound to go along with the video, go right ahead. At 17 frames, the audio shouldn't get too off-sync as long as you don't pause or stop the level but not the music or vice-versa. If it does get off-sync, use Audacity to experiment and try to get the track to sync better with the video.

Uses for this technique:

There's many ways you can put this ability to good use. For example, you can use it on a TV for, say, a hangout level or something of that sort. Or you can always whip up a small level to surprise friends. There's many different uses for animated textures of this genre.

I hope you enjoyed this tutorial. If the way I formatted it is too time-consuming or confusing I'll make adjustments if requested. Thanks for reading!
I make abominations so you don't have to

My shameless WAD Vault
Wumbo is offline   Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 02:54 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2018, vBulletin Solutions, Inc.