Polygon Offset is an effective way to solve the problem of flicker caused by overlapping layers in the scene. The platform supports the setting of Polygon Offset for the scene, 3D surface layer, OSGB/OSGB Cache (osgb) layer and Model Dataset Layer. Under the Layer Properties panel, as shown below:
Figure: Setting Polygon Offset |
Polygon Offset parameter
- Offset Constant: Gets or sets the Polygon Offset constant. A positive value means the polygon is offset out of the screen; a negative value means the polygon is offset into the screen.
- Scaling factor: The Polygon Offset constant and the Polygon Offset depth slope factor together determine the offset of the polygon object in the depth direction of the screen. Set the Polygon Offset constant and the Polygon Offset depth slope factor. Can be used to solve the problem of flickering when polygons overlap.
The Polygon Offset constant and the Scaling factor together determine the offset of the polygon object in the depth direction of the screen, as follows:
Depth offset = m * Scaling factor + R * Offset constant
Where m is the maximum Scaling factor of the polygon, and R is the minimum value to ensure that the scene coordinate depth value can be distinguished, which is a constant that varies with OpenGL rendering.
The model as shown in the following figure is close to the earth's surface, so it produces flicker phenomenon. When the Set ModelPoly gon Offset is shifted by a factor of 5, it is found that the flicker disappears.
Figure: Comparison before and after setting Polygon Offset effect |