Tutorial   improve your OpenFX skills... >>
  Scope   Tutorial... >>

<< Prev   [1]   [2]   [3]   Next >>

step 11 Step 11: Polygon Splitting
This figure of the man illustrates how the division into voxels works and how the polygons are split into adjacent voxels.

  • In (a) we see a model of a man made up about 25,000 triangular polygons.
  • In (b) the subdivided polygons are shown using a false colour.
  • In (c) the voxels and their subdivisions around the figure are shown. You can easily see how the larger voxels lie at the edge> As they do not contain polygons and thus do not have to be subdivided.
  • In (d) a close up of the man's hand is shown with a tracing ray passing through it.
  • In (e) the same view as in (d) is shown but with the voxels also included.

    As the ray is traced through the scene it passes in and out of the voxels. When int enters a voxel that contains any polygons (or parts of polygons) the list of polygons are checked for intersection with the ray. Hopefully this number of polygons will be small for each voxel and when a ray does enter a voxel. Again hopefully, when there are polygons in a voxel an intersection will occur and there will be no need to trace the ray through any other voxels. Before actually looking at the parameters there is one complicating issue we must mention:

    All this looks great in theory until we come to consider a model made from a connected network of polygonal facets, then we have a bit of a dilemma! A network of connected facets cannot be separated into individual faces. No matter how hard we try, (how may times we subdivide), there is no way that we can separate each polygon so that a rectangle in the subdivision contains only one polygon. The fact that the polygons are connection is responsible for that. The very best we could probably do is associate some polygons with more than one voxel simultaneously. We are going to have to accept that in practice a one polygon to one subdivision goal is unattainable. So we must set a more realistic limit on the number of polygons we are prepared to accept in each voxel.

    How close the renderer gets to the 1 to 1 ideal can be determined from the reported information in the status bar. The (F) value is the number of faces in the scene, the (Fc) value reports how many faces have been placed in voxels. Thus if Fc=F we have a perfect 1 to 1 set-up and the ray tracing should be very fast. The (F/V) value is the maximum number of faces assigned to any one polygon, ideally this should be equal to the desired value (which is set by the Threshold parameter). In most cases we rarely have either Fc=F or F/V = Threshold , any scene in which Fc < 5 F should be regarded as acceptable. In other scenes it is probably worth experimenting with the paameter settings.



  • step 12 Step 12: Setting the Ray Tracing Parameters
    OpenFX provides two alternative methods of partitions the triangles in the voxels.
    In 'partition' mode NO additional polygons are created in the model as they are divided up among the voxels. Instead, each voxel records a list of every face that passes through that volume. When a voxel is divided (at the boundary between at least one face) those lying completely on either side of the dividing plane are assigned to either side. If a polygon crosses the dividing plane then it is assigned to both sides. (By choosing the dividing plane so that it passes through a vertex we can be sure that eventually the voxels at the bottom of the tree will only contain the specified number of polygons.
    In 'Split' mode the polygons in the model are split along the boundary of the voxel and those that lie to one side are assigned to lie in the child voxel on that side, those that lie on the other side of the dividing plane are assigned to the voxel on that side.
    In both these cases the parent voxel retains NO polygons, all polygons lie in a voxel at the bottom of the hierarchy.
    Note: To make sure that we do not miss any polygons or make too many, or not enough voxels, OpenFX uses integer coordinates internally for its vertex representations whild carrying out the optimisation.
    • This switch parameter gives you the option to choose which of these methods of model partitioning best suit your scene.
    • The Recursive Depth setting tells the renderer what is the maximum number of subdivisions the octree it may use. Thus OpenFX won't go on subdividing even if the other settings would allow or require it. This parameter is needed because in some scenes too much memory would be needed and the optimisation step would take too long to complete. (Each additional subdivision (where required) takes 8 times as much memory and 8 times as long to compute. (Not all voxels will require subdivision but the number of voxels will get enormous. For example the default setting of 8 subdivisions would require> 16 million voxels. Twelve subdivision would require > 68 billion voxels, about 6.8TB of memory.)
    • The Polygons per Voxel is related to the number of faces that are assigned to each voxel. It is the desired number of faces we would like to see assigned to each voxel. (All this is discussed above.) Ideally one or two but for larger models 9 or 10 or even 100 to 150 are possible values. It just depends on the number of polygons in the scene and only experimentation will tell if you are heading in the right direction. Again the (F/V) and (Fc) values reported should help you refine your settings.




    Tutorial written by Stuart

    << Prev   [1]   [2]   [3]   Next >>