MouseEvent callback lag with mesh selection

@slin used the u = 10, v = 10 scaling values you pointed out, thanks! I get now why you chose those values; I originally used the width and height each square divided by the length of the square images, 819 pixels (~ 7.6 for u and v).

Okay got working now, sort of.

It’s got these weird artifacts now that shows the seams of the grid. I’m thinking I’ll try calculating the UV’s as outlined here:

and maybe that will fix it?

Hi @arcman7

Yes I saw the seams between the tile edges. I guess it is caused by how you split your original texture image. For example, you have two adjacent tiles in the same row. For these two tiles to be seamless, right side of the left tile and the left side of the right tile need to have the same pixels values. This requires you to split the terrain texture image like this: e.g. the image width is 200 pixels, the first tile image needs to have pixels 0 - 99. And the second tile image need to have pixels index 99 -198 instead of 100 - 199. This is my guess without investigation.

I tried that using an overlap of 15 px, but the artifact still persists, it must be something to do with how I’m creating the grid partitions…

@slin Hey, so I wrote a script to automate splitting up the model and it’s image into an N x M grid.

The stitching artifacts still persist! But I think it’s due to a slightly different reason now: