Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

"Static light" (BSP entity dynamic light) feature #1051

Open
slipher opened this issue Feb 21, 2024 · 1 comment
Open

"Static light" (BSP entity dynamic light) feature #1051

slipher opened this issue Feb 21, 2024 · 1 comment

Comments

@slipher
Copy link
Member

slipher commented Feb 21, 2024

There is a feature for the renderer to add dynamic lights based on BSP entities with the light class name. There are no Tremulous or Unvanquished maps that use it. I don't know if this is a Wolfenstein thing, a half-assed Xreal demo or what. The lights only appear when using the tiled renderer, not the legacy dynamic light renderer (probably a regression). This is the only BSP entity other than worldspawn which is processed by the renderer.

I suppose this feature might be used for lights that change brightness since there is the possibility to add a custom shader which could be time-dependent. The possibilities of doing stuff with lights at runtime are limited though, since the BSP entities are not instantiated as real entities in the sgame, so you can't make them move around, enable/disable them, or anything like that. If we want to do dynamic light stuff in maps, it seems better to nuke these renderer light entities and define a proper networked entity.

There are a few maps with light entities, but it appears all of these are just ones where the mapper used the -keeplights q3map2 flag for no good reason. The lights have no effect in-game because they are normally only added by the engine if they have the noradiosity key (which tells q3map2 not to process them). None of our known maps have that.

On Daemon master, you can force the light entities to be rendered on such a map (e.g. stahl) by setting the cvars r_lightMode 1 and (to make the lights easier to see) r_lightScale 500.

unvanquished_2024-02-21_001756_000

Perhaps the feature has/had some use as a tool to quickly test lighting without the cost of full map compilation? No doubt the results are way different though.

r_staticLight, a cvar which enables/disables these entity-based lights, should get a more appropriate name like r_lightEntities.

@illwieckz
Copy link
Member

This was probably a DOOM3 feature implemented in XreaL (like many other things including some material syntax). For having dealt a bit with the DOOM3-related renderer in NetRadiant and with DarkRadiant game configuration (that describes what is the light entity names) those light entities ring a bell.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants