About Store Forum Documentation Contact



Post Reply 
Most effective way to use foliage...
Author Message
Gian-Reto Offline
Member

Post: #1
Most effective way to use foliage...
I finally managed to get my gras into the World Editor... nice! Also, from what I can see, looks much better than the foliage in the unity terrain system.

Now I'm unsure whats the most effective way to achieve the look I would like...

My dream is to have big patches of waving Gras on my terrain. But as the game is played with a fixed 45 degree angle, the gras density needs to be much higher than in a FPS-Style game to look convincing.

I was able to achive this look in unity, but with a huge FPS drop (which was one of the reasons I started to look for more powerful engines and ended up here)... I assume I could do the same in Esenthel Engine, just with lots of Gras Objects.

Would that be a good idea (lets say I use 100'000 Gras Objects on screen)? Is there any trick I'm not aware that could speed that up somehow (for example combining Gras meshes to bigger mesh objects to minimize the draw calls)?
Does Esenthel Engine reduce draw calls or create texture atlases automatically? If not, how could I do that manually?

I'm just looking for the best compromise between look and performance, so any hint or idea is welcome.

EDIT: Added an Image of what I'm trying to achieve (an earlier test...), done here with "brute force" (In other words: lots and lots of Gras meshes...)


Attached File(s) Image(s)
   
(This post was last modified: 03-18-2011 07:29 PM by Gian-Reto.)
03-18-2011 06:55 PM
Find all posts by this user Quote this message in a reply
Dandruff Offline
Member

Post: #2
RE: Most effective way to use foliage...
you can also use shaders too to make your grass
03-18-2011 11:55 PM
Find all posts by this user Quote this message in a reply
Dynad Offline
Member

Post: #3
RE: Most effective way to use foliage...
Yea you can make a shader that extends the Fur shader.. so it moves along with the wind etc..

There is always evil somewhere, you just have to look for it properly.
03-19-2011 12:13 PM
Visit this user's website Find all posts by this user Quote this message in a reply
llynx Offline
Member

Post: #4
RE: Most effective way to use foliage...
There have been two major issues I've faced when trying to achieve this:

1 - Making separate objects for each plane of billboard grass in WE (which is what it looks like you have shown) make it really inefficient to scale larger than a few meters.
While having multiple billboards in one mesh reduces the # objects, also reduces the level of correct heightmap allignment. The # of objects problem is avoided by manually drawing said billboards and using raycasting to look for uncovered terrain on uneven surfance (non planar) and draw grass according and at the right angle w/ respect to the camera.

2 - By far biggest problem with this is shadows/lighting. You could have the best grass billboards and apply techniques such as http://http.developer.nvidia.com/GPUGems..._ch07.html and still be set back by bad shading of 2D Planes
(This post was last modified: 03-19-2011 04:57 PM by llynx.)
03-19-2011 04:52 PM
Find all posts by this user Quote this message in a reply
Gian-Reto Offline
Member

Post: #5
RE: Most effective way to use foliage...
Hmmm.... good idea with the fur shader, I need to look into that.

now the the answer of llynx:

1. Well, to be honest I didn't use billboards for the scene shown, which gives the grass a nicer look cause the grasblades face more different directions.... but I had to use even more objects because of that, so that's not an optimal solution at all.
If you talk about raycasting, you mean scanning the whole screenspace with raycasts? Or just about enough random samples? Actually, a fixed camera-angle, together with Grass-Billdboards that incorporate "more gras" than my current gras objects, and your solution, might just do the trick.

My expierience was, that SSAO, applied correctly, could really help making the shading of the waving grass look more natural.... of course, in a dusk/dawn like lighting like the one shown above, the shadows looked a little bit "fake", but, during the day it was good enough.
Without SSAO the whole thing looked too flat, and directional shadows where not a good idea for so many objects, at least in the engines I tried. Maybe with a more efficient shadowing system this wouldn't be a problem.

I haven't seen this GPU Gem... have to read it, maybe another good idea.


Thanks for the useful input guys!
03-19-2011 08:17 PM
Find all posts by this user Quote this message in a reply
Post Reply