User Tools

Site Tools


tutorials:mapping:self_referencing_sectors

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
tutorials:mapping:self_referencing_sectors [2025/08/03 03:12] fe80:5ac6:68e8:33c9:f1ab:a4ed:ace9:447btutorials:mapping:self_referencing_sectors [2025/08/04 20:44] (current) fe80:5ac6:68e8:33c9:f1ab:a4ed:ace9:447b
Line 1: Line 1:
 =====Self Referencing Sectors===== =====Self Referencing Sectors=====
  
-Normally, when you have a sector inside another sector, the lines that make up the interior sector reference both sectors. The outside sector is referenced by the front or back of the lines (depending on which way you have the normals flipped), and the other side references the interior sector itself.+Normally, when you have a sector inside another sector, the lines that make up the interior sector reference both sectors. The outside sector is referenced by the front or back of the lines (based on the line’s direction in the editor), and the other side references the interior sector itself.
 But! If you have the outide of the line reference the interior sector as well, you get fun things. Things like... \\  But! If you have the outide of the line reference the interior sector as well, you get fun things. Things like... \\ 
 ;#; ;#;
Line 23: Line 23:
 {{:tutorials:mapping:srs3.png?400|}} {{:tutorials:mapping:srs3.png?400|}}
 ;#; ;#;
-Notice how the "Sector Indexfields both say "24(the bridge sector). +Notice how both 'Sector Indexfields are set to '24(the bridge sector). This tricks Doom’s renderer into skipping the floor and ceiling, making the bridge invisible. I just dumped some bodies on top to make it a corpse bridge. You can't walk under the bodies, of course, but the effect is nice.
-Now the bridge is invisible. I just dumped some bodies on top to make it a corpse bridge. You can't walk under the bodies, of course, but the effect is nice.+
  
-You might have noticed that the sector encompassing the bridge is pretty tight against it. There's a good reason for that. Due to how Doom cuts up Sectors into Subsectors, and assigns those subsectors a sector index from an encompassing sector, you could end up with a bridge that is wider than you want it (you're altering the assignment of those subsectors, so they think they they should be with the bridge sector. So force the game to trim it down by manually cutting in a sector around the bridge.+You might have noticed that the sector encompassing the bridge is pretty tight against it. There's a good reason for that. Doom’s BSP system splits sectors into subsectors and assigns them the sector index of the nearest linedef’s referenced sector. With self-referencing sectorsthis can make the bridge’s properties (like height) bleed into surrounding subsectors, making it seem wider than intended. So, tightly surround the bridge with another sector to limit this.
  
 For another example of what you can do with self referencing sectors: For another example of what you can do with self referencing sectors:
Line 33: Line 32:
 ;#; ;#;
 Deep water! Or blood. This effect is more subtle, but in-game it's noticeable. Especially if you put a lowered tunnel above the deep-water to sell the effect. Deep water! Or blood. This effect is more subtle, but in-game it's noticeable. Especially if you put a lowered tunnel above the deep-water to sell the effect.
-Opposite of the bridge, lower this sector down instead of raising it up, and have the lines that make it up reference the lowered sector on both sides. If you lower it too low you'll get rendering issues, so it'best to keep the water-line above camera height+Opposite of the bridge, lower this sector down instead of raising it up, and have the lines that make it up reference the lowered sector on both sides. If you lower it too low you'll get rendering issues (hall of mirrors effect) as the player'view goes beneath the rendered floor.
 For this one I didn't cut around the sector, so you can see the issue with it assigning subsectors sector indexes. For this one I didn't cut around the sector, so you can see the issue with it assigning subsectors sector indexes.
 ;#; ;#;
tutorials/mapping/self_referencing_sectors.1754190732.txt.gz · Last modified: 2025/08/03 03:12 by fe80:5ac6:68e8:33c9:f1ab:a4ed:ace9:447b