Advanced Image Usage part 2 |
Quake2 Demo Editing Tutorial |
Written 9/99 by Overman |
In Tutorial 6, you were introduced to on-screen image placement in Quake2 demos, and then Tutorial 7 described the inner-workings of this truly powerful and versatile feature. To conclude our treatment of on-screen images, we are now going to cover some of the many applications of advanced image usage. This tutorial assumes that you have the knowledge from the other image tutorials under your belt.
On-Screen Animation
As mentioned in the early tutorials, each block in a demo represents approximately one tenth of a second. Therefore, if over a period of ten blocks, a different image is placed in each block, the result will be animation that plays back over your demo at 10 images per second. If you've ever seen or made an animated .gif file, you know that quite a bit can be done with an image that plays at 10fps. Here's how to set up the equivalent in your Quake2 demo.
Set your Statusbar string in the Demo Information as described in the first image tutorial. Next, insert all the .pcx images that make up your animation sequence. It will be helpful to name these images with numbers, such as image000.pcx, image001.pcx, etc. Let's say, for example, you insert 10 images into the Image List, at index numbers 50-59. Let's also say, for our example, that you want these images to cycle (animate) from blocks 100-200.
Select blocks 100-200 on the filmstrip. Then open the Find dialog. Message Type will be playerinfo, and we will be performing a Find/Replace function on the Selected Range. Click the + button by the Replace Params window.
Scroll down the bottom list of parameters until you reach Stats-0, where the image index numbers need to be placed. The latest version of Keygrip2 added a very powerful feature which we will now use. The Start column represents the starting value of the parameter, which in the case of our example is 50, and End is the ending value of the loop, which for our example is 59. Increment determines how fast the loop executes. In this case, we want the value to increase by 1 every block, so the Increment value would be 1. When Keygrip2 reaches the value in End, it will look at the Reset To column to determine the value to return to as the loop starts over again. This will also be 50 in our example. NOTE: You should set the Reset To value before you set the Start value, or else the Start value will be cleared out... I'm not sure why.
Now, click Find First to begin the process, confirm... and in a few seconds, the entire operation is completed. Now, in our example demo, the images would be rotating at 1 per second, presenting an on-screen animation. Rather than include a demo of this simple example, I thought it would be more helpful to show an example of this procedure in action... with truly creative results. Kemosabe put together this demo, which is a simulation of Picture-in-Picture television. It's 2761kb, but worth it. Download Kemosabe's demo here. For another example, check out the FragFest Recam, which uses animated titles in it's intro.
Moving Path Animation
As we discussed in Tutorial 7, the Statusbar string can be redefined at any time during the course of a demo. It can be set for the beginning in Demo Information, and changed thereafter in any block by inserting a new configstring (index 5) with the new Statusbar definition. So... what happens if an image is on-screen during the time when the Statusbar string is redefined? That's right... the image moves! Granted, it's not the smoothest motion in the world, especially with a larger image, since the entire picture is redrawn rather than just shifted. But the fact remains... it can be done. In creative hands, this effect could be used with some very pleasing results.
For an example of this movement, try the following in your own demo of choice:
Choose an image, and following the procedures from Tutorials 6 and 7, insert the image throughout your demo. Use the following Statusbar string in Demo Information: "yv 0 xv 0 pic 0 " Then at any point midway through your demo, Insert a new configstring (Insert - New Message), set the index to 5, and the value to: "yv 88 xv 128 pic 0 " Save the demo and watch it. Bing! Use the Statusbar Utility to come up with some interesting values, and have fun with it!
Open Challenge: Multiple On-Screen Images
In all the examples from these tutorials, the emphasis has been on displaying a single image on the screen. Usually this has been in a centered orientation, although Tutorial 7 explained how to orient the image to the edges of the screen as well. It seems logical, then, that one should be able to follow the "rules" of statusbar notation and configure a way to display multiple on-screen images. However, I have had no success in making this happen with any desirable results. Anyone who has played different user modifications of Quake2 (Rocket Arena, Capture the Flag, etc.) knows that custom statusbar setups are possible... but these are coded by programmers, not manipulated by demo editors.
Therefore, I'd like to issue this open challenge: Find a way to effectively format two images on the screen at the same time, in a way that would be useful to demo editors. Consult whatever resources you need: Tutorial 6, Tutorial 7, the Demospecs... can it be done without programming?
If you find a solution, send me your demo (along with the 2 .pcx files), and I will showcase it here at ZS, lavishing you with as much credit, attention, and website "p1mpage" as you can handle. Let's see what you've got out there! =)