|
Sweet Home 3D Forum » List all forums » » Forum: 3D models and textures » » » Thread: Color handling in obj files |
|
| Print at Dec 16, 2025, 12:46:12 PM | View all posts in this thread on one page |
| Posted by Folini at May 14, 2021, 10:30:55 AM |
|
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. |
| Posted by Puybaret at May 14, 2021, 2:29:40 PM |
|
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 |
| Posted by Folini at May 14, 2021, 10:00:12 PM |
|
Re: Color handling in obj files It's on wikipedia Also on following site you can find infos with a mention (on third link) to the citation above http://paulbourke.net/dataformats/obj/ 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 |
|
|
Current timezone is GMT Dec 16, 2025, 12:46:12 PM |