Search/Browse Tutorials Click Here For Tutorial Search Instructions
Search For:

Basic CSG Operations
Author: Tomasz 'Millennium' Jachimczak
Last Updated: April 29, 2001 at 12:31:07 AM

Constructive Solid Geometry Operations are used in conjunction with Brushes to construct the environment.

The most commonly performed CSG Operations are Addition and Subtraction. Both place a new brush into the environment. When this new brush is placed into the environment, it uses the current shape, position and rotation (and all the other properties) of the Active Brush (see the entry for the Active Brush in the Important Concepts section of this file for further information on the Active Brush). Once the CSG Operation has been performed (e.g. Additive, Subtractive etc) the Active Brush is recreated, allowing for the next operation. After an operation has been performed, changing the Active Brush will not affect it in any way. Only through changing the brush that was placed in the operation can the area be changed.

An Additional Operation converts the Active Brush into a new Added Brush, filling the area enclosed within the bounds of the brush with solid (impassable) area. In a solid space, this has no real effect, however in an empty space, this creates an impassable area in the shape of the brush.

    A simple example of an Additive operation would be a pillar standing within a large open area. The large open area is "subtracted", leaving space for the player, then the pillar is "added" creating an impassable area that blocks the player in any situation.

A Subtractive Operation creates the opposite effect. It converts the Active Brush into a Subtracted Brush, leaving the area inside it empty (thus allowing a player to be inside that area). Within a solid space, a subtractive operation creates a void that the player is able to pass through. Creating a Subtractive Operation within an area that is already solid is meaningless - empty space cannot be subtracted from to get any effect.

    A good example of a Subtractive Operation would be a cave. The area around it is completely solid and impassable, yet the area within the rock is subtracted, allowing passage.

[ Click here for printable version ]


Current Comments on this article:

No User comments added.

Post New Thread
This comment system uses the official Forum as its verification. To post a comment, please register on the main Forum using the "Want to register?" link below.

Your UserName:    Want to register?
Your Password:   Forgotten your password?
Copyright ©2001