Soft Cover

Obsolete. This documentation refers to either a deprecated system or an unsupported function or feature.

Soft Cover

Overview

"Softcover" is a term for objects that provide visual cover. They block the AI's view of the player from long distances, while allowing bullets, objects, AI, and the player to pass through. A typical example is a bush object that is tall enough to provide good visual cover, but does not provide good physical cover.

Sample Files

Basic Concept

Softcover is created by using physic's proxies tagged with the physics property "Obstruct" in the DCC Tool's material settings. No special setup is needed in Sandbox to make softcover work.

The illustration below shows the placement of the softcover. It should have a size sufficient enough for the player to hide behind. In the case of vegetation objects, it is helpful to only cover the core part and leave out the outer limits of the object. This gives a much more realistic perception of the concept of hiding behind a bush. The cover is only provided in dense areas, but where the foliage is sparse, the player can be spotted easily.

General 3D Application Setup

To set up a soft cover object like a bush where you can run and shoot through but not see through, you have to give your object a proxy object which got its own material ID. This is physicalized as obstruct.

XSI Softcover Object Setup

Create a simple cylinder with a height of around 2ms. Move the cylinder and pivot it, so that it rests on the grid and the pivot is located at 0/0/0.

Create a cube and scale it to fit inside the cylinder. This one will work as the proxy.

Create a material library with 2 submaterials: one for the render geometry and one for the physics. Rename the material library, turn both materials into a cryshader and then adjust the physics.

Merge the cylinder and the box to end up with one geometry object. Create a CryExportNode and parent the geometry to it.

Export the object and its material, place it in Sandbox and adjust the material.

Turn on collision proxy display by typing p_draw_helpers 1 in the console.

For the picture below, the collision box is scaled to make it visible. Compare the transparent rendering mode with the solid one of solid physics objects.

Test the object in game mode: walk and shoot through it. Set up an AI Entity and try to hide behind it.

Sandbox Setup

Place your object as a vegetation object and turn on hideable. The surface type of your obstruct hull needs to be 'obstruct'.

Debugging

In order to see physical collision geometry, use p_draw_helper 1 in Sandbox or in game.

Collision geometry, with which the player physically collides and can not pass through, is displayed in a solid mode.
A physics proxy set to "Obstruct" is drawn with transparency over the render mesh. See the picture below for illustration: