Trees and grass
Blitz3D Forums/Blitz3D Programming/Trees and grass
| ||
Hi, how do you create grass and trees in blitz3d? |
| ||
3 Options as far as I can see: 1. Use a 3D modeller and build it from scratch then loadmesh into blitz 2. Use a 3D model creator (like tree magic) then loadmesh into blitz 3. Code the models directly in blitz. |
| ||
ok so if i chose 3 then how would i go about that? |
| ||
I'd say you make a grayscale grass map (there was a recent forum post about that at http://www.blitzbasic.com/Community/posts.php?topic=35433) and create the vertices for the grass (I would highly recomend using a single surface system for something like this). You would use TerrainHeight(terrain,x,z) to find the bottom vertex's Y position. [edit]You could still use a variation of this idea, but unless you are totally insane or have an amazing occlusion system planned out, I highly recommend using sprites for this. [/edit] |
| ||
CreateTree() |
| ||
I use that command too halo Createtree(x#,y#,z#,Height#, radius#, density#) |
| ||
very carefully... (sigh... late again!) :P OK no. There was a freeware tool created by a guy a few weeks ago called Tree Creator. I just did a search for it and now I can't find it... Let me look ah here: http://www.blitzbasic.co.nz/Community/posts.php?topic=35265 It works good. I reccomend that you create only one or two trees and THEN scale them. I wrote a routine to read the ground and plop them randomly... Since you could hide behind them in combat this was OK. I have three trees and I randomly scale them when placed ao it looks like a forest! I think you can search for PLANTING TREES to see it... If not and you want the code let me know! :) EDIT: CreateTree ??? My B3D doesn't list that command??? -RZ |
| ||
A good looking grass system can be found here: http://www.blitzbasic.com/codearcs/codearcs.php?code=807#comments |
| ||
In relation to "dillpickle's" suggestion above - also check out another of "jfk's": http://www.blitzbasic.com/codearcs/codearcs.php?code=949#comments |
| ||
what a honour, thx :) BTW it's MakeTree, not CreateTree ;) |
| ||
thanks for the help that should help me with what i need. |
| ||
I have been playing with the http://www.blitzbasic.com/codearcs/codearcs.php?code=949#comments one... addaed a tree created in Tree Creator Free and plapped 8900 grasses and 256 trees in a 400,4000 area... all animate well and seem to have no slowdown... now after you add enemies... I don't know. :) -RZ |