Mesh_simplification_python icon indicating copy to clipboard operation
Mesh_simplification_python copied to clipboard

How to preserve color?

Open chenjianyi opened this issue 3 years ago • 3 comments

First, thanks for your pleasant work! The format of input obj file for me is as follow,

v x1 y1 z1 r1 g1 b1 v x2 y2 z2 r2 g2 b2 ... f f1 f2 f3 ...

In the v flag for every line, there is color item (r, g, b). I run your code, and I found color item disappeared in output file. How should I compute color value? I think it's better not change file format if there is no much extra computational burden. Thank you!

chenjianyi avatar Mar 09 '21 07:03 chenjianyi

Hi, thanks for your question. Haha, I didn't consider color in this work. I can check the code. You can also look at it because it mainly does some array computation. I remember I only preserve the location info of vertices when loading the obj file. You can try preserving them all.

AntonotnaWang avatar Mar 09 '21 09:03 AntonotnaWang

Haha, Thanks for your reply. I'll study the method and check the code, too.

chenjianyi avatar Mar 09 '21 10:03 chenjianyi

Haha, Thanks for your reply. I'll study the method and check the code, too.

hi! Do you have methods to preserve color?

1234269 avatar Mar 03 '22 08:03 1234269