How do you make decorative flags? (ie. those red axis banner type flag thingys on frostbite)
Decorative flags
I think a banner like that is a flat brush (an object in the map) with invisible sides on all sides except the front. The front has a custom textures (an image) and that image has a shader written for it (a sort of script).
The shader makes the banner wave slowly.
As a bonus, you can turn the flat brush into a so called func_explosive and give it a really low health value. Make sure that you also select it to be “cloth” and not the default “wood”.
Now, if a player shots at it, it will be destroyed and bits of cloth will fly thru the air.
Drakir has released the script and map-source for his bridge map.
You can find it here:
ftp://alenet.mine.nu/maps/RTCW%20-%20ET/Sourcemaps/rhine_bridge.zip
This map has a banner in it.
If you also download the entire pk3 for this map (I think it is called rhine-something), e.g. from a fileserver/et-file host on the net, you can rename it to .zip and then unzip it. Inside you will find the shader file. There you will find the shader for the banner.
//Loffy
I considered a brush, but then I looked at the ones on frostbite, and they flutter in the wind (a bit)
So I think thats more likely a animated model that I’m after…
I’ll have a look at that map.
you can just take the flag model and use its animation. or you can use a shader for your flag texture wich moves the brush like water wich looks pretty similar.
Hey, Der’saidin
You should at the shaders used in Oasis because there is a particular shader that is used for the cloth type tent material this flaps in the wind, the movement is all created using the deform vertex command in the shader script no moving models required.
<DJ>
The flag in Frostbite is simply 2 blocks of NODRAW with one face textured with the flag. One block is the damaged remnants, the other is the full flag. The main texture is a 256 x 512 TGA with alpha channel and uses the following shader:
textures/duel/lit_mo_banner
{
surfaceparm nomarks // added
qer_editorimage textures/duel/lit_mo_banner.tga
surfaceparm alphashadow
deformVertexes wave 10 sin 0 2 0 .2
cull twosided
{
map textures/duel/lit_mo_banner.tga
alphafunc ge128
rgbGen vertex
}
{
map $lightmap
blendfunc gl_zero gl_one
rgbgen identity
depthfunc equal
}
}