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.
Grass?
-
- Posts: 1029
- Joined: Thu Apr 06, 2006 12:45 am
- Location: Tennesee, USA
- Contact:
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
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
-
- Posts: 1029
- Joined: Thu Apr 06, 2006 12:45 am
- Location: Tennesee, USA
- Contact:
-
- Posts: 64
- Joined: Mon Aug 01, 2005 5:06 am
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
-
- Posts: 1029
- Joined: Thu Apr 06, 2006 12:45 am
- Location: Tennesee, USA
- Contact: