Preliminaries
Object space algorithms are computed on the CPU, in contrast to image space and hybrid algorithms, which are computed on the GPU. This may make them unsuitable for larger objects, unless they can be precomputed.
Note that object space algorithms are only implemented for models loaded from .obj files, as they would otherwise be too costly.
Note furthermore, that object space algorithms currently only work for triangle models. If the model is not a triangle model, a warning
will be displayed.
A threshold controls how many lines are detected. It is set by
With object space algorithms hidden lines can be drawn using
The color for hidden lines can be set with the following methods:
The int versions expect values between 0 and 255, while the float versions expect values between 0.0 and 1.0.
Creases
Creases are sharp angles in a boxy model. As they are not view dependent, they can be precomputed and do not need further processing at run time, which makes them extremely fast, despite being object-space algorithms. Creases can be either ridges or values. To create an instance of each, use
and
respectively.
Hidden lines can be stippled using
The example below shows a result for using hidden, stippled lines:
Note that creases have the same problems with gaps at the corners with very wide lines as wireframe contours. If you need large line width with boxy objects, you are probably better of with Sobel edge detection and a dilation filter.
Ridges and Valleys
This algorithm is suitable for smooth objects. Like Creases, they can be precomputed.
To create an instance of Ridges or Valleys use
and
Ridges and valleys can be drawn faded.
Apparent Ridges
Apparent Ridges are view-dependent ridges. Therefore, they cannot be precomputed.
To create an instance of apparent ridges use
Apparent ridges can be drawn faded.