Archived

This topic is now archived and is closed to further replies.

X5-Programmer

Render Alot of Trees.

Recommended Posts

Guest Anonymous Poster
If they''re far away, they can just be a particle system. There''s a lot of tree research on the web. Try rummaging around citeseer.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
OK, I hate to threadjack. But Krez, that page is incredible.

Does anyone have any insights into this "speedtree"? Has anyone used it? Or know anything about their methods/algorithms?


Just to help a little with the original thread-topic, Here''s a page I bookmarked a while back ago when looking into this same topic.
http://www.xfrogdownloads.com/greenwebNew/company/s98plants.pdf

It''s pretty high-level, and vague, but it''s got some good common-sense insights into foilage, and the rendering thereof.

Also, if you''ve ever played "Star-Wars Galaxies", it has a pretty good method of transitioning from rendered tree-objects into clumps of fuzzy, green foilage.

Share this post


Link to post
Share on other sites
There is no "fastest" way, although off the top of my head I can think of a few good ways. The most efficient way would be to simply organize each model into a series of vertex buffers for each material, and then for every visible tree (IE, each one that passes the frustrum check) you would render its vertex buffers. In fact, it would be even more efficient if you were to render in a sorted way by material, so that you could minimize the state changes (switching stream sources is very costly in Direct3D 8 and 9)

However, the problem with that is you''ll probably end up drawing a lot more polygons than you may want to. I''d guess on average you''d probably be drawing at least 100,000+ with a world of 500-1000 trees, depending on their complexity. So, the next step would be to implement some sort of LOD system. You''ll want something that doesn''t require too much fiddling with individual vertices since changing the vertex buffer isn''t a good option if you''re going for speed.

You might also want to look into implementing impostors, as they''re great for rendering objects far in the distance and they can save you a huge amount of rendering work.

Anyway, that''s just a brief outline of a few things you can do. Hope that helped a bit

----------------------------------------
"Before criticizing someone, walk a mile in their shoes.
Then, when you do criticize them, you will be a mile away and have their shoes." -- Deep Thoughts
"If you have any trouble sounding condescending, find a Unix user to show you how it''s done." - Scott Adams
FaceHat Software -- Wear the hat.

Share this post


Link to post
Share on other sites