Hey guys, This is the thread for my TreeGen script. It's a free 3DS Max script that I thought i'd share with you all. It's the fruit of my MaxScript learning binge which i've been learning in my free time.
MAXScript - YouTube[/ame]
You can download the TreeGen Beta v0.97 here!
Here is a quick set of instructions for using the script.
To install: drag and drop the script into the max viewport. then go to Customize>CustomizeUserInterface, and you can find the script under the category "Tree Generator" just set a hotkey and you're good to go!
Adding Leaves: The script uses user selected leaf mesh, in which the position of the pivot point must be at the base of the leaf mesh, and the Z axis has to be pointing down the direction of the branch, and the Y axis should be pointing THROUGH the mesh, if that makes sense... you'll see that your leaf meshes look a bit strange on the branch if you don't do this.
Adding Materials: You add a material to the branch meshes by choosing one with the "Choose Bark Material" button in the bottom left.
I've noticed that sometimes the script will start to chug. I'm not sure why it does this, but that's why we have a beta! And that's also why i opened sourced it!
PS - If the script breaks and just delete your tree and restart the script and try not to do what you did until i fix it. Also, don't forget bug report!
Here is a screen shot of the UI in case anyone has any reference questions on it.
One posible feature request is to allow user to adjust normals of the leaves, so all the normals have same direction. -sometimes its handy
But as far as my experience go - normal adjusting is not well supported in max. There is only edit normals modifier - but once you merge two models, normals are reseted.
LotekK -- yes i'm going to be releasing the source code for this.
tom.drin - The script works by having the user select their already made leaf meshes... these meshes can have an edit normals modifier on them and it will work just fine. When you bake the tree, i'm not merging any meshes at all, everything remains seperate. you dont need to merge anything in order to get it into udk, you can leave the meshes as seperate elements.
Cheers, definitely looking forward to checking it out
It actually looks easy to use, something I've missed in previous tree gen tools I've seen. And for free too. Scripts like these make me wanna switch back to max
Did you plan a maya version ?=
Will be waiting with baited breath for the release, that's for sure!
As for the bark texture, could you make your own tileable textures that would work with this tool?
I fell asleep on my keyboard and scripted a better tool than this.
Looks very well built. Well done!
nice, dude. very nice.
Good stuff virt
p.s. I do have a job
Thanks for the comments!
To all the maya users: UMAD?
There is a "Choose Bark Material" button that allows you to use whatever bark material you want on the tree.. it needs to be a square tileable though.
Someone asked me if there were going to be roots and such. It hasn't been added in this version but i can always add that in another version easily.
As soon as i fix this startup bug i've been getting i'll drop the link in the OP.
gotta stop using maya and work on my max skills :P
Seems like if you press "add selection" while having an already assigned mesh selected, you can't add or "clear" them anymore.
And you get: -- Runtime error: Attempt to access deleted scene object
Using Max 2011 with SP2 and all the hotfixes.
I get an error at line 345.
Edit: It doesn't like the Return in Try/Catch
God damn dude, this is fucking awesome.
i like doing this to mLichy, hes such a nob!
nice work, btw!
One thing I have noticed in max 2009 32bit at least, is that everything is set to backface cull, which means that after making a change, I then need to right click/object properties then take back face culling off in order to see the full effect of the tree.
Only a small annoyance though and I've come up with some interesting looking trees which look pretty close to the hand built trees I have manually built,and weighing in under the tri count of my one and looks just as dense
I've been using tree[d], but being able to do it inside max is gonna help me so much!