1

Topic: buggy borders

hello, i have a tileset for my map, but it gets postponed at the borders of 1 tile. i didnt found any solution for many month, hearded stuff about borderfix and dilate, they seem to do something useful but it still looks crappy and not original. i already had a thread about that but it got closed. im tired now of trying to help teeworlds with creating new content and not getting any help, even getting offended by closing topics. this is probably my last try to fix this problem till sunday, after that i wont have time for a long period again. i uploaded a part of my tileset here, try to fix it so that it wouldnt get posponed in teeworlds, i already tried everything.
http://imageshack.us/photo/my-images/54 … nung1.png/

2

Re: buggy borders

I'm not seeing anything. Are you Regate?

3

Re: buggy borders

search for tileset borderfix and dilate

http://www.teeworlds.com/forum/viewtopic.php?id=4792
http://landil.posterous.com/forum-gossi … rfixexe-ii

Antoine de Saint Exupéry: It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away.
Besides -  I am the gfx guy!

4

Re: buggy borders

Broken you need to klick on the picture.

as i said, i tried multiple versions of dilate and borderfix for half a year now, noone worked for me.
your links explain it, but i know the problem. i just need a working version. i uploaded a part of my tileset, it shouldnt need you a min to look if your version works on this.

5

Re: buggy borders

http://imageshack.us/a/img542/5238/zeichnung1.png

What's wrong with this image?

Antoine de Saint Exupéry: It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away.
Besides -  I am the gfx guy!

6 (edited by Lachn007 2013-04-03 16:11:37)

Re: buggy borders

it has no face
http://i.imgur.com/UBeVjYx.png

0.0
MISSINGNO. APPEARED

7

Re: buggy borders

http://imageshack.us/scaled/landing/823/image1tt.png
Maybe you should stay with your graphics in the 64px grid?

Antoine de Saint Exupéry: It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away.
Besides -  I am the gfx guy!

8

Re: buggy borders

Broken, im regate smile

9 (edited by Arrob 2013-04-04 00:28:20)

Re: buggy borders

Landil wrote:

What's wrong with this image?

Nothing, the .svg and the .png are 100% what i want them to be.
the prob is that when i load this image into the editor and try to place them on the map the get buggy at the borders.

Landil wrote:

Maybe you should stay with your graphics in the 64px grid?

thats worth a try, althogh im quite sure that wouldnt solve it since it still passes one border. i would need to get every graphic into a 64*64 square, and thats too restrictive.



Just that you know, graphics that passes the borders straight and orthogonal seem to work fine, you can have a square thats bigger than one tile (64*64) without any bugs.

10

Re: buggy borders

Im currently making new tileset on a 1024px x 1024px grid, where each tileset sized 64px x 64px and I have the same bug.

I fixed it (not really fixed, it just avoid some noises at the border but its not perfect) using tileset_borderfix binairies, you can get it by compiling the source tree.

Just one question, why teeworlds can't handle the border correctly, is there a technical challenge or just some work to do to improve the rendering ?

11

Re: buggy borders

needs wrote:

Im currently making new tileset on a 1024px x 1024px grid, where each tileset sized 64px x 64px and I have the same bug.

I fixed it (not really fixed, it just avoid some noises at the border but its not perfect) using tileset_borderfix binairies, you can get it by compiling the source tree.

Just one question, why teeworlds can't handle the border correctly, is there a technical challenge or just some work to do to improve the rendering ?

there will be/is  another "borderfix" which is called border_add. Then you simply need a 960px x 960px tileset and will generate a 1024x1024 one with the fixed borders. but even now there should not be any problem if you use tileset_borderFIX

the problem indeed is a technical limitation which cant handle the cutting out correctly.

Antoine de Saint Exupéry: It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away.
Besides -  I am the gfx guy!

12

Re: buggy borders

Landil wrote:

but even now there should not be any problem if you use tileset_borderFIX

If that is true and your borderfix is working correctly with my triangle i would be very happy if i can send you my whole tileset and you give me back the fixed version. as i said, i tried multiple versions of borderfix and dilate over a very long period, and none of them worked.

13

Re: buggy borders

You should use the border ADD operation imho
Scale down the image with some graphics editing program down to 960x960.
They have a better images scaling algorithm than borderfix, which atm is more or less just shifting around some pixels and adds the needed 1px border.
Though the result wont be 100% pixel as the gpu doesnt know that we only want 64x64 tiles and uses neighboured pixel for interpolation (could be solved with 2d texture arrays but this needs opengl 3.x ..)

14 (edited by 2013-04-07 13:36:26)

Re: buggy borders

