Home Technical Talk

Tree making fast technique?

13

Replies

  • JostVice
    Options
    Offline / Send Message
    JostVice polycounter lvl 12
    tiny bump here, but this is the only topic talking about the normal thief. I'm trying to get a good looking tree but right now the problem is that everything looks like an island on itself, so I think I need the normal thief technique. thing is, how should the shape to steal the normals from be? I tried making a lowpoly sphere-ish shape but that didn't turn out to well, In one pic it seems eric had a piramid-like shape pointing in a direction, it is supposed to be like that?
  • Eric Chadwick
    Options
    Offline / Send Message
    I used a super-low-poly mesh for my reference object, thinking that less vertex normals would speed the script up. But it didn't, the speed seems to be relative to the number of vertex normals on the selected mesh (the tree foliage).

    I made some more tests.

    normalthief_tests.jpg

    The one on the right didn't turn out so hot because I used a bunch of spheres for my reference mesh, so some of the foliage normals got bent inwards instead of outwards.

    The one on the left is better, a more rounded blobby-looking reference mesh. But the foliage mesh itself is bad, directly exported out of the tree[d] tool.

    I think Normal Thief isn't all that worth it. Way too slow, and I got better results by tweaking the normals of one tri-shaped branch-mesh (like Jeramy Cooke's mesh), then duping that around the tree manually (the trees on the far right below). Just have to be sure to Reset Xforms before attaching them into one mesh, otherwise the edited normals get messed up.
    Tree_Normals.gif
  • michi.be
    Options
    Offline / Send Message
    michi.be polycounter lvl 17
    I saw michi.be vegetation done for crysis and must say some nice pieces there... Maybe he can bring more light into this..
    I'm also interested in bushes and smaller vegetation examples.. Cause this ones are even closer to player..
    Yes I could fill up a whole DVD about vegetation modeling but the vertex stuff was also new to me. :)

    Normally I decide what kind of tree I want to do, search references and take photos for leaves or extract textures from photos. I also decide on my poly budget (If I do a forest scene I dont go to crazy for each tree, if I need only some trees for close-up like beside a building I spend more details)
    My leaf density isn't to dense on one plane (I use render to texture highpoly branches sometimes) because I noticed it looks to dense then and each plane is to obvious. So less leaves on one plane did the trick to me.

    For the trunk I use splines and extrude along spline and sometimes I do a basic rig so I can just change the branch to get a new tree quickly.
    I even did a unique Mudboxed trunk in some cases.

    Working with a grouped branch/plane cluster is also nice. you get some kind of modular layout for your shape.

    It's also a nice way to do the branches first and then just duplicate a bunch of planes to give it a shape. I don't use simple flat planes but a diagonal 90 degree plane. Like Crytek set up the trees in Crysis.

    You could also use Arbaro for branch creation and place your own leaf-clusters.

    There are so many ways to do good trees. I've seen some very good tutorials by a guy (think he's also on polycount) which uses camera mapping.

    You could go to www.pure3d.de and take a look at the .pdf from my vegetation set shop. Maybe you find some inspirations how they are done.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    coudlnt find any tree in this site ....
  • Eric Chadwick
  • michi.be
    Options
    Offline / Send Message
    michi.be polycounter lvl 17
    lol its hard to type in the own company name correct. ;)
  • JostVice
    Options
    Offline / Send Message
    JostVice polycounter lvl 12
    those trees look brilliant michi.be!

    here is my try. I've already learned a few things after making this (I think the leave texture should have less leaves) so I might start from scratch for next one:

    Large pic, should have resized it: http://uppix.net/8/e/a/90cbc745a03ffba08b66be54bc811.png

    trying to get it to look good... right now it has a faked sub-surface scattering like crysis did (with a grayscale texture) but it still looks bad as you can see. The normal thief method takes too long, and I tried softing the normals in the branches but i'm not sure how much should I push them?

    94f03c0bff5cdc27c19d5d1de9fad.png
  • Eric Chadwick
    Options
    Offline / Send Message
    Yeah a more sparse leaf distribution on the texture seems to work better. Also your centerline branch is getting doubled-up from some angles, looks odd.

    For the normals, at each apex I bend its normals together as one, and such that all of them are pretty much pointing away from the center of the mesh. Attempting to make a sphere-like shading for the crossed mesh.
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    something I stumbled upon today:
    http://3dmyths.blogspot.com/2010/06/tree-modeling.html
    tree_tut.png
    It is a PDF about tree modeling techniques, the download URL is:
    http://3dfolio.com/files/tree_tut.pdf
  • michi.be
    Options
    Offline / Send Message
    michi.be polycounter lvl 17
    This is how I started to do my branches.

    Battlefield 2 used a nice method of branches and leaf setup too. They split a 1024px texture in four 512px sectors and did another material on each. So you have four materials to get rid of generic look but on one texture which is nice for graphic card streaming.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Very nice I ll start looking into this now for the moment I am remaking again now the trees restarting from the very trunk shape , retexturing it , detaching into parts etc , I am trying nw to give a more natural and less straight-obviouse look .... for two types of giant kapoks ....

    50 m more or less , comparing to the crysis jungle trees those are double size of their biggest ones ...


    here the shapes the canopy is just cloned by the oklder tree so I will redo it but for now its this one , I could eventually make two different sets of canopy for each of the tree and by just twisting a bit the roots I could get 4 different giant trees , woudl this be a problem then when having them on the screen ? or is better just have one?

    now the trunks are much low poly for now like around 700 k each after the optimization of the topology...

    newkapoks.jpg
  • renderhjs
    Options
    Offline / Send Message
    renderhjs sublime tool
    not sure if it was mentioned here but tree maker is actually a fantastic script that speeds up the modeling process:
    http://www.scriptspot.com/3ds-max/scripts/tree-maker
    tree_maxscript.0.jpg
    the way it works is that it creates a set of branches that are linked to each other. After that first random generation you can still adjust the brances such as their rotation (with its linked sub branches) and once happy with the direction let the script compute it to a decent Mesh.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    renderhjs wrote: »
    not sure if it was mentioned here but tree maker is actually a fantastic script that speeds up the modeling process:
    http://www.scriptspot.com/3ds-max/scripts/tree-maker
    tree_maxscript.0.jpg
    the way it works is that it creates a set of branches that are linked to each other. After that first random generation you can still adjust the brances such as their rotation (with its linked sub branches) and once happy with the direction let the script compute it to a decent Mesh.

    I actually don't like it , I cant have much control on the shape I want and what I have in mind , I feel more confortable with just handmodeling or spline modeling , I actually made 2- 4 splines branches then I rotate and move around and merge into others then I refine with more edge divisions eventually , I find this system quicker , and get better results ...

    700 a lot? In crysis I read that even if I make lods and I hit 300 k useless I make less poly couse the engine woudl spend more memory loading further lods than actually gaining any advantage by meshes under 300 , an average tree model in crysis has around 1000 polys , jungle trees arrive actually to 2000 , I was planning to actually have lot more polys for my kapok trees like even 8000 polys and then make a lod of 4000 , just couse aren't common trees but you may find one every now and then , and especially they have very visible roots , are 50 m tall and cover a lot of space on top of the other trees as canopy .... I plan to instead stay around 1500 polys for big trees , 800-1000 for medium , 500 -700 for small , and around 300 and no lod for the smaller ones....
  • Eric Chadwick
    Options
    Offline / Send Message
    700k is a lot of mesh!

    I agree TreeMaker is OK at making the mesh, if you want the typical L-system layout, and don't mind spending a bunch of time adjusting spinners. ;) I wish the tools were there for generating nice trees, but they're not, unfortunately. Modeling by hand still has by far the best results.

    Using a game's editor to check out their foliage is a great way to see how others do their trees. For example if you don't own Crysis, the demo comes with an editor, and can be used to examine their models, which are very nicely done IMO.
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    700 a lot? In crysis I read that even if I make lods and I hit 300 k useless I make less poly couse the engine woudl spend more memory loading further lods than actually gaining any advantage by meshes under 300 , an average tree model in crysis has around 1000 polys , jungle trees arrive actually to 2000 , I was planning to actually have lot more polys for my kapok trees like even 8000 polys and then make a lod of 4000 , just couse aren't common trees but you may find one every now and then , and especially they have very visible roots , are 50 m tall and cover a lot of space on top of the other trees as canopy .... I plan to instead stay around 1500 polys for big trees , 800-1000 for medium , 500 -700 for small , and around 300 and no lod for the smaller ones....
  • michi.be
    Options
    Offline / Send Message
    michi.be polycounter lvl 17
    I use "arbaro" often for the trunk and my own stuff for the leaves.

    700k is mostyl understodd as 700.000. ;)
    I guess you mean 700 polies/tris?
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    yes 700 triangles...
  • Eric Chadwick
    Options
    Offline / Send Message
    Ahhh, yes k usually means 1000. ;) 700 triangles is great!

    Arbaro looks good. Does it merge the branches with the trunk, or are they interpenetrated instead?
  • Eric Chadwick
    Options
    Offline / Send Message
    Nope, arbaro just interpenetrates them, like nearly all the other apps.

    An interesting overview of plant modeling here.
    http://www.vterrain.org/Plants/
  • cupsster
    Options
    Offline / Send Message
    cupsster polycounter lvl 11
    I usually try to go about 2500 tris per tree (I think this is the sweet point for mid size tree for this year ;) ) cause I don't see the point to make it less. Most of modern game engines are making billboarding at distance so tree distribution and fill-rate is something which hits engine hard most of the time.. Also you should take into account that GPU memory and speed is increasing from day to day so making too low-poly stuff will not benefit visual quality too much, just make that low-poly tree to look more obvious and jaggy..
    Time to redefine low-poly vegetation? :P
  • cupsster
    Options
    Offline / Send Message
    cupsster polycounter lvl 11
    Also something about hallos at edges of texture Photoshop AlphaUtility.atn. more about using it you can find at HOWTO - alpha maps
    Hope someone will find it useful
  • cupsster
    Options
    Offline / Send Message
    cupsster polycounter lvl 11
    Any sugestion about this lower part of trunks? How that can be solved?

    http://www.shutterstock.com/pic-14510662/stock-photo-birch-tree-alley-at-sunny-spring-park.html

    so far.... splited trunk but I will try to make transition part in texture an properly map them..

    screen01_birch01.jpg
  • Eric Chadwick
    Options
    Offline / Send Message
    I would simply pack two bark textures into one sheet, using the thirding rule. Trunk base at the bottom of the texture, and rest of trunk/branches on top. Make "rest of" section tile with itself. Or you could make them side-by-side instead.

    thirding.jpg
  • NAIMA
    Options
    Offline / Send Message
    NAIMA polycounter lvl 14
    Now that's really an interesting trick .... I think I may try it ....
  • cupsster
    Options
    Offline / Send Message
    cupsster polycounter lvl 11
    Yep, know about thirding.. :) Side by side should do the trick. Will try later today.
  • Eric Chadwick
    Options
    Offline / Send Message
    The developer for tree[d] uploaded a fixed B3D importer for 3ds Max, works great now... brings in vertex colors, and each branch & leaves are separate meshes (easy to edit!), and everything's in a nice hierarchy. Great for making branch/leaves textures.
  • Eric Chadwick
    Options
    Offline / Send Message
    I added some info to the wiki about how to edit vertex normals in 3ds Max, might help someone.
    http://wiki.polycount.com/Vertex%20Normal

    I only have Max 2010 here, so I can't export to CryEngine. Apparently only licensees get the Max 2010 exporter. Does anyone know if CryEngine supports edited vertex normals?
  • snow
    Options
    Offline / Send Message
    snow polycounter lvl 8
    Thanks Eric for adding that info to the wiki, that's extremely helpful to me. Can you explain why the reference geometry for normal thief is set out the way it is in your example? I can't understand the logic behind those red planes. If you could possibly add a little info about that to the wiki I would highly appreciate it. Also, is Normal Thief a program you can teach yourself by playing around with it - or is there some sort of documentation for it?

    Thanks again.
  • Eric Chadwick
    Options
    Offline / Send Message
    I want to replace that pic on the wiki with something better. The red shape was just a box with some edges cuts into it and the vertices moved around some. Nothing special. I thought a simpler mesh would speed things up, but it didn't really. Normal Thief worked better when I fed it more of a metaball-style shape.

    I would suggest modeling roughly the shape of the canopy, and using a single smoothing group, just modeling a shape that looks like how you want the tree's normals to point. I have some pics of other Reference shapes here.

    There's no documentation AFAIK, except what the author posted on Scriptspot.
  • explorer3d
    Options
    Offline / Send Message
    explorer3d polycounter lvl 13
    Hello Eric .I read your tutorial about the tree scttering http://ericchadwick.com/img/tree_light-scattering.html(.It's really cool. but I still not fully understand. how do you set the meterial in UDK.(how do you link regualr normal and inverted normal as a meterial)I have try a few times but it still doesn't work. I hope you can help me. Thanks a lot.
  • Eric Chadwick
    Options
    Offline / Send Message
    I made it using a custom graphics engine at a place I used to work, using an "uber" style shader.

    I'm not exactly sure how you would set it up in UDK, though their material editor certainly seems strong enough to do something similar.

    Here's some shader tree ideas in Shader FX, might be translatable to UDK.
    http://www.lumonix.biz/yabb/YaBB.pl?num=1250284717/0

    I might tackle this in Shader FX myself at some point, it's kind of a cool effect.
  • explorer3d
    Options
    Offline / Send Message
    explorer3d polycounter lvl 13
    I made it using a custom graphics engine at a place I used to work, using an "uber" style shader.

    I'm not exactly sure how you would set it up in UDK, though their material editor certainly seems strong enough to do something similar.

    Here's some shader tree ideas in Shader FX, might be translatable to UDK.
    http://www.lumonix.biz/yabb/YaBB.pl?num=1250284717/0

    I might tackle this in Shader FX myself at some point, it's kind of a cool effect.

    Oh, that is how it is! Thanks for your kindly reply. I will read the article and try it in UDK again.
  • snow
    Options
    Offline / Send Message
    snow polycounter lvl 8
    Can someone please explain what michi.be meant by,

    "I don't use simple flat planes but a diagonal 90 degree plane. Like Crytek set up the trees in Crysis. "

    I apologise for not being able to figure it out!
  • Eric Chadwick
    Options
    Offline / Send Message
    I think he means: Make a quad, and convert it to triangles, so there's an edge running from one corner to the other. Then using the quad's middle edge as the axis, rotate one of the triangles 90°.

    To see it in action, download the original Crysis SP demo. Once you install it, there will be an Editor folder where you installed the game, so run the Sandbox installer in there. You can then load the whole Island.cry level, or you can create a new level and load each tree into it to examine in detail. That's the best way to see how they did such a great job with their foliage. Very instructive.
  • Xendance
    Options
    Offline / Send Message
    Xendance polycounter lvl 7
  • Eric Chadwick
    Options
    Offline / Send Message
    Awesome!

    Thanks Epic!
  • Makkon
    Options
    Offline / Send Message
    Makkon polycounter
    Haha, I was just about to post that! Makes me want to go model some trees!!!
  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    Hmm, I'm pretty new in modeling, what that's mean "explicit normals" ? In what it is great ?
  • Eric Chadwick
  • Froyok
    Options
    Offline / Send Message
    Froyok greentooth
    @Eric : yeah, absolutely, thank you very much !
  • Eric Chadwick
    Options
    Offline / Send Message
    Update... new tool from a friend over at Slide London, the same guys that made SlideKnit. He rewrote the NormalThief script to run much faster. Now it's totally usable!

    SlideNormalThief_UI.png

    http://wiki.polycount.com/VertexNormal#Slide_Normal_Thief
  • teaandcigarettes
    Options
    Offline / Send Message
    teaandcigarettes polycounter lvl 12
    Awesome, thanks for posting that Eric.

    I will give it a try the next time I do some foliage; Normal Thief never worked on my PC.
  • ParoXum
    Options
    Offline / Send Message
    ParoXum polycounter lvl 9
    Just tried it, it seems to distribute the normals in another way than the first script. Somehow with the same reference mesh.
  • Eric Chadwick
    Options
    Offline / Send Message
    Pictures? I didn't test them side-by-side, curious what you're seeing.
  • ParoXum
    Options
    Offline / Send Message
    ParoXum polycounter lvl 9
    Left SlideKnit Thief, right Normal Thief

    a444865b3a8a104a8ceae9b019bfc.jpg

    I'll let you decide which is best :p
  • Eric Chadwick
    Options
    Offline / Send Message
    I had this problem earlier, but he said he fixed it. Did you try a Reset Xform on both Reference and Target?
  • ParoXum
    Options
    Offline / Send Message
    ParoXum polycounter lvl 9
    Nope, but will try it as soon as I can ;) Glad to hear it can be fixed. Thanks
  • snow
    Options
    Offline / Send Message
    snow polycounter lvl 8
    Ouch! Let us know if you have any success ParoXum. :)

    Edit: and thanks Eric for continually helping me to improve my trees!
  • Eric Chadwick
    Options
    Offline / Send Message
    np snow, glad it's helped!

    To be clear, I had exactly this problem with his first version of the script. But his next version fixed it, so it worked on the same exact model without me needing to Reset Xform or anything. He said it had to do with max's secret hidden magic transform, which is non-zero on very few objects (.objecttransform rather than .transform).
  • snow
    Options
    Offline / Send Message
    snow polycounter lvl 8
    Great I'll get it today, I'll miss being able to watch Lord of the Rings before normal thief finishes.
13
Sign In or Register to comment.