Saturday, February 7, 2015

Polyplanes and visual quality

Geometry of tree model prepared for real-time rendering is split between original geometry (usually trunk area) and polyplanes (usually leaf area). Polyplane is a simple geometry approximation of original tree structure with help of texture where is projected original tree structure. Polyplanes are one of the most important ways how to simplify geometry between individual levels of detail in Silvador - the rougher the LOD, the closer to root its polyplanes start.
While polyplanes are a powerful tool for geometry simplification, there are few aspect we need to be aware of, for getting the best possible result. In this blog post let's focus on visual quality of polyplanes.

Model statistics

But first let's look at meaning of tree model statistics. Statistics is positioned in bottom right corner of the preview window and looks like this:
This is what individual entries tell us about plant model:

  • heig - Height of the geometry of the tree model in meters. Note that it is really the geometry what is measured, not what is in the textures. This means that f.i. the tree model on the image above reports higher number than what is actually visible - it reports corner of the polyplane geometry, not area where alpha of polyplane texture is non-zero.
  • surf - Surface area of geometry, in square meters.
  • tris - Number of triangles the model consists of.
  • poly - Number of unique polyplanes. / Total number of polyplanes.

Texture quality vs Crown shape fidelity

Very important counter for the final model visual quality is the number of unique polyplanes. It can be well controlled through VisualizerLOD.polyplaneReductionWantedCount controller. In usual cases it corresponds to minimum value between polyplaneReductionWantedCount and total number of polyplanes. In special cases where polyplanes are generated from components of different kind, the final number of unique polyplanes can be higher than polyplaneReductionWantedCount. For the best quality of the final model it is important to find the balance between final texture resolution and geometry fidelity. Consider the following sequence of images demonstrating various setting of polyplaneReductionWantedCount for the same model:



On the first image we chosen to have only 2 unique polyplanes. Note the geometry is degraded a lot from the desired result (bottom image). On the other hand the generated texture (on the right side) is very detailed. On the last image we have the opposite, the best possible polyplanes - each one is unique. On the other hand each one occupies space in the final UV atlas texture. Therefore we now have a worse quality of textures as more textures need to fit in. On the middle image we chosen something in between - 3 target unique polyplanes. Its clearly the winner in this particular case - the shape of tree is very close to the last image while detail of texture is very close to the first image.
When configuring exporter, it is definitely worth spending few moments with polyplaneReductionWantedCount controller and find smallest possible number when you are still happy with the tree shape.


No comments:

Post a Comment