Page MenuHome

Alembic: improved import/export of mesh normals
ClosedPublic

Authored by Sybren A. Stüvel (sybren) on Nov 5 2019, 6:20 PM.

Details

Summary

This commit implements the change in behaviour described in T71246. In
short:

For export, 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.

For import, when the Alembic mesh contains:

  • loop normals → use as custom loop normals, and enble Auto Smooth to have Blender actually use them.
  • vertex normals → convert to loop normals, and handle as above.
  • no normals → mark mesh as smooth.

This also fixes T71130: Alembic split normal export issue

Previously the mesh flag ME_AUTOSMOOTH was used in conjunction with
the poly flag ME_SMOOTH to determine whether loop normals or vertex
normals were exported. This behaviour was hard to predict for artists,
and hard to describe in the manual. Instead, Blender now only exports
loop normals, computing them if necessary. This way, the mesh in Alembic
should always have the same loop normals as in Blender.

Diff Detail

Repository
rB Blender