Advertisement
Page 1 of 1
Help shader video
#1
Posted 28 May 2007 - 04:59 PM
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
#2
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.
Heres a simple example that will play at one frame per second. The number after animmap controls the frame rate.
-NulL
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.
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
}
}
{
qer_editorimage textures/REfuso/anim.tga
{
animmap 1 textures/REfuso/frame1.tga textures/REfuso/frame2.tga ........ textures/REfuso/frame8.tga
}
}
-NulL
#3
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:
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
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
}
}
{
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
Page 1 of 1
1 User(s) are reading this topic
0 members, 1 guests, 0 anonymous users
Advertisement