[Question] Seemingly Incorrect UV mapping

Hello everyone, I am working on a small project and one of the tasks involves tetrahedron texturing. I am creating the tetrahedrons and their UV mapping by script and while I have no real troubles there is something strange I noticed in the Scene preview while the game is running:

2663778--187885--upload_2016-6-4_15-18-5.png

If you notice the upper left edge there seems to be a transitioning of the texture to that face, but from pure mathematical point of view that shouldn’t happen since the UV coordinates are easy to calculate and set:

Vector2 uv3a = new Vector2( 0f, 0f );
Vector2 uv1 = new Vector2( 0.5f, 0f );
Vector2 uv0 = new Vector2( 0.25f, 0.433013f );
Vector2 uv2 = new Vector2( 0.75f, 0.433013f );
Vector2 uv3b = new Vector2( 0.5f, 0.866025f );
Vector2 uv3c = new Vector2( 1f, 0f );

The texture I am using is this one (transparency intended):

Am I missing something in the setup or this is something to be expected?

You should try calculating the from the actual pixel positions in the texture rather than the expected positions. I suspect that’s where this is going wrong. Also even then if you’re texturing with out any buffers on the edge of the texture (ie: straight to transparent) I would expect to see some feathering on the edge of your triangles due to bilinear filtering and mip maps.

1 Like