Freeware Simple Tree Creator

Community Forums/Developer Stations/Freeware Simple Tree Creator

CopperCircle(Posted 2004) [#1]
Inspired by jfk, here is a simple free tree creator, it uses a slightly modified version of jfk's MakeTree Function, BlitzUI and halo's Texture Shaders to add the windFX to the leaves.

Simply put your Bark and Leaf textures in the folders, run the app and they will appear in the lists, you can then play with the settings and save your trees as a .b3d(make sure the textures you used are in the same folder as your saved .b3d when using the trees.)

Cursor keys, left, wheel and right mouse button to control camera.

Full source is included, please post any addtions/modifications, also any free textures?



http://www.apaj15.dsl.pipex.com/Tree%20Creator/Tree%20Creator.zip


jfk EO-11110(Posted 2004) [#2]
Wow this is cool, just downloaded. How is the mesh saved, do you set the Flag for masking (leaf) right in the File?

Then maybe later somebody could add a function to load in alternative trunks. Because the cone that is used in my source is a bit too simple, looks not so good when watched from above. With other trunks it could also be used for strategy stuff, birds view things.

Add it to Toolbox. Well, a link to a littel page that offers the latest version would probably be good.

This is really very nice. When you load several trees and use PosditionMesh to position them, you can then AddMesh them together and in the end they will use only 2 Surfaces all together. Or maybe add them together to regionbased groups.


CopperCircle(Posted 2004) [#3]
Glad you like it jfk, yes the .b3d is saved with all texture info and masking/alpha flags set, so you just use LoadMesh to load a tree.

Im using the trees in my game project and i add the meshes into 2 surfaces, it works well.

If people like it i`ll add to it and put it in the toolbox, I thought about adding options to change the trunk and leaf meshes, but it's just a simple tool for the moment.


jfk EO-11110(Posted 2004) [#4]
I like "Tris Rendered: 35" :)


Sweenie(Posted 2004) [#5]
Why not "Trees Rendered: 1" ;)
No, seriously. This looks great


Beaker(Posted 2004) [#6]
Very nice trees at very low polys. Couple of things I would change (and probably will :P): adjustable trunk thickness, and a proper windows file requester.


Picklesworth(Posted 2004) [#7]
ooh, this looks good. Thank you, you just added to my huge collection of freeware programs!


JoshK(Posted 2004) [#8]
Close, but your leaf distribution doesn't look like real trees. Play some MOHAA and look at those trees.


N(Posted 2004) [#9]
This is quite nice. Thank you, CopperCircle.


jfk EO-11110(Posted 2004) [#10]
funny halo, when I posted trees based on this leaf texture some time ago, you said it was a great texture. Although you can use any Texture, this on e looks pretty good when you walk trough a forest and look up to the sky.


JoeGr(Posted 2004) [#11]
That's a handy little tool. Thanks.

By the way, if you want to improve the file requester a bit without too much extra work then have a look at this:

http://www.blitzbasic.com/codearcs/codearcs.php?code=718


JoshK(Posted 2004) [#12]
I meant the branch pieces, the textures look great.


jfk EO-11110(Posted 2004) [#13]
Halo, I don't know what trees you have in california :P, but I know a number of trees which have this kind of branches. You should also consider that each one of these branches uses only one quad.

JoeGr - currently I'd suggest to use the BlitzSys.DLL that offers a standard windows Api Fileselector.


Perturbatio(Posted 2004) [#14]
This is pretty cool :)


Pete Carter(Posted 2004) [#15]
Very good just perfect for my game. just for the odd tree here and there thanks mate.


jhocking(Posted 2004) [#16]
Cool little app. I agree with halo that the placement of branches/leaves is a little unrealistic, but it still looks great. Thanks!


JoshK(Posted 2004) [#17]
It looks like upside-down pine boughs.

Hey cool, glad to see my shaders lib in action!


Falelorn(Posted 2004) [#18]
very cool. Great tool :)


vibe37(Posted 2004) [#19]
Thank you very much! A nice gift to the community!


Wayne(Posted 2004) [#20]
I did real fast brain surgery on this proggy.
Hacked the maketree function and changed the position mesh to this:

PositionMesh ast2,(-.3+(-h/10)),2*erster_ast#-h+Rnd(-.5,.5)+sc#,(-.3+(h/10))

Proggy now creates trees with larger branches at the bottom.
BTW, Had to comment out a few lines of source code because it was not all included. Works great now.

8)

Thanks for the proggy


danjo(Posted 2004) [#21]
yes- halo is right.. the larger branches are/should be at the bottom of the tree, and get smaller toward the top.

good job btw

re: source- few things.
im getting some errors- no updatetexshaders fuction
when i (rem) that out, i also get the forever with no repeat. - but it all looks fine.


puki(Posted 2004) [#22]
Great tree creator thingie "CopperCircle".


Chad(Posted 2004) [#23]
That's the first thing I saw too, the tree branches upside down. But a simple solution is to turn your monitor upside down and it looks good :-)

Great program, it makes my life easier!


John Blackledge(Posted 2004) [#24]
Nice work! And so kind to make it freeware!
What a great community this is.


electronin(Posted 2004) [#25]
Wow! nice job! about time someone made a freeware tree creator :)


slenkar(Posted 2004) [#26]
thanks for this!!!


*(Posted 2004) [#27]
Brilliant stuff, its good for those of us who want just a few low poly trees here and there :)


MikeHart(Posted 2004) [#28]
Thanks, great job on it!


GameCoder(Posted 2004) [#29]
Ahhh! 1000 thankyou's


wizzlefish(Posted 2004) [#30]
is there a way so you can make it less upside-downish?


Falelorn(Posted 2004) [#31]
you can also check out www.economicsoftsol.com they have some utils.


wizzlefish(Posted 2004) [#32]
yes, but none of their stuff is free. I will continue to use this.


jfk EO-11110(Posted 2004) [#33]
Did you try the "Leaf Mode" to get a not so up-side-downish look? BTW: you still can edit the source (thought it's open source, is it?) or use the original forest demo from the archives and modify the MakeTree function.


jframe(Posted 2004) [#34]
If anyone is still interested, I've found by just changing this line:

sc#=(((h)/3))+1

to

sc#=maxsize - (((h)/3))+1

makes the trees look less top heavy.




jhocking(Posted 2004) [#35]
Nice tip, thanks!

EDIT: How do you compile the code after making that change? It's telling me updatetexshaders is not found.

EDIT2: I grabbed halo's texture shaders lib and put the decl into my userlib directory, that did it.


wizzlefish(Posted 2004) [#36]
The BlitzBasic Gods will cherish this gift like no other.


jfk EO-11110(Posted 2004) [#37]
Indeed, they look nice. thanks!


Nexus6(Posted 2004) [#38]
Coppercircle/JFK/Jframe,

nice usefull app, but where can I find halo's texture shaders lib so I can implement Jframes amendement.

Thanx


Nexus6(Posted 2004) [#39]
Is anybody out there ?


jframe(Posted 2004) [#40]
Nexus6,

All I did was comment out the lines that used halo's texture shaders, and it still seemed to work fine.


wizzlefish(Posted 2004) [#41]
I have an idea - make it so you can make the leaves more dense. It looks odd with so little leaves.


wizzlefish(Posted 2004) [#42]
I tried changing the above to make it "less top heavy," but it says "function UpdateTexShaders not found." I assume this function is included within "TexShaders.dll" but how can I use it?


jframe(Posted 2004) [#43]
Digital Fortress,

Actually if you tweak a few of the settings after making the above change, you can get some pretty descent looking trees (in my opinion.) You increase the leaf density to 10, decrease the maximum leaf size to around 3, and increase the minimun height. Heres a screen below:




wizzlefish(Posted 2004) [#44]
Thanks. I'll mess around with it more.

The .dll is in the wrong place, I think - it says "function updatetexshaders not found" when I run it.


jfk EO-11110(Posted 2005) [#45]
I'm surprised this isn't in the toolbox yet. I make an entry, if you don't mind, Copper. Especially since the link is still alive.


CopperCircle(Posted 2005) [#46]
I have not been around for awhile and never got round to putting this in the toolbox, so go ahead jkf.


jfk EO-11110(Posted 2005) [#47]
Ok, done. Really a great tool. A lot of tools are released and then forgotten and some of them are even pretty good. We needs some kind of WWF for Blitzapps.


jfk EO-11110(Posted 2005) [#48]
I just made some mofifications and now I see I am missing halos shader lib, does anybody know where I can get it?

Currently I remed out the lines calling its functions, but the animation don't work this way, so I'd be glad to have the windy animations. Thanks.

EDIT ehrm, I got the dll, I only need the TexShaders.decls file.


Barnabius(Posted 2005) [#49]
The link to TexShaders DLL is [url=http://www.blitzbasic.co.nz/Community/posts.php?topic=34585]here[/url] but it is not active anymore. :(

Barney


jfk EO-11110(Posted 2005) [#50]
Thanks ppl! A helpful person sent me the decls file. For all those who miss the decls file too, here's its content:

.lib "dlls\TexShaders.dll"
CreateScrollShader%(texture,speedu#,speedv#)
CreateSwayShader%(texture,speed#,amplitudeu#,amplitudev#)
CreateSpinShader%(texture,speed#)
CreatePulseShader%(texture,speed#,amplitude#)
CreateSawtoothShader%(texture,speed#,amplitude#)
CreateStaticShader%(texture)
CreateStrobeShader%(texture,speed#)
FreeShader(shader)
UpdateTexShaders()



Rob Farley(Posted 2005) [#51]
Thanks to this and a bit of texture work by myself...




jfk EO-11110(Posted 2005) [#52]
That's looking good. Well the earth is kind of blueish imho. The cool bit of this Tree Creator is: the trees are so low poly, you can throw hundred trees to a scene without to worry, they'll consume about 5000 Tris, not a big deal imho. When using CopyEntity, you can even keep the surfaces count low.


Rob Farley(Posted 2005) [#53]
The world has a blue hue due to the colour of the sky, it's something I'm playing with at the moment, it works really well, it just needs tweaking to make it right. The skybox is scanned and an average hue is taken from that and applied to everything, this means if you have a red sunset everything has an orange tint to it, it's generally effective, as I said... just needs tweaking to make it right!

If you take a look at THIS thread you'll see it working with other sky boxes.


jfk EO-11110(Posted 2005) [#54]
cool idea. some kind of global illumination.


BIG BUG(Posted 2008) [#55]
nice little tool :-)

Are those textures coming with the zip file free to use?


Mortiis(Posted 2008) [#56]
oh...you just resurrected a 2 years old thread.

I advise you to use this;
http://www.blitzbasic.com/Community/posts.php?topic=77339


BIG BUG(Posted 2008) [#57]
uups, should have checked that date... :-)


John Blackledge(Posted 2008) [#58]
Don't worry Big Bug - I just picked up Fred's sky generator from another thread, and that's 4 years old! Missed it at the time.

Sometimes it's good to have a reminder about old tried and tested tools that newbies (and oldies) may have missed.