Jump to content
  • Advertisement
Sign in to follow this  
zix99

Drawing grass

This topic is 4928 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

Hi all, I'm working on my terrain engine, and I was wondering what the best way was to take care of, and draw, grass. (The kind that stands up, 3D, not textured ground). I've thought of 2 methods so far: 1) Have a sight range for grass, and as it goes out of sight range delete that grass quad and recreate it infront of you. In this method it will also fade in as you get closer to it, so it just doesnt pop up. 2) Have 'sections' of grass, in which it draws small (let's say 10x10) fields, and as that field goes out of view it is recreated infront of the camera. With both of these methods the grass would be qsort'd for less blending artifacts. Are there any more, more, efficient methods? and what do you think of those two? Thanks for any replies ~zix~

Share this post


Link to post
Share on other sites
Advertisement
I remember Planetside generated a 10x10 square of grass when you got close enough, and faded it in. It Z-sorted the individual polygons to draw right when viewed from the point of view where the player was when generated. If you turned around and looked back, you'd notice the bad Z order, but you almost never did, so the trick was pretty clever.

I believe in block-based rendering because it draws much faster, and fade-in because it reduces popping. If you use pixel shaders, or an attenuation texture mapped by distance, you can actually fade out further parts of the grass block more than nearer parts.

Share this post


Link to post
Share on other sites
That sounds like a good method. I'm picturing something like bf vietnam, or Farcry grass.. although i actually got a texture from bfv [smile]. The grass will be vertex-shaded by the color of the terrain (so if it's on sand it will be tan, grass, green), more or less BFV style. Farcry uses individual models, but I figure I cant program nearly that good to get it to work decently.

Thanks again for the advice
~zix~

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.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!