Qestion regarding lightmap uv boarder edge problem

Hey all,
I am playing around with light maps and ran across an issue I was not expecting. When viewing the object from close up things look great. But when I view it from further away I begin to see the cracks between the uvs seams. I am assuming it has to do with texture filtering. But I disabled both mip-mapping as well as tried different texture sampling modes but no luck. I am hoping its an easy fix. Any ideas?

Example:

pinging @sebavan

Could you share a repro in the playground? it really seems to come from filtering.

I could try to have a quick look.

Here ya go. Just zoom in and out and you will see what we are observing.

https://www.babylonjs-playground.com/#8LFTCH#267

Hey all, just thought I would follow up to see if the playground helped clarify the problem and I suppose more importantly if it shed light on how I might be able to address it?

You can indeed improve a little the display by changing the sampling method, but artifacts remain if you zoom out too much:

https://www.babylonjs-playground.com/#8LFTCH#275

I think it’s more a problem of uv coordinates of the mesh: they should be setup so that to have a little “margin” in the texture and not be too close of the black area.

Great thanks, we will take a closer look at the UV’s and see how that goes.

Yup looking into it might definitely be related to the uv layout.

Also to be neutral you might want to change the background to white as they are shadows and not lights:

image

1 Like