Search Unity

Tree Construction Tools?

Discussion in 'Formats & External Tools' started by DocSWAB, Oct 5, 2006.

  1. DocSWAB

    DocSWAB

    Joined:
    Aug 28, 2006
    Posts:
    615
    We're part of the UniTree project, and want to make some trees. But we'd rather not make them entirely from scratch. There are a few options we're aware of for making trees, but were having trouble settling on one. Plus we'd like to know if we're missing any.

    Here are what we know about:

    Bryce
    Creates trees. Was ridicuoulsy cheap during that promotion. But you can only export billboards and not meshes of trees.
    Utility: minimal

    OnyxTree
    Macpuncture has been experimenting with OnyTree, but it seems better suited for high-poly cinematic trees (see this thread[/ulr]). No FBX support (OBJ and DXF are the only "universal" file formats, and we understand OBJ doesn't bring in UV maps properly). It also costs $200
    Utility: has potential, but...

    TreeMagik
    Outputs low-poly trees expressly for games. Cheap (only $50). But Windows only (Bleah). Also OBJ is only universal file format it exports.
    Utility: Unknown

    Anyone had experience with Treemagik? Does it work? Is there a workaround for the OBJ import issue? (If that issue still exists?)

    Thanks,
    Steve
     
  2. thylaxene

    thylaxene

    Joined:
    Oct 10, 2005
    Posts:
    716
    there are some free MEL scripts for Maya at Highend3d.com that generate trees. Look for 'L-system' type of scripts. During my Lightwave days I had some L-systems scripts as well. Also I think C4D has similar plugins/scripts. So does Blender.

    http://www.highend3d.com/maya/downloads/advanced_search.php?s[title]=tree
    http://3drecursions.com/forum/viewtopic.php?t=46
    http://jmsoler.free.fr/util/blenderfile/images/lsystem/lsystem.htm

    these are some urls from a quick google search.

    also I think a while back I posted a url pointing to some xfrog trees available for free. check under 'gossip'

    cheers.
     
  3. dede

    dede

    Joined:
    Oct 10, 2005
    Posts:
    21
    To make tree, I have found this application : Little Stick

    http://www.littlestick.com/index.html

    You can export tree in obj

    I don't have it but there is a demo and this application is cheap : £45, $85 or €65
     
  4. forestjohnson

    forestjohnson

    Joined:
    Oct 1, 2005
    Posts:
    1,370
    Looks like it doesn't offer you any options really and makes way to high poly of trees
     
  5. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Slightly off-topic, but is there any chance those MEL/C4d/Blender scripts might have algorithms that could be adapted to be used in Unity's mesh interface? Maybe we won't have to rely on 3rd party apps at all?
     
  6. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    The Blender L-system script is in Python and is open source, so I'd guess that some of it might be portable to Boo and Unity. I don't have a link handy, but I'm sure the script could be found at blenderartists.org.

    Another couple of possibilities:
    Xfrog (Windows) has a game oriented plugin that exports low poly and LOD tree models. I've never tried it, but it looks interesting.

    Gile (Windows) has a free plugin called Tree[d] that looks like it also exports low poly tree models. I haven't tried this one either.

    EDIT: Well, like most things with Blender, if you look for something you'll usually find lots of cool other things. There are at least 2 tree generation scripts for Blender, here's some links:

    http://www.geocities.com/bgen3/

    http://marief.soler.free.fr/Monsite/lsystem.htm
     
  7. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    I've recently tried vue trees but the exported trees are not suitable, that is what kicked off the whole 'make a nature system' thing for me. I suspect that the only way to generate maximum optimised trees for Unity games is to build them from scratch. I've tried a few tree makers over time and I think they all generate masses of unnecessary geometry for this particular purpose. Of course I will be more than happy to be proved wrong so if anyone comes across stuff that'll make the process easier and quicker then great :)
    Cheers
    Boxy

    Edit: actually while we're on the subject, is there a definitive list of UniTree members yet?
     
  8. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    That's been my experience as well. I just gave the Blender "Gen3" script a try and created one of the default trees (an aspen I believe). The resulting tree had about 117,000 poly's. Then I ran the reduce mesh script at it's default settings which reduced the mesh to about 48,000 poly's. Attached is a screen shot from the Blender editor.

    You might be able to use a script or application like this to create the trunk and then manually create the smaller branches and leaves as bitmaps and apply them manually. Would still be a lot of work though...
     

    Attached Files:

  9. DocSWAB

    DocSWAB

    Joined:
    Aug 28, 2006
    Posts:
    615
    BigKahuna, thanks for giving the Blender plugin a try -- I downloaded it, but hadn't gotten as far as seeing if it still worked in 2.4.

    The attraction of TreeMagick (enough to get us over the Windoze thing) is that it does billboarded leaves and supposedly will create a decent tree with around 1K polys. We may just have to bite the bullet and give it a try.

    The thought of manually placing all those leaf billboards just gives me the heeby-jeebies!

    Thanks, everyone.
     
  10. Randy-Edmonds

    Randy-Edmonds

    Joined:
    Oct 10, 2005
    Posts:
    1,122
    I've been wondering if TreeMagik will work for Unity for quite some time now. I'll be interested to see what others say...

    With that said, I have another thought AlienCodec (the people that made TreeMagik) also sells pre-made trees.
    http://www.aliencodec.com/product_instatrees.php I assume these trees were made with TreeMagik. This is worth a look.
     
  11. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    Well if someone is going to check this out please do report your findings. Also, I don't know who makes the final decisions on UniTree but it seems pointless everyone else wasting precious time building trees if these ones are going to be acceptable. We may as well just buy a bunch of them off the shelf if that's the case.
    Guess there's not much point making trees until we get some results and a consensus. I'd be very interested to see what you think of TreeMagik.
    Cheers
    Boxy
     
  12. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,647
    well guess it's lunch time for me! going to check it out now. if i can get a file out of the demo that is. BUT... keep working on trees. looks to me like their license won't let you distribute the models with unitree. you can use them for a game but not as examples etc.

    edit... it's the instatrees license i was looking at. bet you can use ones you make...
     
  13. DocSWAB

    DocSWAB

    Joined:
    Aug 28, 2006
    Posts:
    615
    Boxy,

    I can't speak for OTEE, but there are a couple things going on that I am aware of:

    1. OTEE does want to include some new trees in the UniTree Nature Rendering release. Obviously permission to distribute those will need to be granted by their creators, and we can't just do that with the ready-made ones.

    2. The InstaTrees come in these formats: 3DS, X, B3D and LWO. I get the impression that Unity doesn't open these unless you have 3DS or Lightwave installed. We are becoming a Maya shop, so we can't quickly use these formats. Am I wrong about X and B3D formats?

    3. For our project, we have a need for quite accurate models of specific species of tree that we have not found off the shelf versions of yet. So we are looking for a way to make them.

    4. The UniTree project is shooting for quality closer to Oblivion, etc (see the UniTree wiki. Looking for 2-3K poly trees instead of the 1K polys that the InstaTrees are.

    So this is all to say we are definitely in the market for some new, better trees. I'm sure if TreeMagick is our last best hope or not.

    Cheers,
    Steve
     
  14. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    Just found this site and the models don't look bad:

    http://www.game-stuff.com/plant.html

    There were a couple other tools I found months ago, if I dig up the links I'll post them here.
     
  15. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    Doc
    No problem, I think my post came out with the wrong tone. Just meant it would indeed make more sense to use a quicker way if that way was acceptable and feasible. But I will keep going on this as per Pete's instructions.
    I imagine Maya will be able to open 3DS files. I know I can open 3DS and Lightwave in Cinema 4D and if the licence allows (probably not) I'd gladly convert those to .obj for you. Or actually you could possibly do the conversion through a freebie app like Blender?
    Cheers
    Boxy
     
  16. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    I think if people want to contribute trees to unitree they should do it in the fbx format. Or if thats not possible obj. Then everyone can load it.
     
  17. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,647
    yeah definitely fbx. i was planning on running though lightwave and exporting to fbx.

    treemagik looks ok but not for unitree i don't think. played with the demo for a half hour. couldn't export so i don't know for sure if it's useful at all. i don't see it as what i think the quality should be for unitree. the modeling method on the wiki is a better way to do it for wind etc (leaves are simple billboards in tm) but maybe it could be used for a draft that you further edit in a modeling app.

    bigk... great find! some cool stuff there and pretty cheap! the tree textures look good but again they aren't modeled as well for wind. but still they're pretty nice. all of it looks pretty professional. i could certainly see grabbing the props and stuff.

    hmm... otee, your next product could be a tree generator done right... i'd buy! in the meantime i don't think there's a quick solution other than good ol modeling.
     
  18. DocSWAB

    DocSWAB

    Joined:
    Aug 28, 2006
    Posts:
    615
    I actually bought a couple of those models because they did look good. Downloaded them and discovered they were .max (not .3ds) and I don't have anything that can open them. So that's kind of a pain.
     
  19. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,647
    what are they? maybe i can convert em for you. [edit... whoops! just reread your post. i can't do anything with max. didn't they offer any other format?]

    btw... treemagik does have a duckbill option for the leaves. i couldn't see the polys. so can't say how it's set up. maybe good enough for base geo that you can edit in a proper app. might speed things up. guess i got to shell out 49 bucks to find out. i'm with stupid :arrow: me :D
     
  20. Richard_B

    Richard_B

    Joined:
    Jul 22, 2005
    Posts:
    436
  21. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    Good site, some nice looking trees too. I'm not having the same succes so far :)
    Boxy
     
  22. Richard_B

    Richard_B

    Joined:
    Jul 22, 2005
    Posts:
    436
    Boxy - I am in tree making mode at the moment so will report back if I have any luck in creating some half decent low rez trees. I am trying to see if there is a good workflow that will take me from a hi rez tree produced in say Onyx or xFrog and produce a reasonable low rez version for Unity.

    Richard.
     
  23. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    Nice one, thanks Richard.
    Boxy
     
  24. David-Helgason

    David-Helgason

    Moderator

    Joined:
    Mar 29, 2005
    Posts:
    1,104
    (An aside to the prevailing discussion)

    I just wanted to make sure that a slight misunderstanding about supported formats wasn't perpetuated:

    Unity supports the .3ds format (3DStudio's pre-Max format) which is almost universally supported, including (as far as I know) by Maya.

    Unity supports Lightwave through it's FBX exporter. Thus, .lwo files are not natively supported.

    d.
     
  25. DocSWAB

    DocSWAB

    Joined:
    Aug 28, 2006
    Posts:
    615
    Thanks for the clarification, David. I was mixed up between old .3ds and new .max format. The InstaTrees are .max files. Paul was kind enough to convert the InstaTrees I bought for FBX, and I'm still working on wrangling them into Unity.

    Steve
     
  26. Joachim_Ante

    Joachim_Ante

    Unity Technologies

    Joined:
    Mar 16, 2005
    Posts:
    5,203
    This one seems promising. Requires Maya and runs only on windows though.
    But they do talk about game development and low poly trees.

    http://www.bionatics.com/
     
  27. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,647
    looks nice and they have models for sale. but *sigh* still it's just quad billboards it seems. treemagik can do that for $49. i might just roll my own. something that uses better geo for low res stuff. maybe like a soler's blender l-sys but low poly. let ya know if i get ambitious...
     
  28. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    It appears that XFrog may work in the Mac version of Cinema 4D (or Maya?). Can anyone confirm this? Will the "game oriented plugin" discussed earlier work with this?
     
  29. deram_scholzara

    deram_scholzara

    Joined:
    Aug 26, 2005
    Posts:
    1,043
    xfrog is a plugin for cinema 4d, I have it, it's confusing, but is a great tool. It works for mac and windows.
     
  30. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Do you use it in your game art pipeline? I'd be interested to hear if it's a contender (especially with XFrogTune—the poly reduction addon). Too bad they're $$$.
     
  31. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    I've often contemplated XFrog too, I'd like to see any samples in game.
    There's also VB trees:

    https://www.vbvisual.com/

    They look great if a bit heavy on the poly count, but that might be reduceable. They also come in all 4 seasons which you can change with a click. I wanted to get some of these for work anyway but I can't because you need a vat number to register with them in order to download individual items - something a small concern like me can't really afford to do - (please add a 'very frustrated' emoticon, can't see one which expresses my frustration over this hehe).
    Boxy

    But I just noticed they do free demo downloads so I'll check that out too. However I think their licence precludes distribution of the software so...
     
  32. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    The VB trees look really good actually, might have to save up for a full volume - I guess possibly not for UniTree. Even if we could reduce the polys we'd have to ask them about the licensing thing. But the seasons implementation is great, the download comes with a plugin in several formats (I chose C4D) and you just change the season by clicking on an appropriate box.
    Boxy
     
  33. Marble

    Marble

    Joined:
    Aug 29, 2005
    Posts:
    1,268
    Now that you've got some, what's the average number of polys?
     
  34. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    I have just downloaded the freebie sample - 2273 tris of which 256 are the trunk, 1198 the billboard branches and 819 the billboard leaves. For a start the trunk could be reduced to 24 tris at most, just 4 at least. I'm pretty sure the branch billboards could be reduced and an extra UV set could be added to the leaf texture which incorporates more branching. I quite like the way this is constructed but I don't know whether it would be suitable for animating wind effect in Unity?
    Cheers
    Boxy

     
  35. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,647
    vb looks cool. some are a bit high poly but some are pretty low. looks very high quality eitherway and there's certainly plenty that are usable. for unitree, yeah you can't distrib the models. but if there's a way to do them as untiy primatives that you can't get out and edit, i bet it'd be ok. would be kind of limiting though if you can only use primatives with unitree.

    how are they doing branches etc., just quads? i keep badgering that point because a single quad isn't as flexible for wind effects as a non-planar shape made up of tris. it'd still work just less precise. i'll su on that point now... :)

    i'm about 60% done on my first model for unitree and have a plan for a better one in v2. if only i could take a day off work!

    [posted at the same time boxy. care to show a wire? i gotta go though. so see ya monday probably...]
     
  36. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    The branches are billboards. This one has 66 tris but that could be whittled substantially I think.
    Cheers
    Boxy



    Edit: and the leaf billboards are arranged along the branch billboard...

    Edit 2 :) Forgot to mention, this download came with a high res version of over 4000 polys and a lower res version. This is the lower. I guess they will all come like that.
     
  37. Viking Dan

    Viking Dan

    Joined:
    Dec 21, 2005
    Posts:
    52
    There's also Arbaro. It can do obj, pov ray and DXF.
     
  38. deram_scholzara

    deram_scholzara

    Joined:
    Aug 26, 2005
    Posts:
    1,043
    I'd have to say that I've never used it for games before... but it is certainly capable of working well for them, as it is completely customizeable.
     
  39. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
  40. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    Wow, there are plenty of options coming to the table. I tried Arbero but couldn't get my 3D software to recognise any of the export formats.

    Here is a tree I'm working on using the VB inspired method - except my bare branches actually have leaves on them too. I need to go in and refine it, reduce the size of some leaves and try and hide those flat plane artefacts as much as I can, but this is the fullest I've managed to get a tree under 2k tris so far (1959). With another 40 polys to play with I might experiment with some more defined roots at the base.
    Didn't take too long either because I just set one branch up then duplicated it to form a rough ring around the trunk, then duplicated that ring up the tree a few times. Obviously some post tweaking to sizes rotations and positions to avoid it looking repeated but its getting there...
    Cheers
    Boxy

     
  41. Richard_B

    Richard_B

    Joined:
    Jul 22, 2005
    Posts:
    436
    Boxy - your tree looks very good - still trying to get mine to work :(

    Richard.
     
  42. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    Thanks Richard. I've realised that I have a few unnecessary polygons in there so the count can be reduced further without altering the shape. The method needs refining too - currently the main branch and smaller leaf textures both use the same image, but I think I need to create 2 images on the same texture - 1 for the branch with thicker branch/ smaller leaves and one for the leaf shoots as they are now. If this method is OK to use for animation etc and if anyone is interested I'll gladly do a quick tutorial on how I'm doing it.
    Thanks
    Boxy
     
  43. AGhost

    AGhost

    Joined:
    Apr 13, 2006
    Posts:
    90
    Here is my tree using Arbaro, rendered in Unity:



    I can't get the Alpha leaves to work though.
    AGhost
     
  44. Richard_B

    Richard_B

    Joined:
    Jul 22, 2005
    Posts:
    436
    What I need at the moment is a lightmapped, alpha and two-sided shader :-(

    Richard.
     
  45. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    I haven't got as far as lighting in Unity and as for shaders, anything beyond cutting and pasting bits from other shaders is currently way out of my league :)
    Cheers
    Boxy
     
  46. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,647
    that looks good boxy. should be able to paint it for wind ok. maybe some reduction on the branch polys like you said just to simplify.
     
  47. boxy

    boxy

    Joined:
    Aug 10, 2005
    Posts:
    675
    Thanks Pete, I also posted an update here with an fbx to check over.

    http://forum.unity3d.com/viewtopic.php?t=3154

    Still trying to suss a workflow so should you find anything that can be made better please do post it in that thread.
    Cheers
    Boxy
     
  48. bigkahuna

    bigkahuna

    Joined:
    Apr 30, 2006
    Posts:
    5,434
    I just gave "TreeMagikG2" a try. Although it looks like it has potential, it seemed kind of buggy on my system. Anyone else try it yet? The problem might be my system, it's been pretty flakey since I updated it's nVidia driver...
     
  49. pete

    pete

    Joined:
    Jul 21, 2005
    Posts:
    1,647
  50. DocSWAB

    DocSWAB

    Joined:
    Aug 28, 2006
    Posts:
    615
    We bought TreeMagikG3 last week and have been playing around with it. (The AliencCodec Web site is down or expired now, which is very strange).

    The aspen trees in this demo were made with TreeMagikG3:
    http://eduweb-labs.net/wolf/demos/Yellowstone_Walkthru.html

    Some observations:
    1. The program works reasonably well and we were able to do this fairly quickly.
    2. The OBJ export works in Unity directly if you use the automated leaf mass placement. If you use the leaf painter and place leaf masses yourself, the mesh is funky. I solved this by exporting the OBJ to FBX in Cheetah and using that mesh.
    3. Tree poly counts are around 2K
    4. The trunk is a cylinder mesh with stubby branches. The leaf billboards are combined into a single mesh.
    5. The leaf texture includes branches that attach to the trunk. If you use the leaf painter and cluster groups of leaves, this leads to a bunch of branches all attaching at the same spot on the trunk. What I did to fix this (sort of) was to remove all but the central branch from the texture image in PhotoShop.
    6. The leaves look pretty good using the Vertex Unlit shader from the Nature Pack.
    7. Somebody who really knows what they're doing with Maya or Blender can probably get a much better trunk with basic branches, and then create billboarded leaf masses and manually place them. We'll probably switch to that method after we get more of our world built out.

    We'd love to hear anyone else's experience, too.

    Cheers,
    Steve
     

    Attached Files: