Front Warrior's Instanced Grass 100k-384k polygons per frame
Front Warrior's Instanced Grass 100k-384k polygons per frame
yes you read it right, 384 000 polygons rendered EACH frame, for the grass.
here is a comparison
the instancing level runs at 25-50% of the original FPS
No instancing
Instancing
I am considering making a full in-depth tutorial on how to achieve this., but I doubt how many people would benefit from it. Let me know, cause I really dont have much time to write a tut.
I do not claim that I have built that grass node... I have just optimised it. My input is getting from the second screenshot to the first one. It was eigen who came up with the grass positioning and generation system.
here is a comparison
the instancing level runs at 25-50% of the original FPS
No instancing
Instancing
I am considering making a full in-depth tutorial on how to achieve this., but I doubt how many people would benefit from it. Let me know, cause I really dont have much time to write a tut.
I do not claim that I have built that grass node... I have just optimised it. My input is getting from the second screenshot to the first one. It was eigen who came up with the grass positioning and generation system.
I use geometry shaders combined with batching and some parts of pseudo instancing, I also use geometry shaders to perform per-primitive frustum culling (that is a huge difference).
I think the biggest killer here is the fill rate. I am currently adding the per-primitive+per-node frustum culling and I expect the fps to go up a lot. I will also report back any changes I make.
Here is a screenie that shows the grass in the worst way, if you ever pay attention to grass when playing a game you will notice that it looks ugly when looked at perpendicularily because it dissappears. this is to proove how thick mine is (FPS is low because its a screenie from an old version)
EDIT: my grass works at 30 fps in worst case scenario
I think the biggest killer here is the fill rate. I am currently adding the per-primitive+per-node frustum culling and I expect the fps to go up a lot. I will also report back any changes I make.
Here is a screenie that shows the grass in the worst way, if you ever pay attention to grass when playing a game you will notice that it looks ugly when looked at perpendicularily because it dissappears. this is to proove how thick mine is (FPS is low because its a screenie from an old version)
EDIT: my grass works at 30 fps in worst case scenario
Now after the culling which is still WIP, the stable fps is 30 to 40 as opposed to previous 25-30, the non instancing version runs at 60 so i don't see much fps difference I just see lush grass. I added some colour variation in the shader, so different batches of grass have different colours. And in the first screenshot scene where I first presented the technique get 38fps instanced vs 58fps non-instanced, I get the same FPS as non-instanced.
-
- Posts: 288
- Joined: Wed Apr 16, 2008 1:45 am
- Contact:
is there a way to make less instancing like say 50% of what you are currently doing? IMO 30-40 fps is not good for grass and terrain when you still have the rest of the level to add in. So if it were possible to limit the amount of instancing to increase the fps that would be a very useful thing to have. Maybe just instance grass that is within a distance of X so it look lush close but doesn't kill the fps.
Maybe you could "leak" some more details on Front Warrior. I'm all eyes and ears.
And a tip, try not to emphasize the grass in the game too much, or it will attract the players attention too much.
You want the player to play, not criticise how the grass is affecting their fps.
I mean how much time of your life do you spend looking at grass.
Here's two samples from cod4
above (very thinly spread)
from the side(gives appearance of lots of grass)
Anyways I'm just saying.
And a tip, try not to emphasize the grass in the game too much, or it will attract the players attention too much.
You want the player to play, not criticise how the grass is affecting their fps.
I mean how much time of your life do you spend looking at grass.
Here's two samples from cod4
above (very thinly spread)
from the side(gives appearance of lots of grass)
Anyways I'm just saying.
personally, I like the cod4 grass more ^^
irrRenderer 1.0
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Height2Normal v. 2.1 - convert height maps to normal maps
Step back! I have a void pointer, and I'm not afraid to use it!
Lighting, Shadowing can also change allot of how the grass blends with the ground, adding shadowing to the grass or just darkening the terrain below the grass can greatly help blend the grass and terrain. Another thing is to not give the grass poly texture a solid kind of base, have grass blades on a texture spaced apart from another this prevents the player from seeing individual patches of grass. Another thing to consider would be not to continuosly cover the terrain with grass, but try to use a noise texture to do placement of grass patches from this provides a random and more natural feel to the scene, it also prevents tiling issues.
Another tip would be to have grass blades sufficiently spaced and high enough so that from the players height he can not see the base of the blade of the next grass. As my awesome paint skills demonstrate.
Another tip would be to have grass blades sufficiently spaced and high enough so that from the players height he can not see the base of the blade of the next grass. As my awesome paint skills demonstrate.
Last edited by ACE247 on Wed Jun 09, 2010 8:15 pm, edited 1 time in total.