Anatomy of a Tree with Blender
by Carpenter Software · in Artist Corner · 08/24/2006 (12:24 pm) · 12 replies
In blender, unlike the trunk in tree2.dts (see the tread Anatomy of a Tree when using fxShapeReplicator) I created a trunk from a simple cylinder tapered at one end. Then I added three planes. From a top view where the planes are placed like an asterisk.
I placed the image png format on one of the planes via UV/Image Editor but I am having problems.
I want the image to show on both sides of the plane with the alpha channel active.
Any Suggestions are welcomed.
Thanks Jesse.
I placed the image png format on one of the planes via UV/Image Editor but I am having problems.
I want the image to show on both sides of the plane with the alpha channel active.
Any Suggestions are welcomed.
Thanks Jesse.
#2
Thanks - Not much is spoken on this subject. Imagine what other assets that can be created with this technique. For example, a head of a ghost in mesh but the body has an image partially visible. Rendering time can be reduced immensely in a game with many objects. I will take your advice.
08/25/2006 (12:35 pm)
@GustavoThanks - Not much is spoken on this subject. Imagine what other assets that can be created with this technique. For example, a head of a ghost in mesh but the body has an image partially visible. Rendering time can be reduced immensely in a game with many objects. I will take your advice.
#3
(1) As a test for making trees, use the foliage.png from tree folder from starter.fps.
(2) Create in blender a mesh of a tree trunk with planes that will represent the leaves. Note: To see exactly what I am talking about, view the tree2.dts in your Showtool Pro.
(3) UV map the tree image to the planes. While your are still in the UV Face Select Mode and the Editing Panel is still selected, you will see some Texture face toggle buttons. Select Tex, Twoside and Alpha.
(4) In Object Mode, set up your material. Add new tex from materials buttons. In Texture buttons, enter texture type image. Image here is your foliage.png. Toggle Alpha, MipMap, and UseApha. Go back to your materials buttons. In the Map Input toggle UV and Flat. In the Map To, toggle Col, Alpha, Emit and Sten.
(5) Set up your empties (ie Shape, Detail32, etc).
(6) Save your work.
(7) Do Quick Export - Torque Shape (.dts).
This method may not be complete - so please - Comments are Welcomed.
Edited: Method requires improvement.
Always use a test folder with only the dts file and your png file because the Showtool Pro may not select the intended file if there is more than one file with the same name but different extensions (ie .jpg).
Jesse.
08/25/2006 (9:29 pm)
I have a beautiful White Pine Tree.... With Blender I made the following settings:(1) As a test for making trees, use the foliage.png from tree folder from starter.fps.
(2) Create in blender a mesh of a tree trunk with planes that will represent the leaves. Note: To see exactly what I am talking about, view the tree2.dts in your Showtool Pro.
(3) UV map the tree image to the planes. While your are still in the UV Face Select Mode and the Editing Panel is still selected, you will see some Texture face toggle buttons. Select Tex, Twoside and Alpha.
(4) In Object Mode, set up your material. Add new tex from materials buttons. In Texture buttons, enter texture type image. Image here is your foliage.png. Toggle Alpha, MipMap, and UseApha. Go back to your materials buttons. In the Map Input toggle UV and Flat. In the Map To, toggle Col, Alpha, Emit and Sten.
(5) Set up your empties (ie Shape, Detail32, etc).
(6) Save your work.
(7) Do Quick Export - Torque Shape (.dts).
This method may not be complete - so please - Comments are Welcomed.
Edited: Method requires improvement.
Always use a test folder with only the dts file and your png file because the Showtool Pro may not select the intended file if there is more than one file with the same name but different extensions (ie .jpg).
Jesse.
#4
When using Blender to create these trees, I noticed a visual effect when viewing the trees up-close. When the planes are oriented to cross each other like a plus sign for example when viewed from the top. When the avator approaches the tree up-close the back view of the image bleeds through the front view. IS this visual effect common among other 3D rendering programs (ie Maya, Lightwave, etc) or is it a blender artifact?
Thanks Jesse.
08/29/2006 (1:15 pm)
I have so far created two sets of tree shapes: white pine and aspen. I used fxShapeReplicator to create forests in the missions. Because I used a very low poly count (96 triangles) for the trunk of the tree and used plane meshes (4 to 6 triangles) for images (leaves) with alpha channel. The forest has 3000 trees with a view distance set at 100 covering an area about 80 percent of the mission. The cpu is low at 530 MHz where the fps only dropped by 2 to 3. This is great - a nice forest to adventure.When using Blender to create these trees, I noticed a visual effect when viewing the trees up-close. When the planes are oriented to cross each other like a plus sign for example when viewed from the top. When the avator approaches the tree up-close the back view of the image bleeds through the front view. IS this visual effect common among other 3D rendering programs (ie Maya, Lightwave, etc) or is it a blender artifact?
Thanks Jesse.
#5
08/30/2006 (12:02 am)
If you use the same image fliped on X you should not see any artifact at all, because they will fit exactly.
#6
Yes, you are correct. If I used a single plane mesh, the image is mirrored on the other side with alpha active. With this single plane there is no problem. The problem is when there are two or more plane meshes crossing each other along the vertical-axis (z-axis) similar to an plus sign "+" when viewed from the top. As I approach the shape from the side where the z-axis is perpendicular to me, the back image of one plane bleeds through the other plane which is the front view. This may not be valid when viewing at different orientation than the one just described.
I hope I made myself clear. Jesse.
08/30/2006 (1:05 pm)
@GustavoYes, you are correct. If I used a single plane mesh, the image is mirrored on the other side with alpha active. With this single plane there is no problem. The problem is when there are two or more plane meshes crossing each other along the vertical-axis (z-axis) similar to an plus sign "+" when viewed from the top. As I approach the shape from the side where the z-axis is perpendicular to me, the back image of one plane bleeds through the other plane which is the front view. This may not be valid when viewing at different orientation than the one just described.
I hope I made myself clear. Jesse.
#7
http://tdn.garagegames.com/wiki/DTS/3dsmax/Z_Sorting_Explained
You will need to split every plane in two and organize them, so that TGE renderer understands the shape better.
08/31/2006 (12:33 am)
Oh, I see. I guess you have Z-sorting problems. Look here:http://tdn.garagegames.com/wiki/DTS/3dsmax/Z_Sorting_Explained
You will need to split every plane in two and organize them, so that TGE renderer understands the shape better.
#8
Thanks - I've just read "Z Sorting Explained". That is the exact problem I am having with both sets of trees. About halfway through, it mentions to use the "Sort" command. This paper was written initially for 3dsMax. Is there a similar "SORT" command for blender that will remedy the Z Sorting Issues?
Could you please explain how to split every plane in two and organize them.
Jesse.
edited:
I found some information at vBulletin: http://blenderartists.org/forum/showthread.php?t=72760. I'll try this tutorial to see if this helps or not.
edited:
The vBulletin tutorial shows the same artifact....
08/31/2006 (1:23 pm)
@GustavoThanks - I've just read "Z Sorting Explained". That is the exact problem I am having with both sets of trees. About halfway through, it mentions to use the "Sort" command. This paper was written initially for 3dsMax. Is there a similar "SORT" command for blender that will remedy the Z Sorting Issues?
Could you please explain how to split every plane in two and organize them.
Jesse.
edited:
I found some information at vBulletin: http://blenderartists.org/forum/showthread.php?t=72760. I'll try this tutorial to see if this helps or not.
edited:
The vBulletin tutorial shows the same artifact....
#9
edited: deleted...see next post
Jesse.
09/02/2006 (11:42 am)
I've spent a couple of days on this. I have found NO solution in this Z sorting issue...as explained by: http://tdn.garagegames.com/wiki/DTS/3dsmax/Z_Sorting_Explained. Is this the limited that blender can perform?edited: deleted...see next post
Jesse.
#10
http://blenderartists.org/forum/showthread.php?t=76474
edited:
I added a partial fix to the Z sorting issues:
(Added two png files to show the artifact (fromTestTree)
and the partial fix (fromTestTree1)).
http://www.carpentersoftware.com/testTree/testTree.sit
Any comments are welcomed
Jesse.
09/02/2006 (2:46 pm)
At vBulletin, someone there helped me out: http://blenderartists.org/forum/showthread.php?t=76474
edited:
I added a partial fix to the Z sorting issues:
(Added two png files to show the artifact (fromTestTree)
and the partial fix (fromTestTree1)).
http://www.carpentersoftware.com/testTree/testTree.sit
Any comments are welcomed
Jesse.
#11
As far as I know, you got the best we can right now with your last fix. In fact, if you take a look at the stock trees from the fps demo, both in TST and inside TGE itself, you will see they suffer the same partial problem. So, I think it is not a Blender exporter issue, but a TGE one.
Looks like the only way you can improve it some more is by using more than just two planes, as the stock trees, so that you got a more complex shape and this partially hides the Z sorting issue.
09/03/2006 (5:29 am)
Hi Jesse:As far as I know, you got the best we can right now with your last fix. In fact, if you take a look at the stock trees from the fps demo, both in TST and inside TGE itself, you will see they suffer the same partial problem. So, I think it is not a Blender exporter issue, but a TGE one.
Looks like the only way you can improve it some more is by using more than just two planes, as the stock trees, so that you got a more complex shape and this partially hides the Z sorting issue.
#12
This is a learning experience for me; using images with alpha channels and the first time I ever heard of Z Sorting Issues. As you may know, I am working from the bottom-up. The terrain, and populating the terrain, etc. Trees are such a natural setting, we take them for granted but they're such a complicated shape to render as with their cohorts the foliage. I wanted to learn everything about the limitations in using this method in creating trees before populating them in the terrains.
Jesse.
09/03/2006 (10:33 am)
@GustavoThis is a learning experience for me; using images with alpha channels and the first time I ever heard of Z Sorting Issues. As you may know, I am working from the bottom-up. The terrain, and populating the terrain, etc. Trees are such a natural setting, we take them for granted but they're such a complicated shape to render as with their cohorts the foliage. I wanted to learn everything about the limitations in using this method in creating trees before populating them in the terrains.
Jesse.
Torque Owner Gustavo Munoz