Jump to content
  • Advertisement
Sign in to follow this  
soconne

test my grass demo

This topic is 5458 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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.

Share this post


Link to post
Share on other sites
Advertisement
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.

Share this post


Link to post
Share on other sites
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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
Yeah, i did notice it looks a little better without blending, but there is no extra work, I simply call glDisable(GL_BLEND).

Although I think with other scenery around the grass like trees and other vegetation, and more lighting...having the blend will make it look more realistic.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!