This patch makes 3D floor boundaries appear on the automap. Furthermore, in textured automap mode, the texture used will be the highest 3D floor that is lower than the player's viewpoint, rather than always the ground floor. This gives much better-looking maps.
It also backports Zat0 from ZDoom's 3dfloors2 branch since this is used to determine 3D floor height. I think it's better not to bother with the plane equations of slopes for this feature.
3D floors - automap patch
Moderator: Graf Zahl
- Gez
- Developer
- Posts: 1399
- Joined: Mon Oct 22, 2007 16:47
3D floors - automap patch
- Attachments
-
- 3Dfloors.zip
- (1.84 KiB) Downloaded 140 times
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Re: 3D floors - automap patch
You can't use Zat0 here. For this ZatPoint at the center spot is required. Zat0 only works because the software renderer has no sloped 3D floors so the coordinate doesn't matter.
- Gez
- Developer
- Posts: 1399
- Joined: Mon Oct 22, 2007 16:47
Re: 3D floors - automap patch
ZatPointing all the subsectors with 3D floors in automap mode is going to be dreadfully expensive when the majority of them aren't sloped anyway. In the maps where I tested this (including Paranoia, Braham Manor and HPack) I didn't see the (rare) slopes causing any noticeable problem.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Re: 3D floors - automap patch
You'll have to use the floating point version of ZatPoint anyway or very steep slopes will cause all kinds of glitches.
And that version is a lot faster than the fixed point version. Anyway, ZatPoint is called so often in the code that it can't really be considered a performance killer.
The optimization I did with Zat0 was a localized thing where with relatively small effort I could get some significant performance boost out of it.
BTW, the reasoning in the comment is flawed. You don't want to check the height for each subsector individually. You should always check the sector's center, not the subsector's center.
And that version is a lot faster than the fixed point version. Anyway, ZatPoint is called so often in the code that it can't really be considered a performance killer.
The optimization I did with Zat0 was a localized thing where with relatively small effort I could get some significant performance boost out of it.
BTW, the reasoning in the comment is flawed. You don't want to check the height for each subsector individually. You should always check the sector's center, not the subsector's center.
- Graf Zahl
- GZDoom Developer
- Posts: 7148
- Joined: Wed Jul 20, 2005 9:48
- Location: Germany
- Contact:
Re: 3D floors - automap patch
FYI, I'm still working on it. The basic idea is good but the execution leaves a lot of stuff out. It doesn't respect lighting changes from 3D floors or invisible planes. It even considers pure lighring changes as 3D floors that get marked on the automap so there's still a lot to clean up.