Goals in Screenshots
More screenshots: UnitreeGoals
Tree modelling requirements
Every tree should consist of a single mesh with 2 materials. 1 Material for the trunk, 1 Material for the leaves.
Triangle count should be kept below 2000 triangles for an average tree. Exceptions can be made if it is really really necessary but please keep all trees below 3000 triangles.
Trees don't need to come with multiple lod meshes, instead focus your time on making the trees look best with 2000 triangles.
Please make sure the pivot point of the tree mesh is exactly at the root of the tree, that is at the point where the tree should meet the surface it is placed on. Also make the branch slightly longer so it extends a little bit into the terrain. This will help with reducing lod artifacts from the terrain being simplified when far away. (Otherwise trees might start floating slightly in the air).
Please provide trees in the fbx format. It is easiest to import into Unity and other modelling applications
Unity tree rendering algorithm
The goal for the tree renderer is to use high quality custom lighting for the trees and do automatic billboarding, but no additional mesh based lod.
We will use a spherical harmonics based shader. Lighting will be handled specially to simulate the self shadowing effect of trees. The shader will be made available to Unitree members as soon as it is working solidly. The tree leaves will have some simple waving animations using vertex shaders.
The goal is to render around 10 trees around the player using the original tree mesh. Total triangle count for it will be 10 * 2000tris = 20.000 triangles for nearby trees.
All other trees will be rendered using billboards. The billboard texture will be automatically generated from the original tree mesh by drawing into Render Textures with the exact same lighting used for rendering the original tree. This way there is no difference between drawing the billboard and the original tree, if rendered into the same resolution render texture. The resolution of the render texture will probably be different, so you will see a pop but it will be very small.
By using billboards for far way trees we can easily render 10.000 trees with no big performance hit. Rendering those 10.000 trees will be as expensive as rendering the 10 close up trees. Now thats scalability.
The reason for leaving out mesh based lod is that it is hard to make closely matching tree meshes with lower resolutions. At the distance where mesh based lod is not very visible, we might as well use billboards.
Low poly tree example
Download the low poly example tree here: Low_polytree_example.zip
The tree contains only 920 triangles.
Download the project folder containing the fbx file for the whole tree, to see how it was made:
The tree itself is maybe not be the very best but it shows how to get a lot of detail and coverage into a low poly tree.
One branch with leaves is done with only 6 triangles and shows quite a bit of curvature. You can add more triangles for even more curvature. But the main point is: When making trees, work with triangles not with quads. If you use quads you basically need twice as many triangles to get the same curvature on branches.
The tree itself wastes a lot of fillrate by having large polygons but almost everything is invisible due to the alpha. This should be avoided for performance reasons and of course because the goal is to make dense trees.
This is one of the things that makes oblivions trees look great. They are so dense you cant even see through the leaves.
Unitree Texture Library v1.1
You can download a zipped folder that contains reference photos, tileable bark textures and high res leaf textures with an alpha channel. These textures are Unity ready and can be used for your tree models.
Here are the trees currently included:
New in v1.1:
If you want to contribute textures please email them to youngamaker at rushmore dot com
We now have basic shader implementation ready. These will be made to look better, but the overall shading level will remain the same - hence these are the ones to gauge by.
How to create good splatmaps TextureSplat
Work in progress
Add zipped trees or screenshots of trees you are working on here. The Trees