Problem with Image Repeat on Polygon

There are cases where the material direction of the polygon on an entity in Cesium appears incorrect. How is the material coordinate system (UV repeat) defined in the model, and how is the direction of the UV coordinates determined? Or are there other methods to solve the issue of incorrect texture direction?

I have written an example on the official website: the order of the four corner points of two faces is exactly the same (clockwise or counterclockwise). Based on the width and height of the face, the texture mapping repeat is calculated. The repeat on the left face is correct, but on the right face, it is incorrect.

I can’t claim to know exactly what CesiumJS does under the hood here, but I think that without specifying texture coordinates, Cesium just does it’s best to guess how to apply the texture. If you want them to be consistent, you can specify the same UVs for each polygon (sandcastle example).

Thank you so much for your answer. It has solved a problem that had been troubling me for over a year. Once again, thank you very much.

1 Like