Doom 64 style lighting improvements

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is ON
[img] is OFF
[url] is ON
Smilies are ON

Topic review
   

Expand view Topic review: Doom 64 style lighting improvements

Re: Doom 64 style lighting improvements

by Talon1024 » Sun Jan 05, 2020 10:48 pm

Speaking of which, I think it would be a good idea to add a UDMF boolean property to either sectors or lines that does the same thing as GLSector_NoSkyDraw, so that these sectors can do other things besides avoid rendering the skybox above the walls.

Or a map flag in MAPINFO that tells GZDoom to render skies like in Doom 64?

Re: Doom 64 style lighting improvements

by Graf Zahl » Sun Jan 05, 2020 3:29 pm

Re: Doom 64 style lighting improvements

by Mav3r1ck » Sun Jan 05, 2020 3:26 pm

Graf Zahl wrote:Yes, because the editor doesn't have a definition for it.
Where can I find a list of these specials that the editor doesn't define?

Re: Doom 64 style lighting improvements

by Graf Zahl » Sun Jan 05, 2020 1:25 am

Yes, because the editor doesn't have a definition for it.

Re: Doom 64 style lighting improvements

by Mav3r1ck » Sat Jan 04, 2020 5:35 pm

It read as "unknown effect" in the window when I was setting the line special.

Re: Doom 64 style lighting improvements

by Graf Zahl » Sat Jan 04, 2020 3:14 pm

89 is not "unknown effect" but clearly means "don't render sky on this line", it was specifically added for this effect.

@Talon: That clearly needs to be controlled with another flag, but if needed for Doom 64 that shouldn't be a problem.

Re: Doom 64 style lighting improvements

by Mav3r1ck » Sat Jan 04, 2020 2:50 pm

Hmm, I look over the example map about the sky and noticed that special effect 89 (Unknown Effect) was put in the sectors with F_SKY and replicated the effect shown in D64. I tested this in one of my maps and did the trick.

Is their any downsides to doing this? Cause it would save a LOT of trouble with 3d sectors and raised ceilings.

EDIT: you mentioned the colors can't be clamped to 3d floors. Can it be done to regular sector sidedefs?

Re: Doom 64 style lighting improvements

by Talon1024 » Sat Jan 04, 2020 2:34 pm

AFAIK, the Doom 64 colours cannot be applied to 3D floor sectors or clamped to the height of 3D floors yet, and if you put a 3D floor in a sector surrounded by sectors with Doom 64 lighting, the sides of the 3D floor will be like regular wall sections of that sector without clamping, flipping, or flattening.

BTW, I was able to get walls to render behind skies like in Doom 64 by doing this:

Code: Select all

