<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-2">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Arial, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Dear fieldtrip Team
<div><br>
</div>
<div>I am a new user of fieldtriptoolbox and have followed your tutorial on how to localize electrodes using 3D scanner, specifically using structure sensor by Occipital. I have encountered two issues and I adress each of these in separate e-mails. I used matlab
2020a.</div>
<div><br>
</div>
<div>When scanner app by Occipital on iPad is used in such way, that after scanning object, user does not switch to color-view of model but emails himself/herself a texture-less model, the .obj file generated has faces written with double slashes (as if texture
vertices [vt] were expected in a file, but they are inexistent; only geometric vertices [v] and vertex normals [vn] are existent):</div>
<div>f 81183//81183 85716//85716 81187//81187</div>
<div>f 85412//85412 85716//85716 81183//81183</div>
<div>f 81387//81387 85745//85745 85429//85429</div>
<div>f 81189//81189 81190//81190 81191//81191</div>
<div><br>
</div>
<div>This results in your ft_read_headshape error-lessly and warning-lessly producing struct with emtpy data fields, that is I receive:</div>
<div>pos: [0x3 double]</div>
<div>tri: [0x3 double]</div>
<div><br>
</div>
<div>The issue here is that, matlab produces no warning or error but produces, what seems to be, faulty result. That seems to me to be primarily scanner app bug, however I suggest your toolbox at least warn about the issue, in case it happens to stumble upon
such odd .obj file - which in my case seems to be always when I send myself model straight away after scanning, instead of firstly switching into colour-view tab.</div>
<div><br>
</div>
<div>What resolved this for me, was changing read_obj_new in a way that it possesses also:</div>
<div>f = sscanf(face_lines{i}, 'f %d//%d %d//%d %d//%d');</div>
<div>Having changed it that way, the file is read correctly, obviously without texture (since there is none associated with the file).</div>
<div><br>
</div>
<div>What I have also found useful in that case, is exporting that .obj as .ply file in some program (I used meshlab).</div>
<div>I am not reporting that as a bug since it is associated with, what seems to be, flawed behaviour of different app.</div>
<div><br>
</div>
<div>Regards</div>
Piotr Gawroński<br>
</div>
</body>
</html>