SoPostEffectEdges

InventorModule
author MeVis Medical Solutions AG
package MeVisLab/Standard
dll SoRenderers
definition SoRenderers.def

Purpose

The SoPostEffectEdges module detects and renders edges as an effect for the SoPostEffectRenderer module.

There are three different modes (field Mode).

  • SobelDepth calculates the edges using a sobel filter on the depth values of the depth buffer. It will only show edges on depth differences, not on inner creases.
  • RobertsDepthNormal calculates the edges based on the normals and the depth. This shows inner creases.
  • EmissiveColor calculates the edges using the emissive color buffer. This allows to only draw edges around objects that are highlighted using the emissive color (see SoMaterial).

Parameter Fields

Field Index

Blur: Bool Exponent: Float
Blur Kernel Size: Integer Mode: Enum
colorBufferName: String Normal Angle Threshold: Float
Depth Sensitivity: Float normalBufferName: String
depthBufferName: String Sampling Distance: Float
Edge Color: Color  
emissiveBufferName: String  
Enabled: Bool  

Visible Fields

Enabled

name: enabled, type: Bool, default: TRUE

Enables/disables the effect.

Edge Color

name: edgeColor, type: Color, default: 0 0 0

Selects the color of the edge.

Sampling Distance

name: samplingDistance, type: Float, default: 1, minimum: 1, maximum: 4

Selects the sample distance. Default is 1 pixel. Larger sample distances generate bigger edges with less quality.

Normal Angle Threshold

name: normalAngleThreshold, type: Float, default: 35, minimum: 10, maximum: 180

The angle at which two normals are considered similiar.

Depth Sensitivity

name: depthSensitivity, type: Float, default: 0.40000001, minimum: 0, maximum: 10

The sensitivity of the depth comparison.

Exponent

name: exponent, type: Float, default: 1, minimum: 1, maximum: 10

The exponent to choose the sensitivity of the Sobel filter.

Blur

name: blur, type: Bool, default: FALSE

Enables blurring of the calculated edges.

Blur Kernel Size

name: blurKernelSize, type: Integer, default: 9, minimum: 3

Size of the blur kernel.

Mode

name: mode, type: Enum, default: SobelDepth

Choses how to detect the edges.

Values:

Title Name Description
Sobel Depth SobelDepth Uses a sobel filter on the depth buffer to detect edges. The Exponent allows to choose the sensitivity.
Roberts Depth Normal RobertsDepthNormal Uses the depth buffer and normal buffer to detect edges.
Emissive Color EmissiveColor Uses the emissive color buffer to detect edges. Requires that emissive colors are used for the objects that should get edges (see SoMaterial).

Hidden Fields

colorBufferName

name: colorBufferName, type: String, default: colorBuffer

normalBufferName

name: normalBufferName, type: String, default: normalBuffer

emissiveBufferName

name: emissiveBufferName, type: String, default: emissiveBuffer

depthBufferName

name: depthBufferName, type: String, default: depthBuffer