Animated flags
Moderator: Moderators
Animated flags
I'm not sure whether this should be in here or scripts......
Is it possible to make a flag that flutters in the wind?
Is it possible to make a flag that flutters in the wind?
Zip 
- General Death
- Moderator
- Posts: 1116
- Joined: Thu Nov 21, 2002 2:33 am
- Location: NC, USA
- Contact:
The way EA has done it is by models.
Im sure this could be done also by a shader with your custom texture.
Something like this:
Modify the deformVertexes line values in the shader to produce the effect you want. May also work better with a path mesh then a brush since I have tried this with brushes and it loses the effect.
If you want the same effect as the models in mohaa you may want to see what shader info it has
Im sure this could be done also by a shader with your custom texture.
Something like this:
Code: Select all
textures/yourfoldername/yourtexturename
{
qer_keyword flag
surfaceparm trans
surfaceparm nonsolid
surfaceparm nomarks
surfaceparm noimpact
cull none
nomipmaps
nopicmip
deformVertexes flap t 60 sin 0 1.5 0 0.1 1 0
deformVertexes flap t 60 sin 0 1.5 0.20 0.2 1 0
{
map textures/yourfoldername/yourtexturename.tga
depthWrite
alphaFunc GE128
nextbundle
map $lightmap
}
}
If you want the same effect as the models in mohaa you may want to see what shader info it has

- General Death
- Moderator
- Posts: 1116
- Joined: Thu Nov 21, 2002 2:33 am
- Location: NC, USA
- Contact:
E-mail me the texture and Ill make a test map for you so you can see the shader at work 
Gendeath@planetmedalofhonor.com
Gendeath@planetmedalofhonor.com

- General Death
- Moderator
- Posts: 1116
- Joined: Thu Nov 21, 2002 2:33 am
- Location: NC, USA
- Contact:
Heres a test map of the shader at work...needs alittle work but I think you get the idea:
testflag.zip
Check you mail also Zip
testflag.zip
Check you mail also Zip

- General Death
- Moderator
- Posts: 1116
- Joined: Thu Nov 21, 2002 2:33 am
- Location: NC, USA
- Contact:
- General Death
- Moderator
- Posts: 1116
- Joined: Thu Nov 21, 2002 2:33 am
- Location: NC, USA
- Contact:
General Death wrote:Ill have to look and find what each value controls...
Code: Select all
Here are the explanations for the deform values:
EXPLANATION
flap___s|t___div___function___base___amplitude___.phase__frequency___optionalmin__optionalmax
flap____t____128______sin_______0________4_______.25_______.25 __________1 __________0_____ 
- General Death
- Moderator
- Posts: 1116
- Joined: Thu Nov 21, 2002 2:33 am
- Location: NC, USA
- Contact: