Jump to content

How to Create Trees with Billboard Leaves


photo

Recommended Posts

A quick how-to from our tech artists. I believe it could be useful :)

 

Step 1. Shape a tree.

  1. Probably the best way to create trees is to use specialized procedural generators, for example, OnyxTree or SpeedTree. Make sure that in a procedural generator of your choice four-sided polygons are supported for leaves. (Otherwise, such leaves can't be converted into billboards in Unigine.)
  2. Using photos as references, create a tree model by specifying such parameters as the number of boughs, branches and twigs, if they are horizontal, vertical or diagonal, their size, if there are crotches, etc. Basically, the greater the efforts at this stage, the more realistic a tree will look like as a result.
  3. To make a tree mesh real-time friendly, limit the number of polygons for branches and density of billboard leaves.
  4. To try out different tree shapes, modify the random seed.
  5. Export a tree into 3ds Max.


Step 2. Prepare a tree for export into Unigine.

  1. Select four-sided polygons that represent leaves. Scale them down until they are very small. (After a tree is exported, the leaves shader will restore their size to the required one.)
  2. Control the size of billboard leaves in the second UV channel (a polygon of 1x1 units in UV equals a billboard of 1x1 units in Unigine). The origin of UV coordinates (the top left corner) is the center of rotation for a leaf. For leaves to differ in size and orientation, simply scale some polygons up, some down, and orient them differently in the UV space.
  3. If required, reduce the number of polygons for branches even further (in case the procedural generator did not cope with this task well enough).
  4. Create LODs for a tree and it branches.
  5. To create LODs for leaves, simply select and delete a number of random billboard leaves (use tools that select the required percent of polygons in one click). After that, increase the size of remaining leaves in the second UV channel.


Step 3. Create tree textures.

  1. You can create textures for leaves either in 2D or in 3D editors. 3D editors are more preferable, however, since in Unigine a realistic, Phong shading-based lighting model (with normal map support) is used for them. After a 3D leaves model is created, diffuse, normal and specular textures are baked from it. Due to a normal map, billboard leaves will look lifelike rather than flat. Additionally, in Unigine leaves can be modulated with a thickness texture that specifies how transparent the leaves are under the sunlight.
  2. A trunk with branches is textured in a usual way.


Step 4. Setting up trees in Unigine

  1. To create a tree in Unigine editor, you'll need two materials: mesh_stem_base (for a trunk with branches) and mesh_leaf_base (for leaves). Inherit new materials from these two.
  2. In the material for leaves, go to States -> Leaves and choose 'Billboard' type in the drop-down list.
  3. Enable 'Phong shading' option on the same tab.
  4. By enabling 'Color noise' option, you'll get more natural looking leaves with color gradation (specified in the 'Color gradient' texture). For example, this option is very helpful to create a motley autumn forest.
  5. Enable 'Ambient light' option for rendering optimization. (Thus, Ambient and sun lighting will be calculated faster, in one rendering pass rather than in two separates passes.)
  6. Set up animation in two materials: for leaves and a trunk with branches. In both materials 'Stem noise', 'Stem offset', 'Stem radius' and 'Stem scale' parameter should fully match.
  7. Set up tree LODs. For smooth transitions between the LODs via alpha dithering, use Nodes -> Surfaces -> 'Fade' parameters. However, make sure that in the leaves texture contrast between leaves and a background is not too high (for example, white leaves, black background), since in this case LODs change will be abrupt, no matter how long the fade distance is. It happens because alpha dithering renders alpha channel values from a texture by a threshold that is changed across a fade distance. Simply apply a noise filter to an alpha channel and leaves will fade smoothly, without any pop-ins.
Link to comment
  • 2 weeks later...

You guys should check out ATree script for 3ds max to create tree geometry. Its easy to use and I've gotten some good results. Perhaps I'll share a few of my trees if I can get them to a high enough quality level.

Atree script download:

http://www.scriptspot.com/3ds-max/scripts/avizstudio-tools-atree3d

Atree script resources:

http://3dtreexchange.net/

I'm use growFX plugin for 3ds max. As for me - best solution for tree creating. http://exlevel.com/features/

Link to comment
  • 2 years later...
  • binstream unpinned this topic
×
×
  • Create New...