Using tile maps for repeating UV textures?

Hi all,



Is it possible to tile/repeat a clipped/cropped portion only of an image across a UV map in JME3?



Scaling the texture takes care of tiling, but how do I tile just a bit of the texture so I can keep all my tiles in the one .jpg image?



Apart from being easier to manage, I understood having less assets floating around improves performances; Or is it not worth bothering about, and I should just use a separate image resource for every tiled texture?



Thanks in advance for any advice offered.

Jon.

Well it is possible, but you will get a nasty shader artifact when useing textureatlas,

a solution is the use of a Texturearray, it behaves like a normal texture but with a additional coordinate to select the map that should be used.

i dont understand empire phoenix.



if you create a custom mesh in jme code you can easily use your texture atlas without any problem.

Also rendering will take only o(1) instead of o(N).

@tralala There is a known issue when computing repeating UV directly in a shader with a mod computation, there is a seam artifact appearing when the texture repeats.



I guess this could be addressed though.

Okay, got it. Thanks guys.

@nehon said:
@tralala There is a known issue when computing repeating UV directly in a shader with a mod computation, there is a seam artifact appearing when the texture repeats.

I guess this could be addressed though.


I don't think so, I fiddled much time around with this with no result at all, thats why I bumped the arraytexturestuff somewhere in to forum multiple times untill I was annoying enough so it got added to the core XD

With a own mesh, that avoids texture repeating textures in the shader this is not a problem (good thing for all those blockworlds out there)