Fast rendering of trees in Vue:
Real world trees present a huge challenge for 3D, because of their utterly
complex structure and "fuzziness".
Usually 3D deals with objects having a compact surface: Human, car, building.
Trees are different - their main component is a "cloud" of leaves.
Fuzziness of leaves cloud has detrimental impact on rendering speed, especialy
when transparencies, soft shadows and GI are involved.
Various kinds of leaves in 3D trees:
When a 3D model of tree is created modeler has to decide if each leaf geometry
should be modeled, or larger clumps of leaves should be mapped on larger
surfaces and material with alpha channel should be used.
Each of approaches has advantages and drawbacks :
Individual leaves :
- Very high polygon count
- Slow real time preview or even model too complex to be viewed in realtime.
- Models of large trees with billions of small leaves/pins are beyond the
power of today's desktop computers.
+ Easy to prepare bitmaps - just a couple or even one leaf texture can do
Clumps of leaves (wrapboards, billboards) :
+ Low polygon count
- Slow rendering (because of alpha channel)
+ Fast real time preview
+ It is possible to render detailed models of large trees on standard desktops
- Tedious preparation of high quality leaf clumps maps for billboards.
- Numerous textures necessary (to avoid repetition visible if just one texture
is used on billboards)
Rendering speed Test:
I have done a rendering speed test to compare the impact of GI and soft
shadow settings on rendering speed of trees using different kind of leaves.
Test was performed in Vue 2014, on a desktop computer with Intel Core i7-3770K
processor with 2 different rendering setups : Standard and Optimized.
Rendering mode - Superior
Global Ilumination qualilty - 0
Soft shadows 1%
Rendering mode - Superior
Global Ilumination qualilty - 2
Soft shadows 0%
For rendering efficiency of TPF and Xfrog models I have created two very
similar test trees in Xfrog and TPF, both used square planes for individual
leaves with alpha channel :
For comparison of efficiency of various kinds of leaves in TPF I used the
same TPF models, but I have replaced square leaves with alpha with full
geometry leaves (without alphs) and another version with billboards (obviously
with alpha). For billboards version just one billboard was used on last
branch instead of 6 individual leaves.
On the test scene each tree was placed in the same position, and its size
was adjusted so it covers similar surface of the image.
Here are the results (relative rendering time to fastest one):
GI Quality -2
Soft shadows off
GI Quality 0
Soft shadows on
(Click on numbers to display each test screens)
Same type trees made in TPF and Xfrog render at very similar speed, with
some slight advantage for TPF - probably due to GI optimization for Vue
vegetation. TPF model rendered slightly faster despite surface covered by
it was slightly larger than by Xfrog model.
The fastest tree was a TPF model which didn't use any transparency (full
Xfrog models was 40% slower to render in optimized setup than this fastest
model, and 2.5 times slower in standard mode.
The slower model to render was the TPF tree with billboard leaves, it was
4.6 times slower than the fastest model while using optimized rendering
settings, while in non optimized settings it was staggering 27x slower !
Transparencies + soft shadows + radiosity (global illumination) are
rendering time killers.
When rendering trees using transparencies (especially billboards) you
- Turn of soft shadows (on trees effect of soft shadows won't be visible
- In atmosphere editor reduce GI quality (tree rendered with GI quality
-2 looks almost the same as with quality 0, but rendering time is many