Put in fields of tall grass?
Moderator: Moderators
Put in fields of tall grass?
I'm attempting to make an SP mission for a mod, (Black-op mod) and I want to make a part where you go through crops that are burning and there are men coming from everywhere. The only problem is, can we mappers make fields of grass that will sway in the wind? 

-
nuggets
- General
- Posts: 1006
- Joined: Fri Feb 28, 2003 2:57 am
- Location: U-england-K (england in the UK) :P
- Contact:
look at the rain textures, some textures diappear when u walk in2 them,. whereas the rain texture stays, responds to the "wind" motion and can be moved depending on the wind movement, this'll be ur best bet, but u'll still have 2 create ur own long grass texture
hope this helps, prob not cos it's all foreign 2 me :-/
you'll have to make a texture of the grass and a shader with a for it. Maybe you can find the shader of the tree leaves and adjust it to your needs. Take a look at the trees.shader, there you'll find something with a deformvertexes which makes them move...
E.g. this one:
static_tree1_5 // Fill leaves
{
qer_editorimage textures/models/natural/tree1_5.tga
nomipmaps
cull none
//good low wind values
//deformVertexes flap t 24 sin 2 3 0 .25 1 0
deformVertexes flap t 24 sin 0 3.5 0 0.2 1 0
deformVertexes flap t 24 sin 0 3.5 0.25 0.3 1 0
//deformVertexes flap <s|t> <div> <function> <base> <amplitude> <phase> <frequency> <optional min> <optional max>
//deformVertexes flap t 128 sin 0 4 0 .2 1 0
//deformVertexes flap t 128 sin 0 4 .25 .25 1 0
{
clampmap textures/models/natural/tree1_5.tga
depthWrite
alphaFunc GE128
alphaGen distFade 1536 256
rgbgen vertex
}
This way, it seems to be easy to make swaying grass; question remains, how this texture is to be used: How many brushes of what shape and size are to be placed how in your map? I would try it the way treelines are made but lots of them crossing each other.
E.g. this one:
static_tree1_5 // Fill leaves
{
qer_editorimage textures/models/natural/tree1_5.tga
nomipmaps
cull none
//good low wind values
//deformVertexes flap t 24 sin 2 3 0 .25 1 0
deformVertexes flap t 24 sin 0 3.5 0 0.2 1 0
deformVertexes flap t 24 sin 0 3.5 0.25 0.3 1 0
//deformVertexes flap <s|t> <div> <function> <base> <amplitude> <phase> <frequency> <optional min> <optional max>
//deformVertexes flap t 128 sin 0 4 0 .2 1 0
//deformVertexes flap t 128 sin 0 4 .25 .25 1 0
{
clampmap textures/models/natural/tree1_5.tga
depthWrite
alphaFunc GE128
alphaGen distFade 1536 256
rgbgen vertex
}
This way, it seems to be easy to make swaying grass; question remains, how this texture is to be used: How many brushes of what shape and size are to be placed how in your map? I would try it the way treelines are made but lots of them crossing each other.
oh man! this is s/th! I'm not sure anymore, what kinda grass you want! Is it this way?

This grass texture comes already with MOHAA, but it might not be tall enough
If not, you would have to make a new grass texture, because it's already stretched and would become even more edgy if you made it even bigger
With my shader development, I'm not really satisfied: I have made a shader which makes this grass sway, but it might b different to what you had expected!? Take a look: Here's a pk3 including bsp, map and the shader
I have played now for some hours with the different parameters without real success: Sometimes there is almost no difference, sometimes too much, question is mostly, whether different parameters have a different result because you don't know what they mean: A Sinus of 1 will be the same as a Sinus of 2 or is sin0 the same as sin180? Anyway, look what I've done. If you like it, fine. If not, play around with it and let us know what you find out!!
This grass texture comes already with MOHAA, but it might not be tall enough
With my shader development, I'm not really satisfied: I have made a shader which makes this grass sway, but it might b different to what you had expected!? Take a look: Here's a pk3 including bsp, map and the shader
I have played now for some hours with the different parameters without real success: Sometimes there is almost no difference, sometimes too much, question is mostly, whether different parameters have a different result because you don't know what they mean: A Sinus of 1 will be the same as a Sinus of 2 or is sin0 the same as sin180? Anyway, look what I've done. If you like it, fine. If not, play around with it and let us know what you find out!!
