Too many light styles on a face

Avatar
Shane
243 Posts
Posted Aug 16, 2012
Getting this error compiling my map

Quote:
WARNING: Too many light styles on a face at (1032.000000, 1862.000000, -2087.000000)

And although it doesn't seem to cause any noticeable issues I read on the dev wiki that it can sometimes cause bad lighting and i'd prefer to correct it if possible. I also read that it's usually caused by transparent materials, and the only transparent material that I have is a few sheets of glass.

Due mainly to how quickly my computer compiles maps I didn't notice this problem until it was too late so it was impossible for me to backtrack the particular change that caused this issue, so basically I'd like to know if there's any way to hunt the problem down and when I do what I can do to fix it?

Advertisement
Registered users don’t see ads! Register now!
Avatar
ChickenMobile
2,460 Posts
Posted Aug 16, 2012
Replied 17 minutes later

Interlopers.net wrote:
To stop this error, remove lights, dont give the light names unless you need to, make sure certain lights dont shine on the face (max_shining distance or by blocking it with brushes) or simply dont use that much switchable lights. Dynamic lights are not used by vrad.exe thus dont count. Lights with the same names are counted as the same lights. Find the location of the error using the coordinates.

So what it is saying is to remove or 'un-name' light entities. Generally having named lights and/or lights with effects such as flickering create a light style and greatly increases your file size.

Avatar
josepezdj
2,386 Posts
Posted Aug 16, 2012
Replied 18 minutes later
Shane, there are already many threads about this in the forum. Please search before posting a new topic. Thanks :thumbup:

When you compile, vrad is in charge of storing a thing called lightmaps, a resulting texture applied to each brush's side that simulates lighting on each of those sides. You can have a max of 4 light styles reaching each side of a given brush, not more (or you'll receive that warning message). Normally it doesn't cause much visual issues, but sometimes it does; prevent it if possible.

Light styles mean ONLY the color/brightness of the light (the 3 first values you put in Brightness properties); so you can have for example 230 242 102 200 and 230 242 102 100 and they would count only as 1 light style.

Commonly, this issue appears when you name light entities because what vrad does is to store 2 lightmaps per brush face: one when the light is ON and other when it's OFF. This would be fired usually near the cube_droppers, why? because into them there are 2 light entities named and with I/O (one is blue shades to indicate it's inactive / and other orangish to indicate the dropper is active). This would suppose 4 light styles already! Only using 1 light more of your choice near it, and the warning message will be fired when you compile.

EDIT:

Read this awesome compendium about lighting by Nacimota as well...

Avatar
Shane
243 Posts
Posted Aug 16, 2012
Replied 58 minutes later
I don't have any named light entities in my map. I do have a flickering laser field texture but I have used laser fields in other maps with no errors. I don't have any flickering or switchable lights in my map either.

Also, is there any way to jump to the specific locations mentioned?

Avatar
josepezdj
2,386 Posts
Posted Aug 16, 2012
Replied 47 minutes later

Shane wrote:
I don't have any named light entities in my map. I do have a flickering laser field texture but I have used laser fields in other maps with no errors. I don't have any flickering or switchable lights in my map either.

I repeat: that could be caused by the cube droppers... Check that.

Shane wrote:
Also, is there any way to jump to the specific locations mentioned?

Ofc, in hammer go to VIEW > Go to Coordinates ... then introduce the ones the log tells you.

Avatar
Shane
243 Posts
Posted Aug 16, 2012
Replied 10 minutes later
You're right it is the cube droppers, specifically a couple of laser cube droppers I put into my map. Can it be fixed without me removing the dropper? Specifically it centres around a dropper I have behind a sheet of glass and next to a laser field.

And again, sorry I'm still feeling my way with Hammer I'm trying to teach myself so I appreciate everyone's help

Avatar
josepezdj
2,386 Posts
Posted Aug 16, 2012
Replied 20 minutes later

Man, you shouldn't apologize ever for asking for help, and less in this forum! remember that :thumbup:

You can do several things (only if that warning message REALLY annoyes you, balance the option of not touching anything if into that area everything looks good, ok? :thumbup: ):

  1. Try to erase surrounding lights, as for instance that one of the laserfield (if you ever placed one)... as long as the func_brush is being rendered as a "constant glow", it'll look fine. Or check out for other surrounding lights and try erasing one of them.

  2. Edit the cube_dropper instance (open its properties window and go to the bottom left corner button that says: "Edit Instance") and save it under a different name. This way you can go into it, erase those 2 lights I mentioned (blue and orange) and that's it.

