Jump to content
Search In
  • More options...
Find results that contain...
Find results in...
NinjaLiquidator

Static lighting like in Quake1?

Recommended Posts

I have an idea for script that would go through all linedefs and depending on defined light sources it would do static lighting on textures - like in Quake1. Light source would be needed to be some special thing, that would be deleted after the script would execute. Then it would generate textures for each linedef and replace the current ones with them. The flats would be worse. It would be needed to tile everything into 64*64 grid and then it would be possible. I wonder if somebody have done something like this.

Share this post


Link to post

This wouldn't be something like a "script" so much as raw programming. I can't imagine any source port that has remotely anything to manage this, so you're going to have to dive into source and figure out how to implement it in there.

Share this post


Link to post

The Vavoom source port had this (lightmaps), though it ceased development quite a long time ago.

Share this post


Link to post

Not before switching to dynamic stencil shadows, IIRC.

KEX engine can do lightmaps. But it's not a Doom engine, not in the usual sense. It powers Doom64 EX (I don't know if public builds support lightmaps), Powerslave EX, and Strife: Veteran Edition.

Baking lighting into textures sounds like hackiness, but I dunno. You'd have to keep the entire level fullbright, and the actors would have to be lit via UDMF sector properties, I guess.

Share this post


Link to post
Da Werecat said:

KEX engine can do lightmaps. But it's not a Doom engine, not in the usual sense. It powers Doom64 EX (I don't know if public builds support lightmaps), Powerslave EX, and Strife: Veteran Edition.

SVE is Strife through and through with a modified Kex renderer slapped on. So it does qualify for "the usual sense".

Share this post


Link to post

Actually I meant C++ program that would execute before playing a map. I didnt mean anything like source port. Technically it would just modify textures, but then it would look class better and still be Boom compatible.

Share this post


Link to post

I see, but even if it was feasibly easy to program, what about the brightness problem that Da Werecat mentioned in the last sentence of his post?

Share this post


Link to post

It would ignore brightness information and just bake lighting. Brightness would remain in sectors. I think its not a problem, it would look good anyway ...

Share this post


Link to post

The problem is, while lighting that is "baked into textures" would look the same regardless of distance that the player views the textures from, the actual lighting determined by sector brightness depends on the distance from the player, this is called light diminishing. If you combine sectors of different light levels (therefore with variable light diminishing) with lighting baked into textures (therefore with constant distance-independent lighting), the result would look really really unnatural as the player will view the map from different places and distances. I hope you can imagine it, but if not, make a map with at least 3 different light levels along the same wall and then try to manually edit the wall's texture in a graphic editor to make the wall look uniformly lit-up regardless of where the player is standing in the map. I tell you, it won't look good regardless of how much care and effort you put into it.

(Note: Distance-dependant light diminishing doesn't apply in OpenGL-based ports in certain lighting modes. So, baking lighting into textures has a chance to look good in these ports and these lighting modes.)

Share this post


Link to post

You can't go beyond a certain brightness in dark sectors. If a dark sector requires a bright spot, it won't work. Fullbright levels is the only solution I can think of, and it means either fullbright actors everywhere, or a ZDoom exclusive (assuming you can lit actors separately from sectors there).

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×