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

Add support for custom mesh normals #15

Open
Lamoot opened this issue Apr 13, 2022 · 2 comments
Open

Add support for custom mesh normals #15

Lamoot opened this issue Apr 13, 2022 · 2 comments

Comments

@Lamoot
Copy link

Lamoot commented Apr 13, 2022

Editing mesh normals is a common approach to adjust the model's shading and is useful for various visual tricks. http://wiki.polycount.com/wiki/Foliage#Vertex_Normals
https://us.v-cdn.net/5021068/uploads/editor/po/l7sdewuycxv7.jpg

Currently the exporter writes default vertex normals but not the "split normals" as they are called in Blender. The FBX and GLTF exporters support this and can be explored to find out the method they used.

@Lamoot
Copy link
Author

Lamoot commented Nov 5, 2022

From my initial research, the custom split normals are found in meshe's loops rather than vertices. I'm exploring other exporters how they do this, but for now it looks there isn't an equivalent of e.g. vertices[0].custom_normals to vertices[0].normals as I hoped there would be.

@Lamoot
Copy link
Author

Lamoot commented Dec 22, 2022

dae_normals

Editing vertex normals manually in the exported. dae file shows custom normals correctly in OpenMW. At least that part works reliably and the only focus is on the exporter.

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

1 participant