Difference between revisions of "Lighting"

From Valve Developer Community
Jump to: navigation, search
m (Changed it back to "glow", mentioning flares too.)
m (See also: Linked Advanced Lighting)
Line 36: Line 36:
 
*[[Adding Light]] - A beginners tutorial on how to set up a basic [[light]] entity.
 
*[[Adding Light]] - A beginners tutorial on how to set up a basic [[light]] entity.
 
*[[Intermediate Lighting]] - A tutorial dealing with all the light sources in more detail.
 
*[[Intermediate Lighting]] - A tutorial dealing with all the light sources in more detail.
 +
*[[Advanced Lighting]]
 
*[[HL2 light props]]
 
*[[HL2 light props]]
 
*[[Color theory (level design)]]
 
*[[Color theory (level design)]]

Revision as of 18:29, 16 December 2006

Abstract Mapping series Discuss your thoughts - Help us develop the articles or ideas you want

Ammunition | Animals & Creatures | Antlions | Beams & Lasers | Cables & Ropes | Clouds & Sky | Color Theory | Combat | Combine | Doors | Dust, Fog & Smoke | Elevators | Level Transitions | Environmental Lighting & Weather | Explosions | Fire | Foliage | Glass | Headcrab | Health | Ladders | Lighting | Optimization | Physics | Retinal scanners | Sound & Music | Special effects | Terrain | Trains | Turrets | Water | Weapons | Zombie

Entities

Stationary light sources

Moving light sources

  • light_dynamic — a combination point light and spotlight that can be moved, turned, and adjusted.
  • npc_spotlight — a spotlight NPC capable of tracking targets.

Other light effect entities

The following entities are primarily just visual effects from light, meaning they do not cast light on their surroundings.

  • env_sprite — entity used to create omni-directional glow or flare effects.
  • point_spotlight — a moveable spotlight (directional) glow, with an optional dynamic light source.
  • env_lightglow — an asymmetrical glow (for areas of contrasting light).
  • The models/effects/vol_light001 and models/effects/vol_light001 textures, used for volumetric lighting.
  • prop_static — This entity can be used together with the models/Effects/vol_light.mdl model to simulate basic volumetric light.
  • env_sun — visual effect of the sun in the sky.
  • env_particlelight — only lights particles (such as those produced by env_smokestack).

Notes

  • Naming a light makes it more expensive. Only name lights when you need to. Multiple lights sharing the same name are cheaper than lights with separate names.
  • light_dynamic is especially expensive, and will not even show up on some systems
  • The basic light entities do not come with a visible representation (eg, a lightbulb). For that you need a prop. See HL2 light props for a list.
  • The basic light entities do not come with a "glow" as you'd expect to see in a foggy or misty area. To provide this, either compile and run the map with HDR enabled, or add a point_spotlight (with dynamic lighting off unless needed) or env_lightglow entity.
  • Maps will not be lit unless you run vrad (or equivalent). Vrad will not run properly unless the level is free of leaks.
  • Several textures provide their own light & can do so using lights.rad in a mod's directory or the one in sourcesdk/bin.
  • Experiment by burning light onto motion enabled entities/objects. i.e. func_rotating with shadows disabled may look odd, func_tracktrain spawned with normal light, etc.

Console commands

  • mat_fullbright boolean — Toggles map lighting

See also

External links