light asthetics

Ezekel

L11: Posh Member
Dec 16, 2008
818
245
so there's the point_spotlight, the env_lightglow and the env_sprite
probably others i've not come across yet.

do people have a preference to one? what factors go into choosing what method to use to add that little extra flare (no pun intended) to a light source?


also, which ones are most expensive to render? (assuming you have the point_spotlight flag "no dynamic light" turned on)
 

Icarus

aa
Sep 10, 2008
2,245
1,210
I prefer to use point_spotlight wherever possible but you have to be careful, too many spotlights and you'll hit the dreaded No Free Edicts error
 

dirtyminuth

L5: Dapper Member
Nov 5, 2007
221
15
Here are my three lighting "scenarios" that I utilize (not including light_environment):

Ambient Lighting
  • light
    - High linear, high constant, low quadratic
    - Low (100-) brightness
Directed Lighting
  • light_spot
    - High (300+) brightness
  • point_spotlight
    - Same color as associated light_spot
Point Lighting
  • light
    - Medium (100-300) brightness
  • env_sprite
    - Centered on associated light
    - Render Mode: World Space Glow
    - Sprite Name: materials/Sprites/light_glow03.vmt (works well)

There are additional tweaks I use, but that's about it. light_spot / point_spotlight and light / env_sprite are logical couples.
 

Ezekel

L11: Posh Member
Dec 16, 2008
818
245
I prefer to use point_spotlight wherever possible but you have to be careful, too many spotlights and you'll hit the dreaded No Free Edicts error

what's a no free edicts error exactly?
is it at compile stage or in game?



also, if that's the case, does combining an envsprite and env lightglow seem like a good way to simulate the same effect of a point spotlight?
 

Icarus

aa
Sep 10, 2008
2,245
1,210
There's a limit of edicts built into the Source engine. Edicts are usually generated by dynamic entities.

point_spotlight consists of several edicts.

If you exceed the edict limit, the server will crash with no log, and all clients will exit to desktop without warning.
 
Last edited:

NovaSilisko

L42: Life, the Universe and Everything
aa
Feb 3, 2009
502
270
Hmm, I usually use env_lightglow, but is that more expensive then a sprite?
 

Ezekel

L11: Posh Member
Dec 16, 2008
818
245
i believe sprite is cheapest of the lot.

i usually use a sprite + a lightglow together


There's a limit of edicts built into the Source engine. Edicts are usually generated by dynamic entities.

point_spotlight consists of several edicts.

If you exceed the edict limit, the server will crash with no log, and all clients will exit to desktop without warning.
could you give a ball park as to how many point spotlights it's safe to have?
e.g. 20-30? 30-40? 40-50?
 

Icarus

aa
Sep 10, 2008
2,245
1,210
it's not a set number, because there are lots of other entities that take up edicts.

I know for some reason, Waste has a very high edict count, so I'm limited to only about 10-20 spotlights.

However, some other maps have up to 50
 

Ezekel

L11: Posh Member
Dec 16, 2008
818
245
it's not a set number, because there are lots of other entities that take up edicts.

I know for some reason, Waste has a very high edict count, so I'm limited to only about 10-20 spotlights.

However, some other maps have up to 50

is there a way to check if you have a high/low count?
so you know if you've got edicts to spare or not