Urban Terror Forums: Help shader video - Urban Terror Forums

Jump to content

 Login | Register 
Advertisement
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

Help shader video Rate Topic: -----

#1 User is offline   REfuso (old) Icon

  • Joined: 28-May 07
  • Posts: 2
  • Locationitaly

Posted 28 May 2007 - 04:59 PM

:roll:
hi to everybody,
I apologize for my  minimalist English.
In  the past I have built with the nick "pisu" of the maps for ut3: corte qv, bel paese, pal street.
I have not done anything for  a long time and I have been starting  again  on a new project for a few days. I need  some help for the construction of a shader with these characteristics: a screen on which  a brief film flows, a very simple one with 10 frames, or if it is not possible something similar with the projection of slides.
Thanks for the answers, if it is possible can you write in a simple way because apart from writing badly in English, I  also read badly.
ciao REfuso
:-o

#2 User is offline   NulL Icon

  •   former FS member   
    Level Designer
  • Account: null
  • Country:
  • Joined: 28-April 09
  • Posts: 2,606

Posted 13 June 2007 - 01:52 PM

Hey REfuso.

Animated shaders are easy to do, you need to use the animmap shader stage keyword. Unfortunatly q3 only allows 8 frames to be used in a singe animation. So if you can get away with only 8 use this method, or you'll have to do something a little more cunning.  :-D


Heres a simple example that will play at one frame per second. The number after animmap controls the frame rate.

Quote

textures/REfuso/animation
{
qer_editorimage textures/REfuso/anim.tga
{
animmap 1 textures/REfuso/frame1.tga textures/REfuso/frame2.tga ........ textures/REfuso/frame8.tga
}
}



-NulL

#3 User is offline   NulL Icon

  •   former FS member   
    Level Designer
  • Account: null
  • Country:
  • Joined: 28-April 09
  • Posts: 2,606

Posted 13 June 2007 - 02:30 PM

If you REALLY do need ten frames of animation, then you will have to slipt it up into two 5 frame animations and use a shader that can switch between the two.

Example:

Quote

textures/REfuso/animation_10
{
qer_editorimage textures/REfuso/anim.tga
{
animmap 1 textures/REfuso/frame1.tga textures/REfuso/frame2.tga ...  textures/REfuso/frame5.tga
}
{
animmap 1 textures/REfuso/frame6.tga textures/REfuso/frame7.tga ...  textures/REfuso/frame10.tga
alphagen wave square 0 1 0 0.1
alphafunc ge128
}
}


In this shader the second animation becomes visible after the first has played through its 5 frames then disapears after its played its 5 frames.

This only works properly if both animations have the same number of frames in each stage (eg 5 and 5, can go up to 8 and 8 ), and the same frame rate.

If you want to use a different frame rate, then you will have to chage the square wave's frequency. Thats the last of the 4 numbers (0 1 0 0.1). The frequency is easy to work out, it is the frame rate (1 in my example) divided by the total number of frames(10), so thats 0.1. If, for example, you wanted 5 frames/second and 10 frames of animation the frequency would be 5/10 = 0.5.

Please note, im pulling all this from the top of my head. My mapping computer is broken right now so i carnt check this is right. Im sure someone else can either confirm or correct any mistakes. (*pokes Crystaline :-) )

Happing Shaderizing

-NulL

#4 User is offline   REfuso (old) Icon

  • Joined: 28-May 07
  • Posts: 2
  • Locationitaly

Posted 29 June 2007 - 02:51 PM

:-o
good suggestions, have succeeded in building a multiscreens with various animations.
thanks
REfuso
:-o

Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users

Advertisement


Copyright © 1999-2024 Frozensand Games Limited  |  All rights reserved  |  Urban Terror™ and FrozenSand™ are trademarks of Frozensand Games Limited

Frozensand Games is a Limited company registered in England and Wales. Company Reg No: 10343942