Italia
Joined: Dec 21, 2020
Post Count: 3
Status:
Offline
Color handling in obj files
Importing obj files with colors on vertex breaks import wizard. Is it planned to fix this issue? specification says: If a vertex line contains 3 values then they are interpretted as (x,y,z), if there are 4 values then they correspond to (x,y,z,w), if there are 6 values then they correspond to (x,y,z,r,g,b)
Basic fix could be to ignore last 3 values in case of a six values line. Obviously the best would be to handle RGB colors.
France
Joined: Nov 7, 2005
Post Count: 9420
Status:
Offline
Re: Color handling in obj files
I wonder where you found these specifications. The ones I have used for years don't mention this feature.
----------------------------------------
Emmanuel Puybaret, Sweet Home 3D creator
As a programmer I think it's really easy to implement the first workaround... When parsing a 'v' record after splitting the line by commas, if more than 3 values are found ignore them intead of return an error