Linedef render bug

Ask about mapping, UDMF, using DoomBuilder/editor of choice, etc, here!

Moderator: GZDoom Developers

Forum rules
Before asking on how to use a ZDoom feature, read the ZDoom wiki first. If you still don't understand how to use a feature, then ask here.
User avatar
Bilbö Bägginson
Posts: 23
Joined: Mon Nov 30, 2020 11:11 pm
Graphics Processor: nVidia with Vulkan support

Linedef render bug

Post by Bilbö Bägginson »

I already saw this bug but I could fix it before by changing the point`s position a bit. But now this doesn`t work.
Everything is ok before I add some one line. Then few other lines start not to render from some angles.

before:


adding a line:


bug:


I have 5948 linedefs on the map in total now.
Why does the issue appear and how it can be fixed?
User avatar
Enjay
 
 
Posts: 26430
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Linedef render bug

Post by Enjay »

It's hard to tell just from screenshots, but it looks like the sidedefs on the line might be referencing the wrong sectors. Does the sector index field for them have the same number as the sector that they face? (i.e. the sector that the line is in.) I don't mean the sector tag (2 in this case), I mean the actual sector number.
User avatar
Bilbö Bägginson
Posts: 23
Joined: Mon Nov 30, 2020 11:11 pm
Graphics Processor: nVidia with Vulkan support

Re: Linedef render bug

Post by Bilbö Bägginson »

Enjay wrote:Does the sector index field for them have the same number as the sector that they face?
Yes, they have
User avatar
Enjay
 
 
Posts: 26430
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Linedef render bug

Post by Enjay »

Sorry, without seeing the map, I can't think of much else.
User avatar
Bilbö Bägginson
Posts: 23
Joined: Mon Nov 30, 2020 11:11 pm
Graphics Processor: nVidia with Vulkan support

Re: Linedef render bug

Post by Bilbö Bägginson »

User avatar
Enjay
 
 
Posts: 26430
Joined: Tue Jul 15, 2003 4:58 pm
Location: Scotland

Re: Linedef render bug

Post by Enjay »

OK, certainly deleting that line prevents the graphical glitches in front of the player start.

I'm not 100% sure that this is the cause but you have quite a lot of vertices that are "not aligned to the grid". i.e. their coordinates are not whole numbers. While vertex coordinates with values less than 1 are technically legal, they are known to sometimes cause rendering problems. Certainly, a quick and dirty "fix" of allowing UDB to auto-align all such vertices in your map to the grid (thereby causing other problems such as more than one vertex having the same coordinates, and - of course - messing up some of the fine details of the map) does stop the graphical glitches.

Generally, I try to avoid creating vertices with fractional coordinates and only use them when absolutely necessary. So, I'm not saying that definitely is the problem here, but getting rid of such vertices does seem to stop the glitch happening.
User avatar
Kappes Buur
 
 
Posts: 4035
Joined: Thu Jul 17, 2003 12:19 am
Location: British Columbia, Canada

Re: Linedef render bug

Post by Kappes Buur »

Things to keep in mind:
1. when creating a map there is a size limit of ca 32000x32000
2. the map should be centered around the middle index
3. extremely large/small sectors cause problems
4. supporting control sectors should be close to the map

and this one is a personal thing
5. providing a map without appropriate resources is an immediate turn-off
User avatar
Bilbö Bägginson
Posts: 23
Joined: Mon Nov 30, 2020 11:11 pm
Graphics Processor: nVidia with Vulkan support

Re: Linedef render bug

Post by Bilbö Bägginson »

Kappes Buur wrote:when creating a map there is a size limit of ca 32000x32000
I reduced large excess open space on the map and glitches are gone for now. Thanks!
providing a map without appropriate resources is an immediate turn-off
Don`t quite understand why it was necessary to send whole archive just to demonstrate these glitches but ok, I'll keep it in mind.
User avatar
ramon.dexter
Posts: 1304
Joined: Tue Oct 20, 2015 12:50 pm
Graphics Processor: nVidia with Vulkan support
Location: Kozolupy, Bohemia

Re: Linedef render bug

Post by ramon.dexter »

Bilbö Bägginson wrote: Don`t quite understand why it was necessary to send whole archive just to demonstrate these glitches but ok, I'll keep it in mind.
Because some glitches could be caused by incorrectly created or defined resources. You never know.

Return to “Mapping”