Cube Background

From Serious Sam Wiki
Jump to: navigation, search
Editor model of CCubeBackroundEntity with employed texture.

General information

Class: CCubeBackgroundEntity

The Cube background is an entity used to simulate infinite sky encirclement around world space.


Texture (CStaticTexture)

Contains a pointer to background texture file.

Info 16x16.png Note: Background textures for one cube should be contained in one folder and have *smth*_C, *smth*_W, *smth*_E, *smth*_N, *smth*_S, *smth*_F for ceiling, west, east, north, south and floor respectively. If one of these files is missing, background still would work, but without one side.

Modulator (Color3f)

Changes background color.

Rendering modulator (Color3f)

Changes background color (seems like there is no difference from modulator?)

Rendering modulator animation target (Color3f)

Defines color which can be enabled using Event Animator.

Animator (CGenericAnimator)

Defines an entity pointer to a shared animator, usually an Event Animator.

Invert animator (BOOL)

Defines if animator's curves are flipped (I suppose?..)

GI influence limit (FLOAT)

Defines the distance on which background will affect GI baking.

Size (FLOAT)

Changes cube background size.

Viewer Y (FLOAT)

Lifts inbuilt background viewer up on specified value.

Viewer Y over camera Y (CGraph)

To do: Add description

Below horizon (FLOAT)

Lifts side background textures down on specified relative value.

Use floor (BOOL)

Defines if floor side will be rendered.

Active (BOOL)

Defines if current cube background will be used as sky encirclement.

Initial sectors (CString)

Contains sectors in which background should be rendered.

To do: Add description

Skylight generator (CSkylightGenerator)

Allows use background without prepared texture, since this property can simulate sky.

Active range (Box3f)

Range in which background should be rendered.

Parent part (IDENT)

If the parent has more than one moving part this property defines which part the Cube background is parented to.

Spawn flags (LFLAGS)

Defines in which difficulty levels and game types the Cube background is spawned.

Name (CString)

Defines the name of the Cube background.

Defines a entity pointer to the parent of the Cube background.

Platforms (LFLAGS)

Defines on which platforms the Cube background is spawned.

Entity ID (ULONG)

Displays the entity ID of the Cube background.

Info 16x16.png Note: Entity ID cannot be edited.

Script Functions


CCubeBackgroundEntity Methods
Name Parameters Return Data Type Description
Name Data Type
Activate - void Activates the background so it would be rendered.
CBaseEntity Methods
Name Parameters Return Data Type Description
Name Data Type
SEd3.5 or higher
DamageSource CString void To do: Add description
DamageType CString
WeaponIndex WeaponIndex
CharacterClass IDENT
Damage SLONG
SEd3.5 or higher
- void Enables ReceiveDamage script events (see below).
Warning 16x16.png Warning: This function disables native damage handling.
SEd4.0 only
Enabled BOOL void Enables the entity to become an auto move target.
GetAngularVelocity - Vector3f Returns angular velocity of the entity in Vector3f format.
GetAttachmentAbsolutePlacement Attachment IDENT QuatVect Returns placement of attachment in relation to World Spawn in QuatVect format.
GetAttachmentRelativePlacement Attachment IDENT QuatVect Returns placement of attachment in relation to entity in QuatVect format.
SEd3.5 or higher
- CString Returns classname in CString format.
GetLinearVelocity - Vector3f Returns linear velocity of entity in Vector3f format.
GetName - CString Returns the name of the entity in CString format.
GetParent Name IDENT Handle Returns a CBaseEntity handle of the parent of the entity.
GetPlacement - QuatVect Returns position and orientation of the entity in QuatVect format.
SEd3.5 or higher
- CWorld* To do: Add description
SEd3.5 or higher
- CWorldInfoEntity* To do: Add description
InflictDamage Amount SLONG void Inflicts damage to entity.
InflictDamageOfType Amount SLONG void Inflicts damage of a specified damage type to entity.
DamageType CString
SEd3.5 or higher
Target Handle void To do: Add description
Amount SLONG
Weapon IDENT
DamageType CString
SEd3.5 only
Amount SLONG void To do: Add description
Weapon IDENT
DamageType CString
IsDestroyed - BOOL Returns 1 if entity is destroyed.
SEd3.5 or higher
- BOOL Returns 1 if ReceiveDamageScriptEvent is enabled (see above).
SetAngularVelocity AngVelocity Vector3f void Sets angular velocity of entity to the specified Vector3f value.
SetLinearVelocity Velocity Vector3f void Sets the velocity of the entity to the specifed Vector3f values.
SetPlacement Placement QuatVect void Sets position and orientation of the entity to the specified QuatVect values.


Triggers when the Cube backgrpund is destroyed.
EntityDeleted → SEd3.5 or higher
Triggers when the Cube backgrpund is deleted.
ReceiveDamage → SEd3.5 or higher
Triggers when the Cube backgrpund receives damage.
Info 16x16.png Note: This event requires enabling via EnableReceiveDamageScriptEvent method.

Other Information

  • You can have several Cube background entities on your map. You should set up sectors in which each of them will be used.

Info 16x16.png Note: Since Serious Engine 2017 more than one backgrounds won't allow GI baking until these backgrounds will be set up to be baked in different baking groups. To learn more check Baking Tutorial.

  • There is an entity called Background Viewer, which allows manually set up the point from which player will see background.

Related Pages and Links