I use openGl with Assimp and Qt libraries.
When I import a 3D model, I get strange textures. The coordinates of UV textures are correct, but there is a perspective effect on the textures visible on the surfaces.
This reminds me of the problem of the quadrilateral Interpolation http://reedbeta.com/blog/quadrilateral-interpolation-part-1/
Is this the case? How can I solve this texture application problem?
With my thanks,
Are you trying to map a rectangular region of texture to a non-rectangular surface? If you want a projective transformation, you’ll need to provide 3- or 4-dimensional texture coordinates (if you’re using fixed-function texturing, you need to use 4-dimensional coordinates, with the third coordinate ignored; if you’re using a fragment shader, you only need 3 dimensions; either way, you have to supply the appropriate divisor). If you want a bilinear transformation, you’ll have to write a shader to do that. It’s much like a projective transformation, but only one of the texture coordinates is divided by the interpolated divisor.
If both the texture region and the surface are rectangular, then the shaders are doing something odd like performing projective division in the vertex shader or declaring the texture coordinates with the [var]noperspective[/var] qualifier.
I found the solution to my problem ! It was necessary to apply the correction explained here: http://reedbeta.com/blog/quadrilateral-interpolation-part-1/
Thank you all!