Window lighting: Difference between revisions
MossyBucket (talk | contribs) m (moved Tips and Tricks to Window lighting: This is the only tip here (and has been for over a year now).) |
MossyBucket (talk | contribs) (Rewrote the manual. Categorized. Removed ns:6 voodoo.) |
||
Line 1: | Line 1: | ||
By default, light will only shine in through a window if the [[env_sun]] angle is set so that sunlight shines directly through it. However, real-world windows will often stream in ''refracted'' (indirect) sunlight, independent of the suns angle. | |||
Valve commonly uses the following technique to simulate this: | |||
[[Image:windowtip1.png|right|thumb|A simple window with a frame.]] | |||
1. Create the opening that you want light to refract through (such as a window). | |||
{{clr}} | {{clr}} | ||
[[Image:windowtip2.png|right|thumb|The brush-filled window.]] | |||
2. Cover the opening with a brush using the ''nodraw'' texture. | |||
[[ | |||
{{clr}} | {{clr}} | ||
Texture the inward-facing side of this brush with the ''lights/white001_nochop'' texture. This | [[Image:windowtip3.png|right|thumb|The brush will now emit light.]] | ||
3. Texture the inward-facing side of this brush with the ''lights/white001_nochop'' texture. This particular texture emits light in-game. You can adjust the strength of this light with the "Texture scale" settings. (''Lightmap scale'' does nothing in this regard.) | |||
{{clr}} | {{clr}} | ||
[[Image:windowtip4.png|right|thumb|The properties box.]] | |||
4. Tie the brush to a [[func_brush]] entity. In its properties, set '''Render Mode''' to ''Don't Render'' to will prevent the non-transparent brush from blocking the view as a white sheet. (It will still emit its light.) Unless you want the brush to simulate unbreakable glass, also set ''Solidity'' to ''Never Solid''. | |||
{{note|Tying the brush to an non-rendered [[func_illusionary]] would work just as well, but this entity type has been deprecated.}} | |||
{{ | |||
{{clr}} | {{clr}} | ||
[[Category:Level Design]] [[Category:Tutorials]] |
Revision as of 08:10, 9 February 2011
By default, light will only shine in through a window if the env_sun angle is set so that sunlight shines directly through it. However, real-world windows will often stream in refracted (indirect) sunlight, independent of the suns angle.
Valve commonly uses the following technique to simulate this:
1. Create the opening that you want light to refract through (such as a window).
2. Cover the opening with a brush using the nodraw texture.
3. Texture the inward-facing side of this brush with the lights/white001_nochop texture. This particular texture emits light in-game. You can adjust the strength of this light with the "Texture scale" settings. (Lightmap scale does nothing in this regard.)
4. Tie the brush to a func_brush entity. In its properties, set Render Mode to Don't Render to will prevent the non-transparent brush from blocking the view as a white sheet. (It will still emit its light.) Unless you want the brush to simulate unbreakable glass, also set Solidity to Never Solid.
