![]() |
|
Tutorial Placing an animation/video on a brush - Printable Version +- -TWC| Forum (https://board.twcclan.org) +-- Forum: Offtopic (https://board.twcclan.org/forum-28.html) +--- Forum: Creativity Corner (https://board.twcclan.org/forum-34.html) +---- Forum: Mapping (https://board.twcclan.org/forum-55.html) +---- Thread: Tutorial Placing an animation/video on a brush (/thread-253.html) |
Placing an animation/video on a brush - Destroy666 - 07-03-2012 Before starting this tutorial, you need to have basic knowledge about shaders. There are two basic ways to put frame animations on a brush: 1. animMap shader This is a simple looped animation (like .gif). Get 2-8 images and put them in one folder. Then open your shader and paste this: Code: textures/blablabla/animexample
{
   qer_editorimage textures/blablabla/animexample/radiantimage.jpg
   Â
   {
animMap 10 textures/blablabla/1.tga
textures/blablabla/2.tga
textures/blablabla/3.tga
textures/blablabla/4.tga
textures/blablabla/5.tga
textures/blablabla/6.tga
textures/blablabla/7.tga
textures/blablabla/8.tga
   }
}Change 10 to value of how many times should it be played during 1 second, for instance 0.1 will play whole animation in 10 seconds. The maximum number of images is 8. 2. videomap shader This shader uses .roq video format. You need to convert any video to it (see below). Remember that long .roq video has a very big weight, so be careful. Put the .roq file in video folder (also in .pk3). Code: textures/blablabla/videoexample
{
qer_editorimage textures/blablabla/videoexample/radiantimage.jpg
{
videomap video/videoexample.roq
}
}Then put the shader on a brush face with video resolution. If the video is rotated, you need to fit shader on face (S). How to convert any video to .roq? 1. Download the latest FFmpeg http://sourceforge.net/projects/mplayer-win32/files/FFmpeg/ 2. Extract it and put the video in same folder as ffmpeg.exe 3. Start->run->cmd->OK 4. Type 'cd' path to FFmpeg folder, for example: Code: cd D:\Program Files\FFmpeg5. Type this: Code: ffmpeg -i blabla.wmv -r 30 -s 256x256 blabla.roq
If the quality is bad, you can also try Switchblade http://icculus.org/~riot/gfg/sbvideo.html Tutorial written by Destroy666. If you want to copy it to your site, please include the author and link to this thread. |