|Version 2 (modified by martin, 6 years ago)|
Rendering of huge amount of trees (osgNature)
Approches to render forest and/or trees in real-time
- Matrix-transformed crossed Quads
- 2-crossed-Quads batched in geometry chunks
- preprocessed billboards based on tree geometry with LODs
- points to display forests and billboards as trunks
for reference: from a quick peformance test (using modified osgpointsprite) of rendering with unlit point sprits when not fill limited achieved 39 million points a second, or with just points 91 million/second. Tests carried out on a AlthonXP2600 + GeforceFX5900XT using 100 blocks of 10,000 points stored in osg::Geometry with display lists (VBO's produced slightly lower results!). Same tests carried out with one light on, 32 million point sprites/second and 54 million points/second.
- volume rendering of single or groups of trees
- pre-computed impostors for single trees
- parallax mapping & example code - used both on indivual trees (a fives visible sides of cube?) or as a tree wall and canopy.
First approach generating point trees out of images: (tree with 7000 points made from 128x128 image)
(thoughts: smaller images would lead to less points. quality would no suffer, since it is only an LOD level)
Generate Trees (to populate the forest)
A great GPL external project here: http://arbaro.sourceforge.net/
Here are 2 scripts for automatically generate textures from the arbaro .xml tree definition, thru povray.
TGA texture with alpha is generated, as the corresponding depth-map (for depth-map, you'll have to install megapov. See render_pov_to_textures.sh for more informations).
As now, it is still work in progress, but may be usefull for those who want to test forest populated with good-looking trees/textures. (fmarmond@… 2005-01-10)
(shell file name appened'.txt' for wiki security reason)
render_pov_to_textures.sh.v2.txt (oops, it was an error in the file, new one uploaded 2005-01-13)