Join us on our TWC Discord channel

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tutorial Placing an animation/video on a brush
#1
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-...es/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\FFmpeg
After that path should change.
5. Type this:
Code:
ffmpeg -i blabla.wmv -r 30 -s 256x256 blabla.roq
  • blabla.wmv is the name/extension of vid you want to convert
  • 256x256 is resolution
  • 30 after -r is FPS
  • blabla.roq is the output file
6. After running this cmd a file called blabla.roq should be created (in ffmpeg.exe location).

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.
Spoiler[spoiler][spoiler][spoiler][spoiler][spoiler][spoiler][spoiler][spoiler][spoiler]<object classid="clsidBiggrin27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0" width="500" height="300">
<param name="movie" value="http://z0r.de/L/z0r-de_3068.swf" />
<param name="quality" value="high" />
<embed src="http://z0r.de/L/z0r-de_3068.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="500" height="300"></embed>
</object>
[/spoiler][/spoiler][/spoiler][/spoiler][/spoiler][/spoiler][/spoiler][/spoiler][/spoiler]
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)