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?
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.
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.
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.
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:
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?
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.
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.
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...
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.
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....
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.
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....
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
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.
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.
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?
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?
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.
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.
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.
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!
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).
Replies
I made some more tests.
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.
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.
http://www.pure3d.de/english-version/pure3d-gameart-division/european-vegetation-set-shop-of-pure3d-department.html
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?
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.
http://3dmyths.blogspot.com/2010/06/tree-modeling.html
It is a PDF about tree modeling techniques, the download URL is:
http://3dfolio.com/files/tree_tut.pdf
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.
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...
http://www.scriptspot.com/3ds-max/scripts/tree-maker
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....
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.
700k is mostyl understodd as 700.000.
I guess you mean 700 polies/tris?
Arbaro looks good. Does it merge the branches with the trunk, or are they interpenetrated instead?
An interesting overview of plant modeling here.
http://www.vterrain.org/Plants/
Time to redefine low-poly vegetation? :P
Hope someone will find it useful
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..
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?
Thanks again.
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.
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.
"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!
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.
http://udn.epicgames.com/Three/ContentBlog.html#Explicit Normal Support
Thanks Epic!
http://wiki.polycount.com/Vertex%20Normal
http://wiki.polycount.com/VertexNormal#Slide_Normal_Thief
I will give it a try the next time I do some foliage; Normal Thief never worked on my PC.
I'll let you decide which is best
Edit: and thanks Eric for continually helping me to improve my trees!
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).