Saturday 22 November 2014

Maya: Error reading file.

Recently while re-topoing Auyron I had some issues importing decimated ZBrush files into Maya. After a bit of digging around online I found a solution to my '// Error: line 0: Error reading file.' problem, so I thought I would share! =)

The problem is with the faulty lines of information in the file.


To start, attempt to import the obj file into Maya. You should get the error: '// Error: line 0: Error reading file.' Then open the script editor.
Take note of 1 specific line in the log: '// Error: line 0: OBJ file line 105719: index out of range for face creation. // 
This tells us that the error is in line 105719 of the file.

Next step is to open the obj file in textedit or notepad and find the offending line.

As you can see, two out of the three numbers (which are coordinates for a point in the mesh) are the same. These can NOT have the same value and this is what causes the error. To fix this, change the value by adding +1 or -1. (just enough to fix the issue but not a visual difference)

Then save the file and import into Maya!

Keep in mind you may have to do this multiple times as I had to in the example (the line just under that had the same issue). Often the problem lines are close to each other so I just skim the numbers to pick up any other issues before I save.

No comments:

Post a Comment