Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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?

like image 764
BIOStheZerg Avatar asked Jan 01 '26 04:01

BIOStheZerg


1 Answers

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...

like image 81
BIOStheZerg Avatar answered Jan 03 '26 19:01

BIOStheZerg



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!