Download

Online

Gallery

Blog

  Index  | Recent Threads  | List Attachments  | Search
 Welcome Guest  |  Register  |  Login
Login Name  Password
 

Sweet Home 3D Forum



No member browsing this thread
Thread Status: Active
Total posts in this thread: 3
[ Jump to Last Post ]
Post new Thread
Author
Previous Thread This topic has been viewed 2762 times and has 2 replies Next Thread
Folini
Newbie



Italia
Joined: Dec 21, 2020
Post Count: 3
Status: Offline
Reply to this Post  Reply with Quote 
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.
[May 14, 2021, 10:30:55 AM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Puybaret
Expert
Member's Avatar

France
Joined: Nov 7, 2005
Post Count: 9141
Status: Offline
Reply to this Post  Reply with Quote 
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 developer
[May 14, 2021, 2:29:40 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
Folini
Newbie



Italia
Joined: Dec 21, 2020
Post Count: 3
Status: Offline
Reply to this Post  Reply with Quote 
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
[May 14, 2021, 10:00:12 PM] Show Printable Version of Post    View Member Profile    Send Private Message [Link] Report threatening or abusive post: please login first  Go to top 
[ Jump to Last Post ]
Show Printable Version of Thread  Post new Thread

    Get Sweet Home 3D at SourceForge.net. Fast, secure and Free Open Source software downloads
   
© Copyright 2006-2024 eTeks - All rights reserved