think i wont understand the problem with getting a 1024*1024 perfect .png in the same quality into teeworlds.
but im quite sure one day this problem is solved, and decided to wait for this day instead of doing a quality tradoff that does not satisfy me.

the reason for this is that i realized that the versions of borderfix and dilate i got were likely not buggy. they were working absolutely as they used to work. what i gopt from both was a tileset in teeworlds were shifted borders were corrected a bit and some interpolation. but for my tileset this did look so ugly that its definitly not acceptable. i dont want to say that its bad in general or anyone of you is content with less quality. im sure its just the nature of my very specific tileset that makes every single pixel thats not on his correct position visible.

15

Re: buggy borders

Arrob wrote:

think i wont understand the problem with getting a 1024*1024 perfect .png in the same quality into teeworlds.
but im quite sure one day this problem is solved, and decided to wait for this day instead of doing a quality tradoff that does not satisfy me.

the reason for this is that i realized that the versions of borderfix and dilate i got were likely not buggy. they were working absolutely as they used to work. what i gopt from both was a tileset in teeworlds were shifted borders were corrected a bit and some interpolation. but for my tileset this did look so ugly that its definitly not acceptable. i dont want to say that its bad in general or anyone of you is content with less quality. im sure its just the nature of my very specific tileset that makes every single pixel thats not on his correct position visible.

indeed you should try border_add then. Render your tileset to 960x960 (which means a tile is 60x60 px) and it will create a working 1024x1024 tileset. Don't forget to dilate then.

Antoine de Saint Exupéry: It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away.
Besides -  I am the gfx guy!

16 (edited by Arrob 2013-04-08 07:48:09)

Re: buggy borders

ok ill try try it out, although i need a download link or some way to get it. all three results of teeworlds search lead to this topic, and even google shows me zero results for "teeworlds border_add" (without quotations marks). i wouldnt believe that its existing if you wouldnt told me. although im unsure with BeaR's comment since it says its not 100% precise too. i dont see problems with e.g. trees there, since its just natural to have varieties there, but a straight line (from the triangle) is a straight line (yea), you really see even most minimal diferences from the one and only form that a straight line can have. But as i said ill try it if you can tell me how to get border_add.

17

Re: buggy borders

I compiled the lastest version: https://downloads.teeworlds.com/solidfi … rderop.exe

For usage: Open cmd and type in 'tileset_borderop.exe ADD tileset.png'

18

Re: buggy borders

BeaR wrote:

I compiled the lastest version: https://downloads.teeworlds.com/solidfi … rderop.exe

For usage: Open cmd and type in 'tileset_borderop.exe ADD tileset.png'

thanks bear!

Antoine de Saint Exupéry: It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away.
Besides -  I am the gfx guy!

19

Re: buggy borders

thanks for download and instruction.
just tested it. the result i clearly better than the normal fix, though you still the the bugs in zoom. in normal teeworlds range those are less, but on my fullhd display sadly still visible. dont want to hold the map back whole time though. need to think if i want find another tileset for this use or just use it as it is and may replace both if i can get my tileset 100% as it is. ill let you know my decision.

20

Re: buggy borders

can you send a screenshot with the bug, please?

Antoine de Saint Exupéry: It seems that perfection is reached not when there is nothing left to add, but when there is nothing left to take away.
Besides -  I am the gfx guy!

21

Re: buggy borders

https://downloads.teeworlds.com/solidfi … pload1.png
max zoom in editor, largest triangle is about two tiles high. border_add and dilate. as you said i may improve it more if dont cross as much borders, but it'll need me some work to do that, currently its just three points at the right position with a big and black colored edge. which is how a triangle works but to stay in the borders will cost some time.

22

Re: buggy borders

heh, that's bit too ugly for magnification if im honest..

I'm going to take a look at the code again cause this looks wrong to me /:

23 (edited by needs 2013-04-09 20:44:16)

Re: buggy borders

Okay, just to be sure :

  • If I use tileset_borderfix, I just need to apply it and its done.

  • If I use tileset_borderadd on a 960x960 tileset, I must use after 'dilate' and its done.

I'm right ? Or I need to use 'dilate' for both ?

24

Re: buggy borders

you need to dilate both if i understood right. i tested both without dilate before and as far as i remember best results were after dilating (both).

25

Re: buggy borders

Dilate should be applied at all teegraphics as it sets the correct color for the transparent pixels.


Did some tweaking/testing but still a bit work todo (estimate mipmap level etc.)

Left 3 Triangles are with 1px border(modified border_add) at the 3 highest zoom levels
Right 3 Triangles with 2px border (bit different settings than with 1 px border ofc)
http://i.solidfiles.net/59ad9e399f.png

Looks better than at current client imho