Mesh Splitting

 
 
 

Location:

At render time, Softimage splits large objects into many pieces, each of which can be computed separately. It then sends a minimal amount of object data to the mental ray renderer which, in turn, uses a system of callbacks to request only portions of the object that it needs. For example, if you are rendering the head of a very large character, only the head (or part of it) is created and sent to the renderer. Should mental ray run out of memory, it can flush portions of the object that it no longer needs and call them again later, if necessary.

The practical upshot of this system is that, in addition to being able to free up memory for the renderer as needed, Softimage seldom, if ever needs a huge chunk of contiguous memory to compute a large object.

Setting the Mesh Splitting Factor

Mesh splitting is usually a transparent process, meaning that you don't have to adjust any options to make it work. However, should you find yourself running out of memory while trying to render an exceptionally demanding scene, you may be able to get it to render by changing the Mesh Splitting Factor.

The Mesh Splitting Factor affects the size (in triangles) and number of pieces that are created when the mesh is split. The default value of 1 splits a given mesh into the number of pieces that the underlying computations determine to be appropriate. Lowering the factor value to, say, 0.5 doubles the number of pieces, but halves their size.

For example, let's say you have an object composed of 64000 tessellated triangles. With the splitting factor set to 1, the object might be split into four pieces of 16000 triangles each. If you lower the factor to 0.5, the object is then split into eight pieces of 8000 triangles each.

As a rule, you should not have to adjust the splitting factor at all. However, in certain circumstances, you may have to lower it to get your scene to render properly:

  • If you are dealing with extremely large objects (millions, or tens of millions of triangles) that are difficult to render, lowering the factor value allows mental ray to more easily flush unneeded pieces of the mesh, and makes it less likely that mental ray will run out of memory when rendering your scene.

    For example, if a given tile only contains half of a split-object piece, the other half is not needed but still takes up memory. If the object is split into smaller pieces, it is more likely that the unnecessary piece can be flushed.

  • If scene objects have very heavy displacement, the tessellated displaced surface resulting from a split piece can be too large to fit in memory. In that case, lowering the mesh splitting factor creates more split pieces whose smaller size helps to compensate for the extra geometry added by the displacement.

    NoteLowering the mesh splitting factor is only one of a number of optimizations that you can make to get a large and demanding scene to render. For information about other such optimizations, see Optimizing Large Scenes for Scalability.

Advanced users may also find that raising the mesh splitting factor is useful is certain circumstances:

  • If the mesh is being subdivided into so many pieces that the amount of memory required to manage them is slowing down a render

  • If scene objects have very light displacement. This is because, to ensure correct displacement, each split piece of a displaced object requires additional information about the triangles on the borders that is shares with other pieces.

    If the object is split into too many pieces of too small a size, this extra information can greatly increase the size of each piece, and the resulting redundant calculations can slow down rendering. Increasing the splitting factor forces Softimage to split the object into larger pieces with less redundant information.

  • If you are running Softimage on a 64-bit system, larger pieces of a split object can be fit into memory. In this case, increasing the splitting factor may yield a marginal increase in render speed.

Although there is no easy way to find out how a given object is split, there are a couple of things you can do:

  • Read through an .mi file from the scene, where you can see the number of objects into which the object is split. For more information about echoing .mi files, see mi Archives and Stand-ins.

  • Write a custom diagnostic shader that renders each piece of the split object in a different color. For more information, see Custom Shaders [SDK Guide].