How Blender currently handles normals in the Alembic import/export causes various issues and confusion. Examples of previous issues are {T56792}, {T69182}, and {T71130}. The goal of this design task is to document the current behaviour, describe issues, and propose a new approach.
## Current behaviour
### Current behaviour on export:
- Exporting normals can be globally turned off by an exporter option.
- Per mesh
- Auto Smooth is turned on → **loop** normals are exported.
- One or more polys are marked smooth → **loop** normals are exported.
- Otherwise, **vertex** normals are exported.
### Current behaviour on import:
An Alembic mesh can contain various kinds of normals, but only one at a time. So it only contains loop normals, or vertex normals (or other normals that Blender completely ignores).
- The Alembic mesh contains **vertex** normals → mark mesh as smooth.
- The Alembic mesh contains **loop** normals → use as custom loop normals, and enble Auto Smooth to have Blender actually use them.
- The Alembic mesh contains **no** normals → mark mesh as flat.
## Issues with the Current Behaviour
The current behaviour is hard to handle, mostly due to the fairly hidden and unintuitive use of the Auto Smooth checkbox. Furthermore, the handling of absent normals differs between Blender and other software; for example, [the Alembic plugin for Maya](https://github.com/alembic/alembic/blob/8641f34/maya/AbcExport/MayaMeshWriter.cpp#L659) assumes "no normals" means "smooth shaded", whereas Blender does the opposite.
Exporting normals can also [have a significant effect on the file size](https://groups.google.com/forum/#!msg/alembic-discussion/xmP2QMlIWKM/-chYFSPWU_UJ). Even though Alembic is not aiming to be the smallest file format ever, it's still beneficial when Blender avoids producing overly large files when this can be avoided. I'm assuming that smooth shading is more common than flat shading.
## Proposed Behaviour
The proposed behaviour aims to be easier to understand, produce smaller files in general cases, and be more compatible with other DCC suites.
### Proposed behaviour on export:
- Exporting normals can be globally turned off by an exporter option.
- Per mesh
- Custom loop normals are defined → **loop** normals are exported.
- One or more polys are marked flat → **loop** normals are exported.
- Otherwise, **no** normals are exported.
### Proposed behaviour on import:
An Alembic mesh can contain various kinds of normals, but only one at a time. So it only contains loop normals, or vertex normals (or other normals that Blender completely ignores).
- The Alembic mesh contains **loop** normals → use as custom loop normals, and enble Auto Smooth to have Blender actually use them.
- The Alembic mesh contains **vertex** normals → convert to loop normals, and handle as above.
- The Alembic mesh contains **no** normals → mark mesh as **smooth**.
### Changes & Issues
The major changes in behaviour are:
- "No normals" used to be interpreted as "flat", and I propose to change this to "smooth". This of course is a backward-incompatible change.
- Assuming smooth shading is more common (it is in exporting animated characters), exporting will be faster and use less disk space.
- Vertex normals are never written to Alembic any more.
## To Be Discusses
Please let me know what you think of this proposal, mostly whether this is indeed as nice as I think it is (I think it's rather splendid) or whether there are downsides that I haven't seen/described yet.