20 Oct 2020

Automatic Extraction of Transparent Surface Cross Section

A module for creating partially transparent capping surfaces.


The TransparentCapping.hx project gives an example of how the "AutoExtractXSection" module is used to work around the current "Surface Cross Section" module limitation that is able to show just opaque surfaces and requires user interaction to export capping surfaces.  Using the auto-refresh feature, this module can update and show a partially transparent surface that "caps" the original one. The capping surface is evaluated and updated as soon as any of the ports of the referenced "Surface Cross Section" are changed. In addition, this module can be used to create nicer animations.

The AutoExtractXSection module has two input ports:

Reference: this is the "Surface Cross Section" module used to create the capping surface. This module must have its data port set to a surface data and the "Clip" plane must be active.  Finally, its viewer toggle must be off (not visible) to avoid conflicting with the transparent capping surface display.

Base Trans: this is the base transparency (alpha) value used to render the capping surface. Its value should preferably be the same as the one set in the "Surface View" module used to display the whole/clipped surface.

When either the "orientation" or the "translate[%]" port of the "Surface Cross Section" module are changed, the "AutoExtractXSection" module triggered by the auto-refresh creates a new capping surface as output, and displays it.