In an included map in the Hell in the pacific - mod I saw grass moving in the wind. I think it was made by normal brushes!? Could someone tell me how that works?
Moving Grass
Moderator: Moderators
-
Captain Den
- Lance Corporal
- Posts: 10
- Joined: Wed Apr 27, 2005 12:21 pm
- Location: Germany
- Contact:
Moving Grass
Hi!
In an included map in the Hell in the pacific - mod I saw grass moving in the wind. I think it was made by normal brushes!? Could someone tell me how that works?
In an included map in the Hell in the pacific - mod I saw grass moving in the wind. I think it was made by normal brushes!? Could someone tell me how that works?
I did some corn in a map that did that . What I did was make a texture of a stalk of corn . I applied that texture to triangle shaped brushes that had nodraw on the top and bottom and the corn texture on the other 3 sides . The secret is the shader
deformVertexes flap is what makes it sway in the wind that is also used for flags as well to make them flap
Code: Select all
textures/corn/corn
{
qer_editorimage textures/corn/corn.tga
qer_keyword masked
qer_keyword foliage
// surfaceparm fence
surfaceparm noimpact
surfaceparm nonsolid
surfaceparm alphashadow
cull none
// deformVertexes flap <s|t> <div> <function><base> <amplitude> <phase> <frequency> <optional min> <optional max>
deformVertexes flap t 80 sin 0 5 0.2 0.25 1 0
nopicmip
{
map textures/corn/corn.tga
depthWrite
alphaFunc GE128
nextbundle
map $lightmap
}
}
//s|t
//div
//function
//base basic deformation
//amplitude how wide does it sway
//phase start anim with s/th different than 0 (value 0-0.99)
//frequency how fast does it
//optional min factor for deform at min
//optional max factor for deform at max
deformVertexes flap is what makes it sway in the wind that is also used for flags as well to make them flap
-
Captain Den
- Lance Corporal
- Posts: 10
- Joined: Wed Apr 27, 2005 12:21 pm
- Location: Germany
- Contact:
too much grass will have an effect like any texture will . Depends on the brush count etc . The grass texture will have an alpha channel and be partly transparent so it won't effect vis data size since transparent textures are not used dureing vis compileing. Just don't go crazy with it thats all do some test maps first maybe .


