test my grass demo
Could you guys please test my grass demo and let me know what fps you get?
Grass
Here are the keys:
0-9 speed of grass movement
B - enable alpha blending
N - disable alpha blending
Shift - run
A,S,D,W - movement
I run this on a Radeon 9800 Pro and a 2.8Ghz P4 and I get about 200+fps on average.
Oh, sorry, I'm using Fraps for the framerate.
As for the fading, everything is being done on the CPU right now, so it can improve A LOT with a vertex shader.
The fade out is done just by setting the top of the grass to a lower alpha value and also setting the bottom of the grass to a darker rgb value.
Then to simulate wind I simply add an offset of cos or sin to the vertices based on position and some time variable.
But I designed this to be as big as I want. Right now I have it in a game demo that covers an entire 512x512 heightmap, but you can extend it to whatever you want. I basically just figured out where I am on the grid, then draw blades of grass within a certain radius around me.
As for the fading, everything is being done on the CPU right now, so it can improve A LOT with a vertex shader.
The fade out is done just by setting the top of the grass to a lower alpha value and also setting the bottom of the grass to a darker rgb value.
Then to simulate wind I simply add an offset of cos or sin to the vertices based on position and some time variable.
But I designed this to be as big as I want. Right now I have it in a game demo that covers an entire 512x512 heightmap, but you can extend it to whatever you want. I basically just figured out where I am on the grid, then draw blades of grass within a certain radius around me.
I tested it, but didn't see FPS anywhere.
It looks pretty good though. If you were to throw in some fog where the blades disappear, it would look great.
I heard the book GPU Gems has a nice section on grass implementation. I have never looked at it before though. I will try to get to the book store today and check it out.
-visage
It looks pretty good though. If you were to throw in some fog where the blades disappear, it would look great.
I heard the book GPU Gems has a nice section on grass implementation. I have never looked at it before though. I will try to get to the book store today and check it out.
-visage
i've been wanting to add grass to my game for quite a while and was wondering if any of you know some good articles on doing it?
hmmm.. is it just me liking it better without the alpha blending? edges arent as soft of course, but it looks a lot thicker that way and i could imagine saves a lot of work.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement