Jump to content
  • Advertisement
Sign in to follow this  
soconne

Grass Rendering Technique

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

I'm wanting to implement a grass rendering system where I have a 8bit image map representing my terrain and each pixel value represents whether grass appears at that location or not and also the density of the grass. 0 - no grass 1-255 - grass present The first way I thought of doing this was to just generate floating point positions for each grass blade for each position on the image map. But for a 512x512 image map, with lets say 16 quads of grass on each location, and then storing a x,y,z and even angle for each blade, this consumes over 50MB of memory. The second method would be simply to read the pixels in the imagemap around the player's position and then create the grass coordinates on the fly, including doing a collision test for each piece against the terrain. This may be expensive depending on the number of grass quads. I just ran the new SpeedTree Demo that has 6 different landscape maps with trees and grass, and I'm wondering how they go about doing it. I know the demo takes up about 260MB of memory while its running, so it is loading a lot of stuff into memory. Anyone have any ideas on this subject?

Share this post


Link to post
Share on other sites
Advertisement
with uv coords and vertex coords this makes up around 3.300.000 triangles

now you can estimate how many grasses and trees you can do this way

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!