Avatar
Shane
243 Posts
Posted Aug 16, 2012
Replied 1 hour later
Good point, the tutorial on Valve's dev wiki did encourage me to place a red light at the centre of the field which could be contributing to the problem, I'll try removing that first to see if it helps.

Also, do you have any idea what texture is used for the vertical laser fields in the PTI editor? At the moment I'm using the normal one but obviously it looks a bit stupid on ceiling and floor mounted vertical laser trap

Avatar
Mevious
205 Posts
Posted Aug 16, 2012
Replied 1 hour later

josepezdj wrote:
Light styles mean ONLY the color/brightness of the light (the 3 first values you put in Brightness properties); so you can have for example 230 242 102 200 and 230 242 102 100 and they would count only as 1 light style.

This has nothing to do with light styles. Having two lights [255 0 0 200] and [0 255 0 200] (red and green) right next to each other will still only be one light style assuming they aren't named or flickering.

Avatar
Shane
243 Posts
Posted Aug 16, 2012
Replied 8 minutes later
The light itself wasn't flickering but the texture I used for the laserfield was.
Avatar
FelixGriffin
2,680 Posts
Posted Aug 16, 2012
Replied 7 minutes later
Just the normal field rotated 90 degrees, isn't it?
Avatar
josepezdj
2,386 Posts
Posted Aug 16, 2012
Replied 24 minutes later

Mevious wrote:
This has nothing to do with light styles. Having two lights [255 0 0 200] and [0 255 0 200] (red and green) right next to each other will still only be one light style assuming they aren't named or flickering.

Mevious, I learnt that from Tophattwaffle and I'm sure I'm right. Please read this and go to the final epigraph called "Limits". I'd say that your example means 2 light styles...

Avatar
BEARD!
169 Posts
Posted Aug 16, 2012
Replied 49 minutes later

Quote:
WARNING: Too many light styles on a face (XXX,XXX,XXX)
At the coordinates specified there is a surface lit by too many "effect" lights. This includes lights that have a name (which compiles both on and off status so you could switch them) or a light using effects like flickering. Remove some of them, disable flickering effects or make sure they don't have a name.
Note: A surface may only be lit by up to 4 lights with different targetnames. This means a face can be lit by unlimited different light styles as long as they share up to 4 names.

Vrad doesn't care what a light style is, it cares about the number of different light states a surface can be in.

Avatar
Shane
243 Posts
Posted Aug 16, 2012
Replied 2 hours later
Deleting the red light didn't fix the problem, going to try removing the laser field completely to see if that helps
Avatar
josepezdj
2,386 Posts
Posted Aug 16, 2012
Replied 3 minutes later
No, your problem is the cube_dropper: edit it and remove those lights I mentioned... And don't remember to save it under a different name! :wink:
Avatar
Alexander Bell
306 Posts
Posted Aug 16, 2012
Replied 6 minutes later
Your laser field isn't causing anything, thats just a texture on a brush - it doesn't emit any light. Are you using many different colored lights, or flickering lights in your map?
Avatar
Shane
243 Posts
Posted Aug 16, 2012
Replied 24 minutes later
Ok editing the cube spawners has removed the vast majority of the errors however there are still a couple of places where it seems to be happening, mostly directly underneath a block that I have manipulated with the vertex editor to make it angled.

And no I'm not using any flickering lights in my map, and apart from the red light in the centre of the laser field all are the same colour and brightness.

Edit: The angled surface isn't responsible, tried removing it and still get the same error in the same place

Avatar
Shane
243 Posts
Posted Aug 16, 2012
Replied 17 minutes later

http://www.mediafire.com/?17doi1ituyk999c

Uploaded the VMF, bare in mind this level is incomplete so there are still some items missing from the final chamber, I still intend to add deadly goo and the triggers required to kill the player when falling into the chamber. Also provided the edited cube dropper instances (placed in /sdk_content/maps/instances/gameplay)

http://www.mediafire.com/download.php?7x128fdhm488046

Avatar
Shane
243 Posts
Posted Aug 16, 2012
Replied 42 minutes later
Ok I've done a bit more digging and I think i've narrowed the problem down to the laser catcher, I encased it in a nodraw texture and that removed all but 1 of the remaining problems. Are there laser catcher models in the game cache that don't have light effects?
Advertisement
Registered users don’t see ads! Register now!
Avatar
Alexander Bell
306 Posts
Posted Aug 16, 2012
Replied 20 minutes later
Erm.. prop_laser_catchers don't have any light effects, the ring around them is... I'm not sure what, but I'm pretty sure its a prop with a different skin, and the red light in the middle is a particle system.

I know there are two different laser catcher models, though. Just not sure how to switch between the two.