The golden rule of depth!
So here is the great secret:
What we are aiming for is a checker-like pattern of light orange hues.
I.Orange is best.
II.Yellow and green are acceptable.
III.Blue should be avoided.
IV.Pure red should be avoided as much as possible, before all other considerations.
V.Blue and green are preferred over red if you have to choose.
Now, do not expect any rendering to be of a consistent coloring, which would be the perfect scenario. In pretty much any production case, we are far from the perfect scenario. We will see in a moment that in some cases, solid red is acceptable and in fact, may render faster than orange, yellow and green.
In general, it can be assumed that higher depth will make rendering faster. That sounds logical, as it means less triangles need to be tested for intersection when a ray hits a BSP tree box. But we will see later that too many box subdivisions can actually slow down rendering. The right depth value will cause the BSP tree to do the right number of box subdivisions. The right number of box subdivisions will get the fastest rendering time. It lies at the point where the number of box intersection tests and the number of triangle intersection tests is perfectly balanced.
The meaning of colors
There is a lot going on in the diagnostic colors, which we shall explore throughout this article. For now, we will keep it simple.
1. Red means that we have reached the maximum depth of the BSP tree.
a)In very rare cases, when we reach the maximum depth of the BSP tree, we have in a box a triangle count inferior to the size parameter. That would be the perfect scenario.
b)In more realistic situations however, it means that we no longer subdivide the scene into boxes, but the triangle count still exceed the size parameter. Therefore, more triangles will have to be tested for intersection.
c)Since the triangle test takes longer than the box test, it is safe to assume that more red means longer render time.
d)Tip: Unless you have reached the point where the BSP tree is too subdivided, consider increasing the depth value.
2.Orange means the BSP tree is perfectly balanced, in a realistic way. It means that we are very close to the maximum depth but we have not reached it.
a)Tip: Change the depth value only if other values give you better render time when doing the real render. Otherwise leave it as it is.
3.Green and yellow mean that there is a sufficient balance, although we tend to use more memory than necessary.
a)Tip: It might pay to decrease the depth value, although it's not such a big deal. Follow the same advice as with orange.
4.Blue means that the BSP tree has way to many subdivisions for the amount of triangles it's mapping, the BSP is way too large compared to what it should ideally be. Such a BSP tree uses too much memory.
a)Tip: Decrease the depth value.
In most scenes that you will render, there is a mix of colors. This can make the choice of a depth value rather difficult.
-Courtesy Christian Bui - Autodesk Maya
No comments:
Post a Comment