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

Lighting on things different than on walls

Recommended Posts

I played a deathmatch wad a long time ago that I can't remember the name of, but it featured two rooms on opposite sides of the level, one where it was pitch dark but when you walked in it, items and the HUD weapons were illuminated, and on the other side, the room was well lit, but all the items in it were dark silhouettes.

How do you do that?

Share this post


Link to post

mmmmm I dont know. I don't think having the things point of origin on an extremely small dark sector was the trick, because iirc the players and monsters running around in there were darkened too.

I don't remember the name of the wad, I was just hoping it was an editing trick people knew.

I'd like to preserve the lighting of a map I made, even though it's a little too dark for deathmatch, so I was hoping I could brighten up things without brightening the map.

Share this post


Link to post

Hmm, well if it is Boom compat (or similar) you can use light transfers to achieve what your describing, I think. You''ll have to do a lot of little trim sectors to get it to work just right though, since the light transfers will only work on ceilings and floors. So, for example, you can set a room to have a light level of 0, use a floor and ceiling light transfer of 255, and that should give the same effect. You'll have to trim off walls and stuff and light them manually (use a really tiny sector). That should work for both the light and dark effects; the rooms will look one way, but the sprite will light up according to the sector's light level.

Share this post


Link to post
Mechadon said:

the light transfers will only work on ceilings and floors

Well, in MBF there was a bug with the action 261 "Ceiling brightness to this brightness": it affected things too. This bug was also present in prboom-plus -complevel 9 but entryway fixed it about 2 months ago. So I guess you're too late 40oz. :p

Share this post


Link to post

figged it out. It was self referencing sectors. Make a dummy sector inside a sector, change the lighting of the dummy sector, select all the lines of the dummy sector, change the sidedefs sector index to be the same as the surrounding sector, things in that sector have the lighting chosen for the dummy sector, floor and ceiling inherit the light of the surrounding sector.

Share this post


Link to post

Most ports should have a transfer floor/ceiling light special which, in this case, should have the same effect as the self referencing sector technique.

Share this post


Link to post

That self-ref solution has got me confused. If all the linedefs of the dummy sector are changed to the surrounding sector, that seems to mean that the new sector has no presence in that area at all.
Why would any things be in the dummy sector.

Does not a thing become in a sector (or sub-sector) when it crosses a linedef and considers the sidedef sector number as the sector it
is now within. When that linedef refers to a odd sector (self-ref?)
then interesting things may be rendered (depending on the port).

Share this post


Link to post

I just watched the new uv-max demo for Requiem map29 and noticed this in the starting area:

And I don't see any self-referencing sectors in the editor. What the hell?

Share this post


Link to post

Run REQUIEM.WAD through zennode and the effect disappears.

Zennode refuses to update some levels of REQUIEM because it detects tricks being used. It does update map29. Playing the zennode copy shows things lit as in a normal dark room.

If you walk over by the lift, get close to the corner, and look
around the corner, the things in front of the lit sector will disappear.
Using DoomLegacy and PrBoom.

Share this post


Link to post

Looking at the code does not clear things up.
After every move, the thing is unlinked from previous sectors, and then the sector it is within is discovered and the thing is linked into that sector and into the blockmap.
If it was that simple, then these effects would not occur.
The code does not appear to use the blockmap to discover which sector the thing is within, but somehow it must be involved.

Where it gets thing lightings effects from a mangled blockmap, I have not discovered. It seems to be an effect of which sector the thing is linked into.

Share this post


Link to post

It's probably an open sector, such as a floating 2S line that was accidentally left attached to an orphan sector for which it's the only line.

In the presence of open sectors, ordinary BSP mathematical assumptions no longer fully apply. You can appear to be inside a certain subsector but actually be inside another one altogether. In this case the orphan sector's subsector isn't rendered in any fashion, but, a thing standing "in" it will still adopt its light level.

Share this post


Link to post

Those floating 2s odd sector lines (open sector, self-referencing, odd sector reference) would be suspect, but could not find one in the Requiem map in question. How many different names exist for these things ??

Do zennode and bsp respond differently to such open sectors ??
Would running Requiem through zennode change such open sector effects ??
Has anyone heard of a blockmap editor for making blockmap effects ??

Share this post


Link to post

That is interesting, but that map area does not have a sector within a sector. It only has two adjacent sectors, bordered with void, two lifts and a door. Will have to go look for missing upper textures on the linedef dividing the two sectors.

From an examination of the code have found the following.
When a thing is moved the new location is updated with a call to
R_PointInSubsector, which searches the node list to find the sector that the thing is within. This node list is obtained from the level lump. The nodebuilder creates this node list, which explains why running zennode would remove the effect.

There are some references in the zennode docs about nodebuilder effects,
and marking some sectors and linedefs to preserve special effects, but this one is not among the ones listed.

As a port developer I find these special effects worrisome, as they depend upon accidents of the vanilla source. I have doubts about them working in many modern ports. I have not been trying to preserve these effects in DoomLegacy.
I suspect that many ports, even using OpenGL, still trust the node list enough to get such a lighting effect.
The shadowcasting I suspect will not work with OpenGL.
A modified node list will be defeated by ports that build their own.

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
×