Code archives/3D Graphics - Mesh/Forest

This code has been declared by its author to be Public Domain code.

Download source code

Forest by jfk EO-111102004


Contains fast grass (with optional alpha-z-sorting by MasterBeaker), fast trees / forest Patches and experimental "volumetric" Fog Effect.

Get all files from http://www.melog.ch/dl/forest.zip
http://www.melog.ch/dl/forest.zip

Comments

GW2004
after a random number of seconds, (10 to 20) the entire screen will turn (blue/green). Looks awesome till then though!


puki2004
It worked okay for me on a GF3ti - could be the volumetric fog - try stripping it out "GW"


jfk EO-111102004
blue/green? hu? Personally I had strange artifacts with any terrain in Blitz, but then I updated the catalyst driver for my radeon 9200SE (from www.ati.com) and now it works nicely.

Yes, the pseudo-fog thing might also slow things down unneccessarily. You can remove or remark it easily.

EDIT: GW - also try to use "Flip" instead of "Flip 0" in the main loop. Maybe that's the reason for your problem.


Markus Rauch2004
Very nice !!! Thanks !!!


Chad2004
Thanks for sharing


T-Head2005
It works also with my AMD 1100+ and an GF1! Good work!
If I have the time, I'll go to add more sorts of trees and grases!

Torsten Braun from Germany.


Santiworld2008
:) thanks for share this!... is a big work!.


AcidGaming2008
Very nice! Thanks for sharing this.


Rafiq2015
the download link is dead. I had this file a while ago. I would like to download it again. ..can you help thanks


stayne2015
https://web.archive.org/web/20061127180426/http://www.melog.ch/dl/forest.zip


Rafiq2015
thanks stayne...


Rick Nasher2015
Very much indeed. Always interesting to see foliage systems working.


Rick Nasher2015
Like the code: speedy(on my aging system round 60FPS), but in it's current form it won't slip beyond the demo site though, hence the fence. ;-)

Never understand why people, when creating something nice like this, don't add more colors to the grassmap. For instance brown for trees, lightgreen for a hay type plant, darkgreen for plant type blah etc. This way you don't overwrite different types of foliage with each other and create the diversity needed to make it look more real.

Also wondering if the tree collision is constantly being active even if entities are not in view?(dunno how well Blitz3d handles that and if takes up time) In that case probably a zone system should be in place for larger terrains.

And as it's relying heavily on alpha it will of course give the dreaded troubles when adding other items to the scene.. Probably should change to a masked scheme, less pretty but will uphold in code.

Nevertheless, nice code to study on.


Code Archives Forum