Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsure how to use the Addon #2

Open
jeongjoonpark opened this issue Feb 19, 2019 · 5 comments
Open

Unsure how to use the Addon #2

jeongjoonpark opened this issue Feb 19, 2019 · 5 comments

Comments

@jeongjoonpark
Copy link

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
Copy link
Author

jeongjoonpark commented Feb 19, 2019

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
Copy link
Author

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]))

`

@paulmelis
Copy link
Owner

paulmelis commented Feb 28, 2019

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

@jeongjoonpark what blender version are you using?

@paulmelis paulmelis reopened this Feb 28, 2019
@jeongjoonpark
Copy link
Author

@paulmelis using Blender 2.78c

@paulmelis
Copy link
Owner

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants