Reputation: 1
How can I delete all data in an obj file that isn't a specified color? I have a 3D scan of a part and I want to isolate a specific object in the scan that is red, nothing else in the scan is red. I want this operation to be completed by modifying the obj file using python, matlab, etc so it can be repeatable with more 3D scans.
Upvotes: 0
Views: 161
Reputation: 8651
You need to open the *.MTL file, and look for the material definition with diffuse color (Kd
) as 1,0,0 (red). You can afterward parse the *.OBJ file and remove all geometry definitions that don't use that material.
Upvotes: 0