Introduction
One of the things people have wondered about is how Gearbox achieved the x-ray effect in the of3a6 map. The effect consisted of the player looking through an X-Ray screen, being able to see the skeletal frame of some subjects sitting behind it. When the player went around to the other side of the screen, the subjects appeared normal (ie: fleshy).
Setup
It's really a fairly simple procedure. Below is an overhead view of the entities (as taken from the example map).
- trigger_multiple activates bones_togglemm (E)
- trigger_multiple activates flesh_togglemm (F)
- monster_human_grunt_ally_dead (deadsci_flesh) and monster_skeleton_dead (deadsci_bones) (note that the skeleton needs to be offset from the body by a small amount)
- monster_cleansuit_scientist_dead (deadsci_flesh) and monster_skeleton_dead (deadsci_bones)
- multi_manager bones_togglemm activates trigger_flesh2 (G) and trigger_bones2 (H) env_renders
- multi_manager flesh_togglemm activates trigger_flesh1 (I) and trigger_bones1 (J) env_renders
- env_render trigger_flesh2 makes flesh transparent
- env_render trigger_bones2 makes bones visible
- env_render trigger_flesh1 makes flesh solid
- env_render trigger_bones1 makes bones invisible
- func_illusionary "x-ray" field
- func_wall "x-ray" window to look through
A. trigger_multiple
This is the trigger that is activated as you go outside the x-ray machine. It's purpose is to activate the multimanager E that will trigger some env_renders to make the bodies transparent and the bones solid. Following are its important properties.
- Target (target) - this should be the name of multi_manager E (the one that makes the bodies transparent and the bones solid).
When you go through this trigger, the bodies and bones will look like the following picture:
B. trigger_multiple
This is the trigger that is activated as you go inside the x-ray machine. It's purpose is to activate the multimanager F that will trigger some env_renders to make the bodies solid and the bones invisible. Following are its important properties.
- Target (target) - this should be the name of multi_manager F (the one that makes the bodies solid and the bones invisible).
When you go through this trigger, the bodies and bones will look like the following picture:
C. monster_human_grunt_ally_dead and monster_skeleton_dead
This is the grunt's body and skeleton. Note that the skeleton must be offset by about 8 units to account for a slight difference in the model sizes. Below are the important initial properties of the two entities.
- monster_skeleton_dead
- Name (targetname) - The skeleton needs a name so it can be affected by the env_render entities. In the example map, this is named
deadsci_bones
. - Pose (pose) - The pose used here must match the pose of the fleshy entity. In the example map, this is set to
On Stomach (3)
to coincide with the grunt's pose.
- monster_human_grunt_ally_dead
- Name (targetname) - The grunt needs a name so it can be affected by the env_render entities. In the example map, this is named
deadsci_flesh
. - Render Mode (rendermode) - This should be set to
Texture (2)
. - FX Amount (renderamt) - This should be set to a value of about
80
. Combined with the Texture render mode, this will make the body transparent. - Pose (pose) - The pose used here must match the pose of the skeleton entity. In the example map, this is set to
Dead On Stomach (4)
.
D. monster_cleansuit_scientist_dead and monster_skeleton_dead
This is the scientist's body and skeleton. Below are their important properties.
- monster_skeleton_dead
- Name (targetname) - The skeleton needs a name so it can be affected by the env_render entities. In the example map, this is named
deadsci_bones
. (yes, this is supposed to be the same as the grunt) - Pose (pose) - The pose used here must match the pose of the fleshy entity. In the example map, this is set to
Against Wall (2)
to coincide with the scientist's pose.
- monster_cleansuit_scientist_dead
- Name (targetname) - The scientist needs a name so it can be affected by the env_render entities. In the example map, this is named
deadsci_flesh
. (yes, this is supposed to be the same as the grunt) - Render Mode (rendermode) - This should be set to
Texture (2)
. - FX Amount (renderamt) - This should be set to a value of about
80
. Combined with the Texture render mode, this will make the body transparent. - Pose (pose) - The pose used here must match the pose of the skeleton entity. In the example map, this is set to
Dead Against Wall (3)
.
E. multi_manager
This multi_manager controls making the bodies transparent and the bones visible. It is activated by trigger_multiple A. Below are its properties. For more information, see the
multi_manager entity description.
- Name (targetname) - This must have a name to be triggered by trigger_multiple A. In the example map, it is named bones_togglemm.
- trigger_flesh2, 0 - This triggers env_render G which makes the bodies transparent.
- trigger_bones2, 0 - This triggers env_render H which makes the bones visible.
F. multi_manager
This multi_manager controls making the bodies solid and the bones invisible. It is activated by trigger_multiple B. Below are its properties. For more information, see the
multi_manager entity description.
- Name (targetname) - This must have a name to be triggered by trigger_multiple A. In the example map, it is named flesh_togglemm.
- trigger_flesh1, 0 - This triggers env_render I which makes the bodies solid.
- trigger_bones1, 0 - This triggers env_render J which makes the bones invisible.
G. env_render
This is the env_render that makes the flesh transparent. Below are its properties.
- Name (targetname) - This is activated by multi_manager E. In the example map, it is named
trigger_flesh2
. - Target (target) - This is the name shared by the scientist and grunt bodies. In the example maps it is
deadsci_flesh
. - Render Mode (rendermode) - This should be set to
Texture (2)
. - FX Amount (renderamt) - This should be set to a value of about
80
. Combined with the Texture render mode, this will make the body transparent.
H. env_render
This is the env_render that makes the bones visible. Below are its properties.
- Name (targetname) - This is activated by multi_manager E. In the example map, it is named
trigger_bones2
. - Target (target) - This is the name shared by the scientist and grunt skeletons. In the example maps it is
deadsci_bones
. - Render Mode (rendermode) - This should be left at
Normal (0)
. This will make the bones appear normal and solid.
I. env_render
This is the env_render that makes the flesh solid. Below are its properties.
- Name (targetname) - This is activated by multi_manager F. In the example map, it is named
trigger_flesh1
. - Target (target) - This is the name shared by the scientist and grunt bodies. In the example maps it is
deadsci_flesh
. - Render Mode (rendermode) - This should be left at
Normal (0)
. This will make the bodies appear normal and solid.
J. env_render
This is the env_render that makes the bones invisible. Below are its properties.
- Name (targetname) - This is activated by multi_manager F. In the example map, it is named
trigger_bones1
. - Target (target) - This is the name shared by the scientist and grunt skeletons. In the example maps it is
deadsci_bones
. - Render Mode (rendermode) - This should be set to
Texture (2)
. - FX Amount (renderamt) - This should be set to a value of about
0
. Combined with the Texture render mode, this will make the bones invisible.
K. func_illusionary
This is purely for effect. It simulates a bright area of flashing x-rays. Create the brush so its "streaming" from the window (look at the example map for the idea) then turn it into a func_illusionary. Set its properties as listed below.
- Render FX (renderfx) - Set this to
Slow Flicker (12)
. - Render Mode (rendermode) - Set this to
Color (1)
. - FX Amount (renderamt) - Set this to
16
. - FX Color (rendercolor) - Set this to
0 128 64
. This is the RGB value for a green color.
The above properties will turn the block into a flickering barely visible greenish "light" to simulate the x-ray field. Because you're using the Color render mode, the actual texture of the object isn't important as it will take on a solid color as specified by the FX Color, with a transparency value determined by FX Amount. The Slow Ficker render fx is added to for a nice flickering effect.
L. func_wall
This is simply the window that the player will look through to see the "x-ray" scene. Create the window and turn it into a func_wall. Set the following properties for it.
- Render Mode (renderode) - Set this to
Color (1)
. - FX Amount (renderamt) - Set this to
32
. - FX Color (rendercolor) - Set this to
0 128 64
- the RGB value for a green color.
As with the func_illusionary mentioned above, the texture of the window is unimportant since the render settings control that.
Notes
When you come upon the x-ray setup, it is active. Looking through the window, you'll see the transparent bodies and their skeletons. If you walk around the window to look at the bodies, you pass through trigger B which activates a number of env_renders that make the bodies solid and the skeletons invisible. If you return to your position in front of the window, you pass through trigger A which activates a different set of env_renders that make the bodies transparent and the bones visible. Simple as that. Swanky huh?
Example
For a more concrete illustration, check out the example map linked below.