• Light vs. Dynamic vs. Spot
    5 replies, posted
What is the difference aesthetically and performance wise between a [url=http://developer.valvesoftware.com/wiki/Light]light[/url], [url=http://developer.valvesoftware.com/wiki/Light_dynamic]light_dynamic[/url], and [url=http://developer.valvesoftware.com/wiki/Light_spot]light_spot[/url]. Yes I have read each page but I wanted to know what people actually think. Also which would be best to use many times such as in an office building for each fluorescent light in the building? I'm thinking that a few light entities would be better than a light_spot for each fixture. What does Facepunch think?
light and light_spot are both compiled, and don't make much difference performance-wise, light spot looks a lot better in most cases. light_dynamic entities are for special instances where you want lights that can be parented to moving objects / props. They are calculated on the fly and are more costly. They shouldn't be used in place of static lights. Textured lights are precompiled and are great for areas where you want light to be projected from a texture. It's not as configureable as an entity would be (one setting applies to all), but it's probably what you would want to go for, since it's an office building. Textured Lighting Tutorial: [url]http://www.interlopers.net/tutorials/1834[/url]
[QUOTE=ryan1271;21022950]What is the difference aesthetically and performance wise between a [url=http://developer.valvesoftware.com/wiki/Light]light[/url], [url=http://developer.valvesoftware.com/wiki/Light_dynamic]light_dynamic[/url], and [url=http://developer.valvesoftware.com/wiki/Light_spot]light_spot[/url]. Yes I have read each page but I wanted to know what people actually think. Also which would be best to use many times such as in an office building for each fluorescent light in the building? I'm thinking that a few light entities would be better than a light_spot for each fixture. What does Facepunch think?[/QUOTE] for fluorescent light strips I find a light spot and low brightness light combo a few units below (wide angle on the light spot) 1/4 of the way from each end of the light spot model, along with sprites all the way along the model look best in terms of lighting. Lots of dynamic lights can cause a big hit on performance.
Questions: How do I use an env_sprite? I don't understand textured lights. The tutorial doesn't help its for placing the lights.rad file and the link to another tutorial is broken. Edit: (How do I put the small grey 'Edit' thing?) For textured lights do I make a lights.rad file in the map directory and put the texture name followed by a tab and the color values? Is that it?
No you put lights.rad in the 'game' directory. For example Counter Strike: Source = 'cstrike' folder Half Life 2 = 'hl2' folder and in the lights .rad, you need to put the texture name and location followed by RGBI (red + green + blue + intensity). For example, a pure red light: [code]cs_havana/lightb 255 0 0 100[/code] Then compile your map, and wherever cs_havana/lightb is used, the textured lights will appear. Sprites are easy, all you have to remember is put .spr or .vmt at the end of the sprite name, otherwise they won't work. No idea why valve hasn't come up with a fix for that bug, but whatever. Oh and if you're putting the sprites in close proximity to a static prop, make sure it's either far enough away from it, or disable collisions on the prop otherwise it won't show up properly.
Thanks, I knew the intensity part but forgot to add it :doh:
Sorry, you need to Log In to post a reply to this thread.