Light entities that don't light anything.


(ConchMan) #1

Hi, I’m looking for some help debuging the light entities in my map. Is there something(s) I can do to ensure that all light entities actually do some lighting?

I’ve done many, many full -meta -vis -light compiles and after loading the map up sometimes the light entities illuminate the floor and the walls and other times they don’t light anything at all. This is happenning accross the entire map. It’s always the same lights that are illuminating and the same lights that are not. I’ve been stuck on this for weeks and now I don’t have anything left to do but fix these stubborn lights.

As you can see:
In game, this hallway is partly lit and other lights adjacent are not lighting at all.

I used showtris and noticed this:

In radiant, however the hallway is generously lit as shown:

All the lights have the same key values including the same color, the same fade (0.55), the angle spawnflag checked, the nonlinear spawnflag unchecked, and with a light value of 150. They are all the same height from the floor as well.

I’ve read other threads about making sure none of the patches are in func_groups so I ungrouped everything and I still get the same result so that doesn’t seem to be the problem. For other ppl, they changed the size of their lightgrid brush and that worked for them fine. However, I don’t have any lightgrid brushes so that doesn’t seem to be the problem either.

I checked my light output and nothing looked unusual. It seems to have finished normallly but maybe I don’t know exactly what to look for. It got all the way to “wrote 12.5 MB file” 388 seconds elapsed.

I tried placing additional light entities with info nulls to point them at the floor and still I get the same result. The floor is made up of some structural and some detail brushes due to the fact that I wanted a big hole in the floor.

I’m using q3map2 2.5.11. My light compile options are -fast -filter -patchshadows -external -lightmapsize 512 -samplesize 8.

Any help/suggestions would be much appreciated.


(MindLink) #2

Are you sure your floor shader has got a lightmap stage? From the pictures it looks a little like it is vertex lit, and since your 2 back lights are to far away from the ground vertices they wouldn’t light them (and as a result of that the whole ground part would not be lit)


(gynec) #3

i used some models with ‘angle’ and (!) ‘angles’ key.
i wondered y sometimes the direction worked and sometimes not.
so try to delete some keys.


(ConchMan) #4

thanks both of you for the very speedy replies.

yeah, you’re right MindLink. After spending the last 3.5 hours learning about lightmap stages, lightmap terrain, prenumbra and all that, I’m fairly sure it will work now that I’ve added them to the shaders. In my box maps that I tested they look so cool.

When I uncheck the angle flag it seems to dim the light but also spread it across a wider area as well so that’s definitely something to think about when designing lighting.

Thank you both for the helping me.

I just have one more question before I go crazy with the lightmaps. I now know that every lightmap stage adds one more pass before the textures are drawn.

What is the maximum number of lightmapped shaders that I should include in my map if I not only have lightmapped terrain but I also want it to play resonably well on the average pc? My system laughs at ET no matter what I do.


(MindLink) #5

Uhm well, ET has lightmaps on nearly every shader so… It shouldn’t really be a problem to use it on everything in your map (except for game-models). :slight_smile:


(SCDS_reyalP) #6

Silly question, but are you sure you aren’t running the game in vertex lit mode ?

and what game is this for ?


(MindLink) #7

Screenies look like ET or RTCW.


(ConchMan) #8

@MindLink
What I find most odd is that some of the textures I found in the pak0.pk3 for Enemy Territory don’t have an entry in their corresponding shader file. An example is textures\awf\floor_m4.jpg. It shows up in gtkradiant, it shows up in game, but there isn’t even an awf.shader in the scripts directory nor the pak0.pk3 file itself.

@SCDS_reyalP
I’m making an Enemy Territory map.
How do I know if I’m running in vertex lit mode or not?


(ratty redemption) #9

unless it`s different in et, this is the console cmd for wolf r_vertexLight, it should be set to 0 unless you want vertex lighting mode… there also might be something in the menus to toggle it.


(MindLink) #10

Those textures might be used in some other shaders under a different name. Anyways, q3map2 should create a standard shader for all textures without shader, and that shader should have a lightmap stage by default.


(SCDS_reyalP) #11

Enemy territory is always in lightmap mode, so scratch that theory :moo:


(ConchMan) #12

ok, at last I’ve figured it out.

when you finish compiling a map there’s a directory created with some tga files called lm***.tga

I have a separate directory for running my maps and my batch file copies the bsp to that directory, but never the directory with the lm***.tga files. as soon as I copied that directory to my ‘run’ directory all of the lights worked properly.

There goes weeks of tinkering for nothing. :banghead:

I think something like this deserves to be in a FAQ or something. It doesn’t seem to be in the LDR, nor the radiant manual.


(rgoer) #13

Yeah, those are the external lightmaps created by the -external flag. Those should just go where q3map2 puts them… why aren’t you just compiling to maps/ anyway? In any case, glad you were able to resolve it, though.