Coding Grass/Vegetation

Hello everyone!

Ive been seraching for tuturial on how to make grass in an OGL app/game, but until now i havent find nothing… maybe the keywords im using arent the more correct but, can anyone point me to some grass/vegetation tuturial.
Thx in advance!

Just a few weeks back seen a post on a grass demo…

Was posted here on the openGL website or at

Originally posted by Grass dwd:
[b]Hello everyone!

Ive been seraching for tuturial on how to make grass in an OGL app/game, but until now i havent find nothing… maybe the keywords im using arent the more correct but, can anyone point me to some grass/vegetation tuturial.
Thx in advance![/b]

Are u sure?
I couldnt c anything to do with grass or/and vegetation. Could u give me the link plz
Thx

Here is the link from the nehe.gamedev.net site the demo was posted like two months ago.

Real time grass demo
http://chaos89.emuvibes.com/Demo3D/index.html

Originally posted by Grass dwd:
Are u sure?
I couldnt c anything to do with grass or/and vegetation. Could u give me the link plz
Thx

[This message has been edited by nexusone (edited 01-13-2003).]

Look at that, the base code for that demo was made by some finnish guy! I’m not sure if the demo works correctly on my computer though, is it supposed to look very dithered? Might have something to do with my TNT, I’m surprised the demo worked at all.

Anyway, I also experimented with grass a while ago, here’s what mine looks like: http://www.hut.fi/~ikuusela/images/grass.jpg . The technique is kinda complicated, but in short the grass is drawn by 3-sided cylinders with a view-dependent texture on them. The texture contains pictures of a patch of grass, approximately the same shape as the cylinder, taken from lots of diffent directions.

-Ilkka

Looks cool!
Did you release any demo?

Thx to u all!

Well, the demo donsnt run on my pc…
My graph card doesnt support those extensions :|, but Ill try to c how it is done. Anyway, if u know of other tuturials on grass/vegetation/fur, tell me plz

Very nice screen. Could u share with us how have done it?

Cheers

Ive been thinking.
What about using lines based on a bone structure and maybe blured a litle?

This way, we could animate the grass according to the wind direction and others things.

What do u think?

cheers

Originally posted by MickeyMouse:
Looks cool!
Did you release any demo?

Thanks! I didn’t release it back then, but I guess I can as well do it now. Here goes: http://www.hut.fi/~ikuusela/demos/Grass_demo.zip

I hope it works, I wasn’t going to release it when I did it. It’s not very optimized either, but it’s fill-limited anyways.

Grass Dwd:
I gave a short explanation in my previous post. There are lots of details, but most of them you can easily sort out yourself too. Can you tell me which part you didn’t understand? If you get the demo work, you can dive underground, that should give you some hints too.

Your line thing sounds ok for small amounts of grass, but I think it gets too heavy if the ground is filled by grass. Or maybe you could replace the lines with triangle strips, that might look better.

-Ilkka

Edit: link didn’t work

[This message has been edited by JustHanging (edited 01-15-2003).]

kaksi comments :
Nice demo.
It could be even nicer if you made your grass move as the wind blows. This wouldn’t make things faster, but everything has its cost.

I wouldn’t build grass from single lines, grass like that would require huge amount of lines to look dense. This wouldn’t look naturally too, since the grass’ width would stay the same no matter you’re far from or close to it.

Unfortunatly ur program doesnt run :\ it starts and closes before anything.
Anyway, ur probably right about that line thingy.
I’ll keep searching and trying until i find something that looks good enough and runs fast

Cheers

Originally posted by JustHanging:
[b] Thanks! I didn’t release it back then, but I guess I can as well do it now. Here goes: http://www.hut.fi/~ikuusela/demos/Grass_demo.zip

I hope it works, I wasn’t going to release it when I did it. It’s not very optimized either, but it’s fill-limited anyways.

Grass Dwd:
I gave a short explanation in my previous post. There are lots of details, but most of them you can easily sort out yourself too. Can you tell me which part you didn’t understand? If you get the demo work, you can dive underground, that should give you some hints too.

Your line thing sounds ok for small amounts of grass, but I think it gets too heavy if the ground is filled by grass. Or maybe you could replace the lines with triangle strips, that might look better.

-Ilkka

Edit: link didn’t work

[This message has been edited by JustHanging (edited 01-15-2003).][/b]

Originally posted by MickeyMouse:
kaksi comments.

I’m impressed.

Yeah, the wind would be cool, altough I’m not sure how well it works with my technique. Maybe I’l try that some day, but I have serious doubts.

Sorry Grass dvd, I guessed it wouldn’t run on your system, since the other demo didn’t run either. What kind of video card do you have? It’s propably got to do with the extensions, I use multitexture, tex_env_combine and CVA. But the last one is only used for speed, and the two others for, well, the sun effect, so maybe I could wrap up an extension free version. But that’s no promise.

-Ilkka