Xonotic Forums
[DISCUSSION] Possible bug with lights in maps.? - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Support (https://forums.xonotic.org/forumdisplay.php?fid=3)
+--- Forum: Xonotic - Help & Troubleshooting (https://forums.xonotic.org/forumdisplay.php?fid=4)
+--- Thread: [DISCUSSION] Possible bug with lights in maps.? (/showthread.php?tid=813)



Possible bug with lights in maps.? - vede - 08-11-2010

So in my recent messings in NetRadiant, I've been reading the entities' keys and such, and in the process I discovered a way to achieve dynamic lighting without using the in-game rtlight editor by setting _keepLights to 1 on the worldspawn entity, but it resulted in huge performance loss. So I did some more experimenting, and I thought I had figured out a way to have dynamic lighting where I wanted it a static lighting where I didn't want it. According to the "light" entity, setting the "nogridlight" flag stops the light entity from affecting the lightgrid, so it would only function as a dynamic light in-game without affecting the lighting calculations when the map is compiled. I checked this, and it worked. Turning off dynamic lighting caused the light in question to be totally dark. So then I needed a way to get lights that produced NO dynamic lighting but still affected the lightgrid (since a normal light will either affect both or just the lightgrid). The lightJunior entity's description claims that lightJuniors do just that; they affect ONLY the lightgrid, which I would assume to mean that they produce no dynamic lighting in-game. I checked this, and in-game, they functioned in exactly the same way as a normal light with nogridlight turned on. Turning off dynamic lighting meant the light was totally dark, and with dynamic lighting on it worked like a normal dynamic light.

This is either a bug or I'm severely misunderstanding something about how lights work (which is, I guess, possible, since I don't really have much experience in this other than the last few weeks).

Anyone here mind explaining to me what I'm not getting or confirming that there's something wrong going on?

(Also, I know there's the in-game editor for rtlights, but I'm specifically trying to see what I can do just in NetRadiant. Surely there's some way to make a light that only affects lighting when the map is compiled, but then doesn't act like a dynamic light afterward, right?)


RE: Possible bug with lights in maps.? - divVerent - 08-12-2010

Creating dynamic lights from Radiant is not supported. The _keepLights way just takes ALL lights over as engine dynamic lights.

And as for lightJunior vs light:

lightmap = the statically compiled lighting you see on map surfaces
lightgrid = the statically compiled lighting you see on player models

lightJunior actually is nothing more than light with nolightgrid.


RE: Possible bug with lights in maps.? - vede - 08-12-2010

Hm, thanks.

But is it possible that dynamic lights in Radiant will be implemented? Having everything required for mapping in one editor, except for a certain kind of lighting, seems really awkward, and the simplicity of the issue (that is, instead of removing all lights or no lights when the map is compiled, only removing certain lights) seems to lend itself to the changes required to fix it being pretty simple as well.


RE: Possible bug with lights in maps.? - Roanoke - 08-12-2010

(08-12-2010, 12:43 AM)divVerent Wrote: Creating dynamic lights from Radiant is not supported. The _keepLights way just takes ALL lights over as engine dynamic lights.

Including skybox lights?


RE: Possible bug with lights in maps.? - Moo - 08-12-2010

(08-12-2010, 02:12 AM)vede Wrote: Hm, thanks.

But is it possible that dynamic lights in Radiant will be implemented? Having everything required for mapping in one editor, except for a certain kind of lighting, seems really awkward, and the simplicity of the issue (that is, instead of removing all lights or no lights when the map is compiled, only removing certain lights) seems to lend itself to the changes required to fix it being pretty simple as well.

Well, to get technical, actually there are several things required to do outside of NetRadiant. These involve:
1) Editing the Mapinfo file,
2) Bot waypoints
3) RTLights
4) Packaging the map
5) Playtesting the map!

For steps 2, 3, and 5 you have to go into the game to do. So just make it a combined visit if you really don't like playing the game? Tongue


RE: Possible bug with lights in maps.? - Roanoke - 08-12-2010

Well, his point is that all of it should be doable in radiant.