Back-face culling and Solid shapes

Forums: 

In some cases when a rendered closed shell consists of faces with different colors, visual artifacts at the edge of faces appearing at a certain view angle (Fig. 1).


Fig. 1. The visual artifacts on a simple cube

 

The back-face culling mechanism allows removing these artifacts.

It determines whether a polygon of a graphical object is visible. If it is not, the polygon is removed from rendered scene. Open CASCADE Technology 6.8.0 took first step in using this mechanism but with some restrictions: applying of culling does not take account for visibility of faces of rendered closed shells and the mechanism is performed only if rendered shape is complete closed. The mechanism was not applied, for example, for a compound containing closed shell and open one. In practice a user deals with complex shape containing closed and opened shells. Also it should be mentioned that back-face culling is disabled when clipping is activated. The next step in deeper integration this mechanism is to apply back-face culling for each closed shell included in rendered scene. Also the visibility of faces in each closed shell is taken into account. The figure below shows the result of applying of the described changes in back-face culling usage: culling is applying for each rendered solid (Fig. 2).


Fig. 2. w/o the changes vs w/ the latest changes

It should be noted that object rendering with the activated mechanism is more efficient due to reducing the number of polygons to draw: a back-side face of a rendered closed shell is not drawn. CAD Assistant application has been chosen for performance framerate-based test. The test consists of the rotation of a rendered scene. Min, max and average FPS number is got during the test. The results of the tests in CAD Assistant app (build 2015.02.24) on

  • Nexus 7 2013 device with the latest Android 5.0 Lollipop platform
  • Desktop (i5, 16gb RAM) with Windows 7 x64

shown in the charts below:

The tests shown performance increase by 12% on average with the latest changes in back-face culling usage.