Realistic trees

Discuss about anything related to the Irrlicht Engine, or read announcements about any significant features or usage changes.
Post Reply
archaos90
Posts: 2
Joined: Fri Feb 08, 2008 9:05 am

Realistic trees

Post by archaos90 »

Hi, I'm new around here so treat me well ;)

I have thinking a lot lately about how much more beautiful trees could be if they only could be affected by some faked wind. A lot of games are very careless with the touch of the enviroment when they almost always skips to detail the trees.

A well-known game that really took deep care into the vegetation in the enviroment of the game is Crysis. When I played it, I couldn't stop thinking of how much more realistic the vegetation would've been if some sort of wind was applied to it.

So, if we think of a tree as a large mesh, how much would the framerate drop if both shadows AND physics was applied to every single leaf(a "wind"-vector to a single leaf) in the tree?
JP
Posts: 4526
Joined: Tue Sep 13, 2005 2:56 pm
Location: UK
Contact:

Post by JP »

For trees you should check out Klasker's tree scene node, it's pretty damned cool, it generates trees with random branches.

For wind affecting things i think Bitplane's grass scene node had that feature, so that would be worth a look.

The stencil shadows in irrlicht are fairly pointless as they completely kill the framerate in most cases but you can do shadows with shaders which are much faster, check the project forum for some threads on those.. searching for Chernobyl might find one example or Blindside i think did a lot of different shadow shaders.

Depending on the type of tree and its complexity i guess it would be better to apply the wind vector to the branches rather than every tree... it might be sufficient and would no doubt be faster as there's probably less branches than leaves.

Oh, and it's no real surprise that Crysis has inspired you to think of this but just remember that Crysis has a huge development team behind it so it would be very hard for you to achieve anything close to what they've got in irrlicht and by yourself. But that doesn't mean you can't get something that looks pretty cool, just not quite so realistic :lol:
Image Image Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

if you're going to use a billboard texture for the branches/leaves, you could set it up in such a way they get affected by a wind variable. move it along the x-axis, or translate the vertices a little here and there.
Image
bitplane
Admin
Posts: 3204
Joined: Mon Mar 28, 2005 3:45 am
Location: England
Contact:

Post by bitplane »

For wind you could write the trunk direction (rgb) and flexibility (a) into the vertices of Klasker's trees, then use a vertex shader to do pretty realistic bending in the wind. Would make a cool project
Submit bugs/patches to the tracker!
Need help right now? Visit the chat room
archaos90
Posts: 2
Joined: Fri Feb 08, 2008 9:05 am

Post by archaos90 »

bitplane wrote:For wind you could write the trunk direction (rgb) and flexibility (a) into the vertices of Klasker's trees, then use a vertex shader to do pretty realistic bending in the wind. Would make a cool project
Indeed! :D

The thing is, which was the main concern of the topic, if I combined that which you said and dynamic shadows and had like a forest with such trees, what would the performance end up as? That combined with the ground vegetation?

As I typed a tought struck me... Why not make a vegetation scene node, and perhaps make the models in it destructable? I mean, we could all help eachother out and produce very powerful modules for the engine, and games will be almost as awesome as Crysis in gfx and still fairly (note that I am not saying 'very') easy to make.
Halifax
Posts: 1424
Joined: Sun Apr 29, 2007 10:40 pm
Location: $9D95

Re: Realistic trees

Post by Halifax »

archaos90 wrote:Hi, I'm new around here so treat me well ;)

I have thinking a lot lately about how much more beautiful trees could be if they only could be affected by some faked wind. A lot of games are very careless with the touch of the enviroment when they almost always skips to detail the trees.

A well-known game that really took deep care into the vegetation in the enviroment of the game is Crysis. When I played it, I couldn't stop thinking of how much more realistic the vegetation would've been if some sort of wind was applied to it.

So, if we think of a tree as a large mesh, how much would the framerate drop if both shadows AND physics was applied to every single leaf(a "wind"-vector to a single leaf) in the tree?
Believe me they weren't being careless when Crytek decided to leave wind out. You think they would forget something like that? You are just seeing economics at work. :lol:

Why should they divulge all the best bleeding edge graphical advancements, when you could just release a partial amount of them and make the same money, and then come out with a new engine/game that has another part of those advancements and make double the money.

My predicitions are that in the next installment of the engine, they are going to be unveiling their new environmental simulator as the key "heavy" feature like vegetation was this time around. And by environmental simulator I mean light and wind affected rain, vegetation, snow, dynamic snow allocation, realistic weather patterns depending on time of season, etc.
TheQuestion = 2B || !2B
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Interesting, I finally finished one chapter in the GPUGEMS3 book, and it was about the wind.

Basically, your trees will have to be shaded for this to work.

You will have to set up a terrain of points, where each point has wind vector. Then you will orient these vectors with a noise function so that the vectors will somehow behave as if they are being affected by the wind.

Once you have those vectors, simply apply them to your trees, shrubs and whatnot...
Image
Post Reply