0
$\begingroup$

I'm fairly new to Blender and 3D modelling in general. I segmented 4 different structures from a CT scan, three lymph nodes and the the surrounding skin surface. I imported these models into Blender and applied some remeshing and smoothing.
After that, I'm exporting the models as .ply files and reading them inside my OpenGL program. I implemented my own PLY-parser which seems to work perfectly fine for the three lymph nodes, however the vertex order of the skin seems to be totally messed up.

I couldn't find any errors in my code and I'm pretty sure there is something wrong before exporting the skin model from Blender.

Any ideas what could be different for the skin model and the lymph nodes??

lymph nodes skin model

These three are images of different draw modes in OpenGL (Points, Lines and Triangles):

points draw modes lines draw modes triangles draw modes

$\endgroup$
  • $\begingroup$ It's probably your code for reading; As I've never used that file format I can't tell you for sure, but it should work fine. Which means this question is off topic, because it's either a bug report or totally unrelated to Blender. $\endgroup$ – someonewithpc Oct 9 '14 at 14:58
  • $\begingroup$ Hm, I'm actually pretty sure my code is fine, since the vertices are read in the order they appear in the .ply file. Furthermore, the three other objects are read with the same code and they are rendered correctly. So there is no possibility to have influence in which order the vertices are written to the .ply file? $\endgroup$ – Schnigges Oct 9 '14 at 20:27
  • $\begingroup$ Not really, there isn't. $\endgroup$ – someonewithpc Oct 9 '14 at 20:29
  • $\begingroup$ strange, because in my std::vector, I definitely have the correct vertex positions. I'm using the exact same OpenGL code for rendering the skin and the other three objects seen in the first image which are rendered just fine. $\endgroup$ – Schnigges Oct 9 '14 at 21:00
  • 2
    $\begingroup$ It could be that the normals for some triangles are facing the wrong way. If you had BackFace-Culling disabled in Blender you may not have noticed that many of the triangles are facing the wrong direction because both sides end up being displayed so the model always looks correct even when there are errors. Using the Normals->Recalculate tool under Shading/UV's with all faces selected should align them all to the same direction. I prefer to work with back face culling enabled so errors like this are immediately visible. $\endgroup$ – MarcClintDion Oct 10 '14 at 7:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.