2

I can't seem to find a simple solution to this problem I'm having! I am new to Meshlab but working with .obj. I've loaded an asset from Adobe stock and I need to separate two items (a whole lime and a half lime) into two separate .obj files for use in other programs.

I can easily load the .obj and delete one of the limes, but when I export the resulting .obj won't load elsewhere with the included textures, or preview on my Mac. (before putting it through meshlab there is a low res preview of the object in finder's information window, which is pretty cool).

I read that it might have to do with filenames but mine had no spaces from the beginning and even after editing .mtl and .obj files to point at the original textures, or copying bits of those old files to the new (obj and mtl) exports from Meshlab were unsuccessful.

It seems like it should be easy to open this .obj in something (got an error when opening in Blender), delete one of the two independent / separate meshed objects, and save it without f*cking up the original file structure. My only guess after playing with the texture targeting is that the starting coordinates of the mesh no longer match with how the textures were laid out since the object is relatively half the size it was before? Help?

enter image description here

Here is a .zip of the Adobe Stock asset I am referencing: Link

Edric
  • 24,639
  • 13
  • 81
  • 91
pierrejordan
  • 21
  • 1
  • 2

1 Answers1

1

The problem is the way in which meshlab combines the diffuse color of the face (given by the material), with the color of the diffuse texture given by the file texturelime_124/lime_124_baseColor.png. In short, this combination is done by a multiplication that try to combine the luminances, but the diffuse color per face is 0 0 0 so the texture colors are not seen.

enter image description here

Try this. Edit the file lime_124.mtl and change the line

Kd 0 0 0

with

Kd 1 1 1

Now, load the file in meshlab, delete any of the limes and save as one_lime.obj

one_lime

Also it is convenient to execute filter Turn into a Pure Triangular Mesh just after loading, because not every filter/programs will support quad faces as this model has.

Rockcat
  • 3,002
  • 2
  • 14
  • 28
  • First of all, thank you for your help! Were you able to execute this process successfully? After running through the process once myself it appears I am one step closer (the lime now appears green and dark green, but is still missing texture and the colorful part of the lime texture). Here is my new result (as rpeviewed in finder): https://www.dropbox.com/s/ttp3dwkrnrdjrwz/Screen%20Shot%202019-12-16%20at%2011.34.13%20AM.png?dl=0 – pierrejordan Dec 16 '19 at 19:34
  • Yes, I did. I saved the halfLime.obj file and loaded back again, to show the screen in the second image. I was on a Linux machine. I will be unable to see your file until tomorrow, but I will check it. – Rockcat Dec 16 '19 at 20:25
  • But, if you load the halfLime.obj back in meshlab is seen correct? Can you open halfLime.obj with blender? I am not sure if the problem is in your version of meshlab or in finder. Also, it is very strange that you see two tones of green in finder, because there is no color per face. Finder has to be reading the green from the texture someway. – Rockcat Dec 17 '19 at 22:11
  • Thank you for your help! I was able to find a solution by remapping the textures myself in the other program I am using to render. Unfortunately still haven't figured out how to open a textured .obj in meshlab and then export it maintaining the texture maps, it seems to strip the links merely by passing the obj through the program even if I have "TextureCoord" selected on export. Not the biggest problem in the world but certainly frustrating to have to remap every time I make an edit to the mesh. – pierrejordan Dec 18 '19 at 16:52
  • If you lose every texture when saving to .obj, you should file an issue in https://github.com/cnr-isti-vclab/meshlab/issues – Rockcat Dec 18 '19 at 17:24