trimesh icon indicating copy to clipboard operation
trimesh copied to clipboard

OBJ Export Does Not Include Transparency

Open fishbotics opened this issue 3 years ago • 1 comments

Hi all,

I'm trying to save a transparent obj (transparency is set as part of face colors), but it looks like the obj saver only saves the first three numbers (i.e. not the transparency).

Is there a reason for this? https://github.com/mikedh/trimesh/blob/main/trimesh/exchange/obj.py#L836

Thanks!

fishbotics avatar Sep 09 '22 00:09 fishbotics

Hey, yeah I was probably worried about breaking someone's importers as it's not defined all that well: paulbourke.net/dataformats/obj/colour.html

Happy to take PR's! Maybe the ideal behavior is:

  • if alpha is always 255 skip exporting
  • if alpha is defined and isn't just always fully opaque, include it in whatever format meshlab accepts?

mikedh avatar Sep 15 '22 22:09 mikedh