Importing custom texture in PNG format into MeshLab along with OBJ model

BIOStheZerg picture BIOStheZerg · Mar 24, 2015 · Viewed 7.1k times · Source

I have an OBJ model (with texture UV coordinates for triangle vertices) and a texture as an PNG file. I can import the model, but the texture (each triangle has a half of a 10x10 px patch, and they are stored in the file vertically) can't be imported. When running Filters->Texture->Set Texture, I'm given the following:

There are too many textures (1), reducing max texture size from 16384 to 8192
Loading textures
Texture[ 0 ] = 'carMesh_mesh.png' ( 10 x 54020 ) -> ( 16 x 8192 )

How can I import such a texture file?

Answer

BIOStheZerg picture BIOStheZerg · Mar 25, 2015

In the end, I found a solution myself. There were actually two problems. The simpler one (why wasn't the texture loaded automatically) was in a wrong call in the material file. The larger problem is that Meshlab couldn't load such long bitmap (50k px), so I had to change my Matlab script generating it, to tile the triangles in multiple columns instead of just one super-long...