The International Simutrans Forum

 

Author Topic: Draw_as_ding causing missing pixels  (Read 1972 times)

0 Members and 1 Guest are viewing this topic.

Offline Leartin at

  • Devotee
  • *
  • Posts: 1269
  • PAK-DEV P192C
  • Languages: DE, EN
Draw_as_ding causing missing pixels
« on: January 13, 2018, 09:18:55 PM »


Those missing pixel columns only appear when draw_as_ding is set in the object, and affect all tiles which have a connection to the north and west. All tiles which connect to the north have one missing pixel, the lowest of the column pixels. There needs to be a connection, an unconnected object to the north does not cause issues.

Object is available in the pakset

Offline gauthier

  • Devotee
  • *
  • Posts: 3628
    • SNFOS'website (in both FR and EN)
  • Languages: FR, EN, JP
Re: Draw_as_ding causing missing pixels
« Reply #1 on: January 14, 2018, 10:44:59 AM »
I have the same in pak128 with high enough graphics (here on a piece of elevated tracks).

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: Draw_as_ding causing missing pixels
« Reply #2 on: January 19, 2018, 07:19:40 AM »
Is this with standard zoom? (I mean not zoomed out or in ?) 

I worked on that time ago: https://forum.simutrans.com/index.php?topic=16588.0


Offline Leartin at

  • Devotee
  • *
  • Posts: 1269
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Draw_as_ding causing missing pixels
« Reply #3 on: January 19, 2018, 08:10:15 AM »
This is the standard zoom. It's the same with other zooms as well. Notably, if you zoom in for twice the size, there is still only one column of pixels missing, so half of the 'original pixels' are visible.

I know you worked on it back then, and as you can see in the first picture of the old thread, these missing columns were not a thing back then before your patch, but I can't say when it started to appear. I noticed this issue a while ago, but suspected something with the graphic was wrong so I just made a mental note to fix that later.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: Draw_as_ding causing missing pixels
« Reply #4 on: January 19, 2018, 09:18:40 AM »
Without zoom, the missing pixel column is two pixels wide? I suppose the pixels are there in fast-forward?

For pak192, I cannot blame integer division playing tricks with us, 192 is divisible by 12 and 16, which should be sufficient..... Have to look into this again ....

Offline Leartin at

  • Devotee
  • *
  • Posts: 1269
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Draw_as_ding causing missing pixels
« Reply #5 on: January 19, 2018, 09:41:22 AM »
No, it's always one pixel wide, no matter which zoom. Since pixels of the image become 2x2 pixel chunks when zoomed in, only half of them is missing.



It was this which convinced me to give up looking for fault in my graphic, and I thought I'd note it since it might limit where the bug could be (pixels exist, just not drawn and are not two pixels in zoom mode)

Can't currently tell if fast forward changes anything, since I don't have Simutrans available on this machine.
EDIT: Indeed, fast forward cures the issue.
« Last Edit: January 19, 2018, 12:35:10 PM by Leartin »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: Draw_as_ding causing missing pixels
« Reply #6 on: January 19, 2018, 10:08:06 AM »
I suppose it looks correct in fast-forward, found a spot, where an addition +1 would cure this bug. I have to write a test program to see that this wll not introduce glitches somewhere else.

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4601
  • Languages: EN, DE, AT
Re: Draw_as_ding causing missing pixels
« Reply #7 on: January 21, 2018, 10:14:51 AM »
This should be fixed with r8373. There are still pixels when zooming in / out. The executable in this thread: https://forum.simutrans.com/index.php?topic=17848 should not show these errors.

Offline Leartin at

  • Devotee
  • *
  • Posts: 1269
  • PAK-DEV P192C
  • Languages: DE, EN
Re: Draw_as_ding causing missing pixels
« Reply #8 on: January 21, 2018, 10:50:46 AM »
Thank you.