diff --git a/src/rendering/hwrenderer/scene/hw_walls.cpp b/src/rendering/hwrenderer/scene/hw_walls.cpp
index 1873ce5d3..b74e929fa 100644
--- a/src/rendering/hwrenderer/scene/hw_walls.cpp
+++ b/src/rendering/hwrenderer/scene/hw_walls.cpp
@@ -2024,11 +2024,13 @@ void HWWall::Process(HWDrawInfo *di, seg_t *seg, sector_t * frontsector, sector_
 			if (frontsector->GetTexture(sector_t::floor) != skyflatnum || backsector->GetTexture(sector_t::floor) != skyflatnum)
 			{
 				// the back sector's floor obstructs part of this wall				
+                /*
 				if (ffh1 > bch1 && ffh2 > bch2)
 				{
 					bch2a = ffh2;
 					bch1a = ffh1;
 				}
+				*/
 			}
 
 			if (bch1a < fch1 || bch2a < fch2)
@@ -2105,11 +2107,13 @@ void HWWall::Process(HWDrawInfo *di, seg_t *seg, sector_t * frontsector, sector_
 
 		/* bottom texture */
 		// the back sector's ceiling obstructs part of this wall (specially important for sky sectors)
+		/*
 		if (fch1 < bfh1 && fch2 < bfh2)
 		{
 			bfh1 = fch1;
 			bfh2 = fch2;
 		}
+		*/
 
 		if (bfh1 > ffh1 || bfh2 > ffh2)
 		{

Re: Doom 64 style lighting improvements

by Mav3r1ck » Sat Jan 04, 2020 1:17 pm

Talon1024 wrote:You mean the light gradients are clamped to the height of the upper section of the sidedef? GZDoom allows clamping the gradient to the top of the sidedef. Here is the relevant part of the GZDoom-specific UDMF info.

Also, the way Doom 64 renders walls behind skies (which are invisible) is different than how GZDoom renders walls behind skies, even if GLSector_NoSkyDraw is used as the sector special. For example, the wooden corpse hanger on the left in the first picture in this thread would be half as tall in GZDoom.

Also, it seems like the Doom 64 lighting gradients on walls are broken in recent builds. They were working as of this commit, however.
Yes, that's what I meant. I'm not sure if this was considered or noticed (never saw a discussion regarding it) when adding the D64 colors to GZD but I made mention of it just in case.

And also, can the D64 colors be applied to 3d sectors?

EDIT: How do I clamp the gradients to resemble how it's done in D64?

Re: Doom 64 style lighting improvements

by Graf Zahl » Sat Jan 04, 2020 3:16 am

Thanks. I'll have to check this out before doing a new release.

Re: Doom 64 style lighting improvements

by Talon1024 » Sat Jan 04, 2020 3:11 am

Here you go. There's an area where the ceiling is green and the floor is blue. The wall and cube should both have blue/green gradients on them.

EDIT: The Doom 64 gradients seem to only work if the sector has additive lighting. I also have another test WAD showcasing this issue.

Re: Doom 64 style lighting improvements

by Graf Zahl » Sat Jan 04, 2020 2:39 am

Do you have a ready-to-test map that shows the broken-ness? There were some recent feature additions that may interfere with the Doom64 lighting.

Re: Doom 64 style lighting improvements

by Talon1024 » Sat Jan 04, 2020 12:30 am

Mav3r1ck wrote:I've noticed something about the D64 colored lighting feature but I'm not sure if it's been discussed.

Say for example you make a parent sector and create a child sector inside and in the middle (64 x 64 for example) using Doom Builder 64 for Doom 64 Ex, and lower the child sector from the ceiling about 64 tics (to make it look like a cube) and you apply the multi-layeredcolors to the parent sector.

Now, if your do this in GZD, you'll notice that everything appears fine, but if you look at the lowered ceiling of the child sector you'll see that the multi-layered colors stretch the whole sector height. However, in Doom 64 if you attempt the same thing the result will be that if you look on the outside walls of the lowered ceiling (child sector) you'll notice that instead of the multi-layered colors stretching the whole sector height, it will only stretch from the bottom and top of the sidedefs (walls) of the lowered child sector. Now, in GZDB you can only replicate this effect by raising the parent sectors floor height to match the lowered child sector's ceiling height or vice versa.

To get a better idea (I tried to explain this the best way I can) of what I'm talking about. You will noticed this effect by going to Hectic in D64 Ex. After starting the level, go to the Yellow Key room with the arrow trap. As soon as you enter the room you'll notice one of the suspended panels above the door without a bottom. This is one of the many panels inside the room that fires the arrows after crossing the platforms linedefs when attempting to obtain the Yellow Key. Now if you notice, all the wall panels have applied multi-layered colors and glow instead of the one above the door. Now if you look closely you'll see that from the top of the square panel (64 x 64) to the bottom of the panel you'll notice that the lower and upper ceiling coloring is only being applied to the lower and upper parts of the panel height instead of the whole sector height like in GZD. You can also take notice of this effect in the level The Bleeding when you go outside the central start building and notice the cubed shaped child sectors outside the player start building.
You mean the light gradients are clamped to the height of the upper section of the sidedef? GZDoom allows clamping the gradient to the top of the sidedef. Here is the relevant part of the GZDoom-specific UDMF info.

Also, the way Doom 64 renders walls behind skies (which are invisible) is different than how GZDoom renders walls behind skies, even if GLSector_NoSkyDraw is used as the sector special. For example, the wooden corpse hanger on the left in the first picture in this thread would be half as tall in GZDoom.

Also, it seems like the Doom 64 lighting gradients on walls are broken in recent builds. They were working as of this commit, however.

Re: Doom 64 style lighting improvements

by Mav3r1ck » Thu Jan 02, 2020 7:49 am

I've noticed something about the D64 colored lighting feature but I'm not sure if it's been discussed.

Say for example you make a parent sector and create a child sector inside and in the middle (64 x 64 for example) using Doom Builder 64 for Doom 64 Ex, and lower the child sector from the ceiling about 64 tics (to make it look like a cube) and you apply the multi-layeredcolors to the parent sector.

Now, if your do this in GZD, you'll notice that everything appears fine, but if you look at the lowered ceiling of the child sector you'll see that the multi-layered colors stretch the whole sector height. However, in Doom 64 if you attempt the same thing the result will be that if you look on the outside walls of the lowered ceiling (child sector) you'll notice that instead of the multi-layered colors stretching the whole sector height, it will only stretch from the bottom and top of the sidedefs (walls) of the lowered child sector. Now, in GZDB you can only replicate this effect by raising the parent sectors floor height to match the lowered child sector's ceiling height or vice versa.

To get a better idea (I tried to explain this the best way I can) of what I'm talking about. You will noticed this effect by going to Hectic in D64 Ex. After starting the level, go to the Yellow Key room with the arrow trap. As soon as you enter the room you'll notice one of the suspended panels above the door without a bottom. This is one of the many panels inside the room that fires the arrows after crossing the platforms linedefs when attempting to obtain the Yellow Key. Now if you notice, all the wall panels have applied multi-layered colors and glow instead of the one above the door. Now if you look closely you'll see that from the top of the square panel (64 x 64) to the bottom of the panel you'll notice that the lower and upper ceiling coloring is only being applied to the lower and upper parts of the panel height instead of the whole sector height like in GZD. You can also take notice of this effect in the level The Bleeding when you go outside the central start building and notice the cubed shaped child sectors outside the player start building.

Re: Doom 64 style lighting improvements

by Graf Zahl » Thu Jan 02, 2020 1:32 am

Additive properties are there. The rest, not yet.

Top