Grass?

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Grass?

Post 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.
vitek
Bug Slayer
Posts: 3919
Joined: Mon Jan 16, 2006 10:52 am
Location: Corvallis, OR

Post 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
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post 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.
devosbi
Posts: 5
Joined: Tue Feb 27, 2007 2:10 am

Post by devosbi »

Although they look really nasty, You could go for a Doom look and make them from Billboards
If you can write your future... you can change your past...
%20
<Distant Past> Completion 0%.......(x)...........%100
playerdark
Posts: 64
Joined: Mon Aug 01, 2005 5:06 am

Post 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
monkeycracks
Posts: 1029
Joined: Thu Apr 06, 2006 12:45 am
Location: Tennesee, USA
Contact:

Post by monkeycracks »

In my first post:
extremely- low-level shaders
I'd rather not have to even look at shaders :P
Post Reply