Trees and grass

Blitz3D Forums/Blitz3D Programming/Trees and grass

David819(Posted 2004) [#1]
Hi, how do you create grass and trees in blitz3d?


Rob Farley(Posted 2004) [#2]
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.


David819(Posted 2004) [#3]
ok so if i chose 3 then how would i go about that?


Picklesworth(Posted 2004) [#4]
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]


JoshK(Posted 2004) [#5]
CreateTree()


Rob Farley(Posted 2004) [#6]
I use that command too halo

Createtree(x#,y#,z#,Height#, radius#, density#)


Rook Zimbabwe(Posted 2004) [#7]
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


Picklesworth(Posted 2004) [#8]
A good looking grass system can be found here:

http://www.blitzbasic.com/codearcs/codearcs.php?code=807#comments


puki(Posted 2004) [#9]
In relation to "dillpickle's" suggestion above - also check out another of "jfk's":

http://www.blitzbasic.com/codearcs/codearcs.php?code=949#comments


jfk EO-11110(Posted 2004) [#10]
what a honour, thx :)

BTW it's MakeTree, not CreateTree ;)


David819(Posted 2004) [#11]
thanks for the help that should help me with what i need.


Rook Zimbabwe(Posted 2004) [#12]
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