the gaps between the tiles in webGL mode
krumza

HI again.

Even in the video tutorial of isometric plugin you suggest to do 2D mode to avoid gaps between tiles.

But how to do it if the mode is webGL?

As I understand it, the reason lies in the fact that all the tiles are placed with their center at the coordinates specified for a sprite or object, but that's what happens when the length and width is an even number I don't understand - after all, the center is 1 pixel, and if the width is 265 (for example) that the idea is on the right and left should be at 128, but since the center is 1 pixel , it turns out that will 127,5 of pixels from the center?

What tiles to draw isometric for masonry, I have tried arbitrarily is to cut the diagonal, but still the gap is. Is it really unsolvable?

All 3 Comments
Gio

You can have WebGL and no gaps - however this mostly depends on your texture.

If your source texture is a power-of-2, then in WebGL mode a mip chain will be created and, depending on your zoom level, one of the lower mips will be used by your graphics card to render the terrain. 

This implies that if you have a white tile surrounded by black space in your texture, the borders of that tile at lower mip levels will be grey (because the graphics hardware blends neighbouring pixels, black + white in this case), so you will see some gaps.

There are some ways to avoid it though:

1. You can have "thick" borders, i.e. make your tiles a bit larger in your source texture. When fully zoomed in, sometimes you may end up with tiles overlapping each other by 1 or 2 pixels, but this is usually better than having gaps.

2. Do not use a power-of-2 texture. This way, no mip chain will be created.

One may look better than the other in any particular case, it's just a case of trying which one works better with your own textures.

krumza

about 2 point

- I need a multiplier of 2, because i build isometric map with zig-zag algoritm - if it works mipmap, if for example I will use k * 2(power N) ?

Gio

Mip-maps are only generated when the texture is exactly a power of 2. So for example:

256x512   ---> you get mip maps

256x768  ---> no mip maps

I think it would be useful to have a way to tell WADE that you do not want mip maps on a particular texture, even though that texture's size is a power of 2. At the moment this is not possible (not in a nice API-friendly way, anyway). I'll make a note to add this option in the future, but I'd push it back to version 4.1 as we are already changing a thousand other things for version 4.0.

Post a reply
Add Attachment
Submit Reply
Login to Reply