-
Notifications
You must be signed in to change notification settings - Fork 140
Skyboxes
sky_camera is the entity used to create a skybox. The area around it will be projected around the map via the tools/skybox
texture. Click here for more information on sky_camera in Source.
Outside of Mapbase, sky_camera is static. Once it's been placed, the skybox can't move. You can move the sky_camera itself through things like logic_measure_movement, but it doesn't update the skybox. There is a trick to update the skybox by continuously removing and respawning the sky_camera, but this is a complicated workaround and usually isn't very smooth. sky_camera
is also not capable of rotating the skybox.
In Mapbase, sky_camera has been updated to support parenting and continuous updating. There's also a new keyvalue to use the sky_camera's angles for actual skybox rotation rather than fog direction.
Together, these changes create the ability for the skybox to move around freely relative to the world.
-
Use Angles for Sky
<void>
- Uses angles for actual skybox rotation, as if the world were tilted on this entity's axis.
-
ForceUpdate
<void>
- Forces the 3D skybox to update with this sky_camera's position once. -
StartUpdating
<void>
- Begins per-tick skybox updating, which is needed if you want this sky_camera to move. -
StopUpdating
<void>
- Ends per-tick skybox updating if it was enabled before.
There's also a spawnflag for a sky_camera to spawn continuously updating its position without having to use the StartUpdating
input.
HL2: Downfall's multiple skybox support has been added as well.
(todo)
Mapbase adds the ability to use a specific solid color instead of a sky texture, controlled with the SetSkyColor
input on sky_camera. The color is enabled and disabled through the "alpha" value, or the 4th number in a color. For example, you could use SetSkyColor > 0 255 0
to turn the sky green and SetSkyColor > 0 255 0 0
to turn the sky back to normal. Blending the sky color with the skybox was attempted, but is unfortunately not possible. Any alpha value above 0 enables the solid effect while 0 disables it.
This was intended to be used to make the skybox match the color of dense fog, but HDR causes a noticeable contrast in between the world and the sky. The pictures below show a skybox with thick blueish fog and the result of setting the sky to the same color, highlighting the HDR problem.
sky_camera
now has inputs and keyvalues from env_fog_controller
, which allows for more skybox fog control. Lerping is currently unsupported.
-
Something Index
- Something special
- Something else