Daria Surkova, head of the C3D Viewer development team, C3D Labs, tells about the enhancements in the C3D Vision visualization library and its user interface. The library is a C3D Toolkit component for model visualization .
C3D Vision is a graphics library for CAD solutions. It visualizes models and contains API functions for model transformations such as editing nodes, or moving objects. The figure shows how nodes are moved. C3D Vision can also edit material properties. You can control scene lighting, apply shaders and other OpenGL functions, and rearrange the graph. The image is a graph rearrangement animation. You can also traverse the graph in the scene. Finally, the key function of the C3D Vision library is scene rendering using OpenGL.
We will focus on three aspects: rendering, new and improved library tools, and our plans for the future.
Let’s begin with the rendering.
We’ve done a lot of work to better visualize phantom (semi-transparent) entities.
The key update is a configurable number of transparency layers. The animation shows how the number of transparency layers changes. You can see that more layers make the scene more realistic. But note that increasing the number of layers decreases performance.
Let’s compare the previous and the current versions of the phantom visualization feature. For phantom models, we should remember the following. First, hidden lines in non-transparent models are not rendered, so the scene is somewhat optimized. It is not possible if the scene contains phantom entities. Another point is the depth test. The depth test should not be applied to phantom models because a phantom model may partially or completely overlap other entities. Still, the depth test applies to the rest of the scene (opaque objects), as they can overlap phantom objects. Also, note that rendering phantom objects progresses from distant to close. This requires color mixing in the alpha channel. For this, we have introduced an order-independent transparency algorithm.
Besides that, we have added curve smoothing and curve-to-background color mixture algorithms. These have significantly improved visualization and eliminated some rendering artifacts. The image shows the current version.
In the trial version, you can edit SetPenStyle and adjust wide curve endpoint styles. Three endpoint styles are available: SquareCap, FlatCap, and RoundCap. SquareCap means the curve overlaps the endpoint, FlatCap means it does not. RoundCap means the endpoint is overlapped and rounded.
We’ve done a lot to boost the performance. The performance tools algorithms we used include simple optimization using an indexed buffer, and merging identical buffers into one before rendering. These are used when you call the DrawCall method. We extensively use profilers for performance analysis. Our primary tool is the RenderDoc graphics debugger. We use proprietary tools, including those from NVidia and AMD, to enhance performance. For improved rendering, we utilize shader constants and data buffers. Now we are considering not only OpenGL, but also Vulcan, Direct3D, and other visualization libraries.
The image clearly shows the current performance. It contains a million smooth curves with unique materials. It is a highly complicated scene.
Now consider the new and improved tools.
The current C3D Vision release already includes refined scene lighting control tools. There are three options: constant, linear, and quadratic attenuation of the light source brightness.
Another new feature is the HotPointWidget interactive handle. It is a self-contained widget with a position change event. It also offers a configurable appearance and selection color. The code to add a handle is very concise: just two lines.
Another new feature is the PlacementWidget handle. It is very convenient: add just two lines to your code to a handle that visualizes object movements. It also has events and appearance settings.
Among other things, we have substantially improved the methods of the GrabFrameImage function. First, now you can set not only custom sizes but also use the screen aspect ratio. We resolved the background visualization issues. The background can now be transparent (as in the scene), colored, or filled with an image.
Another new feature is Markup, or “the red pencil”. This is a brand-new tool in the C3D Vision library. What is Markup? As the name suggests, it adds annotations. Use the pencil to add notes to parts and assemblies. It has a text bubble and can add curves and shapes. A markup is added for a certain camera position. The markup gets hidden when the camera position is changed. The camera position is restored as you select the markup. The markups can be saved in svg format.
Our team continues our performance improvement efforts. This is our goal No. 1. We are also improving the shaders and material properties. In the future, we intend to add a new interactive tool called Flythrough. We are also going to improve object selection and selection fence management. Another important area is making the user’s manual for the library.

Daria Surkova,
C3D Viewer Team Leader,
C3D Labs