blender-ply-import icon indicating copy to clipboard operation
blender-ply-import copied to clipboard

Unsure how to use the Addon

Open jeongjoonpark opened this issue 6 years ago • 5 comments

Hi Paul, very nice work on writing the importer -- I was frustrated the blender native ply importer was ignoring my per-vertex normals.

However, since I'm quite new to Blender, I am exactly sure how to use this program. Could you maybe provide steps to install and use this addon in Blender?

Thank you very much!

jeongjoonpark avatar Feb 19 '19 00:02 jeongjoonpark

Hi Paul, I figured that it works on command line, not dedicated UI. I was able to import a ply file.

However, it seems like, after importing, Blender is using per-face normal, ignoring my per-vertex normal (image below shows non-smooth normals). Do you know how to force blender the use the per-vertex normal, and how do I make sure that the Blender has indeed successfully loaded my vertex normals?

Thank you very much.

image

jeongjoonpark avatar Feb 19 '19 00:02 jeongjoonpark

I figured it out. It seems like we're using a different Blender version?

At L66 of mesh_readply.py file I placed the following code: ` if 'vertex_normals' in p:

n = p['normals']

for i, v in enumerate(mesh.vertices):

    v.normal = -Vector((n[3*i+0], n[3*i+1], n[3*i+2]))

`

jeongjoonpark avatar Feb 19 '19 01:02 jeongjoonpark

I figured it out. It seems like we're using a different Blender version?

@jeongjoonpark what blender version are you using?

paulmelis avatar Feb 28 '19 09:02 paulmelis

@paulmelis using Blender 2.78c

jeongjoonpark avatar Feb 28 '19 16:02 jeongjoonpark

v.normal = -Vector((n[3*i+0], n[3*i+1], n[3*i+2]))

The fact that you need to use the inverted normal seems to suggest your 3D model is using a coordinate system with a different handedness from Blender. Does your data come from a left-handed coordinate system?

If you attach the model you're trying to import I can test it myself with 2.79

paulmelis avatar Mar 07 '19 10:03 paulmelis