Page 1 of 1

Grass?

Posted: Mon Feb 19, 2007 5:11 pm
by monkeycracks
I'm looking for a way to implement grass into my Irrlicht project. I've tried Bitplanes Grass Node, very very good but seems to have a significant speed loss in D3D9 (The driver I use). Are there any good -extremely- low-level shaders or any other techniques for making grass in Irrlicht that looks semi-realistic?

It doesn't necessarily have to have wind or anything, just regular grass is good.

Posted: Mon Feb 19, 2007 8:26 pm
by vitek
i don't know about bitplanes grass node, but a very simple and effective way to do grass is to make up a mesh that has many quads that are intersecting and slightly leaned over. From the top they would look kinda like an X, teepee or 3-sided pyramid.

You should be able to make it so that you get a few thousand of these clumps in the mesh and still get reasonable thoroughput. You may even be able to tint the grass slightly from within your app to make it match the ground color as needed.

I did some simple grass for a product I used to work on and this is exactly what we did. The only other thing that had to be done was make it so the grass mesh would 'snap-to-ground' so that when you moved to a hillside it around the grass would not be left floating out over the edge.

Travis

Posted: Mon Feb 19, 2007 8:36 pm
by monkeycracks
Hm, sounds pretty interesting but I'm really not sure how I'd go about that. I guess I'll have to look into it more.

Still open for suggestions though.

Posted: Tue Feb 27, 2007 2:24 am
by devosbi
Although they look really nasty, You could go for a Doom look and make them from Billboards

Posted: Tue Feb 27, 2007 4:37 am
by playerdark
Grass can have a high impact either due to a great muber of vertices or due to many drawing calls. You can use the Repeated Geometry technique that comes with shader 3.0 where you support one mesh and an input stream with info that can be displacement vectors or displacement matrices or whatever you like. You will have to add your own vertex format to irrlicht and your own drawing routine. You can check out my post Alterations And Speed or so, I posted some code changes there that can serve as your starting point

Posted: Tue Feb 27, 2007 1:29 pm
by monkeycracks
In my first post:
extremely- low-level shaders
I'd rather not have to even look at shaders :P