Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ XR Studio

ClipPlanes

  • Last UpdatedMay 27, 2024
  • 4 minute read

The ClipPlanes node enables you to clip the scene content in order to exclude part of it from being displayed.

There are two types of clipping:

  • Box: You can define a box out of which all the geometry is clipped out.

  • World Axes: You can clip out a quadrant of the scene at a specific coordinate.

We recommend using a single ClipPlanes node in an application. This is because the system supports only one clipping behavior a time. Multiple nodes could conflict if operated at the same time. The SGL node does not support clip planes.

Note: Clipping works only when the Graphics.clipPlanes.enable variable is set to true in the Application configuration file. This is to improve performance in projects where clip planes are not used.

Debug function

ClipPlanes embeds a _debug functionality that enables you to better identify the clipping constraints.

Platform support

This node is supported on XR-Windows platform only.

XR-WIN

XR-P-WIN

XR-P-IOS

XR-P-AND

XR-P-WASM

Full support

No support

No support

No support

No support

Full support

No support

No support

No support

No support

Clipping with Box

Box clipping is based on three parameters that define the box.

  • position. Corresponds to the center of the box.

  • orientation. The yaw, pitch, and roll of the box.

  • scale. The size of the box on its three axes.

  • _debug. When active, the user can see the box.

Clipping with World Axes

World axes clipping allow you to define a point and clip out a quadrant of the scene (1/8 of the scene). You can decide which quadrant to remove.

It's important to consider that the clip planes that define the quadrant are always aligned to the world axes so they cannot be turned.

  • position. The center of the cutting planes.

  • flipXAxis. When set to false, the clip happens in the -X direction. Set to true to clip in the +X.

  • flipYAxis. When set to false, the clip happens in the -Y direction. Set to true to clip in the +Y.

  • flipZAxis. When set to false, the clip happens in the -Z direction. Set to true to clip in the +Z.

  • _debug. When active, the user can see the cutting planes.

When the position is set to 0 0 0 and all flips are false, the clipped out quadrant is the one with negative coordinates on all axes.

Preventing specific content from being clipped

In some cases, especially when using ClipPlanes in VR, there may be need to prevent some scene content from being clipped out. Typical examples are 3D HUDs or user avatars.

To support this requirement the ClipPlanes node provides the skipList field. The skip can be applied only to MWX mesh content and requires the mesh's fully qualified unique id. Every mesh that needs to be skipped must be explicitly included in the list.

Alternatively, it's possible to set a Mesh element to be skipped directly from within the MWX file itself by setting its skipClipPlanes attribute.

ClipPlanes fields

These are the fields for the ClipPlanes node. Only the node-specific fields are indicated, not fields obtained by inheritance.

Field inheritance: NodeBase > ClipPlanes

Fields

Type

Use

Default value

Description

_debug

sbool

Optional

false

When activated, shows the debug object to identify clip planes or box.

active

sbool

Optional

false

Set to true to activate clipping functionalities.

flipXAxis

sbool

Optional

false

Used in worldAxes mode. When set to true. the clipped quadrant will have the positive X direction.

flipYAxis

sbool

Optional

false

Used in worldAxes mode. When set to true. the clipped quadrant will have the positive Y direction.

flipZAxis

sbool

Optional

false

Used in worldAxes mode. When set to true. the clipped quadrant will have the positive Z direction.

mode

senum

Optional

box

Allows you to select the clip mode between box and worldAxes.

orientation

svec3

Optional

0 0 0

Used only in box mode. Allows tilting the box using yaw, pitch, and roll values.

position

svec3

Optional

0 0 0

In box mode, defines the center of the box. In worldAxes mode, sets the clipping plane application point

scale

svec3

Optional

1 1 1

Used only in box mode. Allows scaling the box on the three axis.

skipList

mstring

Optional

Add a mesh to the skipList to render it even when the mesh is inside the clipped out portion of the scene. It works only for MWX meshes and requires the fully qualified name of each mesh.

 

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in