Blender Git Loki

Git Commits -> Revision 8b93265

Revision 8b93265 by Hans Goudey (master)
August 2, 2021, 17:47 (GMT)
Mesh: Tag normals dirty instead of calculating

Because mesh vertex and face normals are just derived data, they can
be calculated lazily instead of eagerly. Often normal calculation is
a relatively expensive task, and the calculation is often redundant
if the mesh is deformed afterwards anyway.

Instead, normals should be calculated only when they are needed. This
commit moves in that direction by adding a new function to tag a mesh's
normals dirty and replacing normal calculation with it in some places.

Differential Revision: https://developer.blender.org/D12107

Commit Details:

Full Hash: 8b93265c19feeed2b758046359ac102a1f21278a
Parent Commit: a2203a2
Lines Changed: +16, -10

9 Modified Paths:

/source/blender/blenkernel/BKE_mesh.h (+1, -0) (Diff)
/source/blender/blenkernel/intern/mesh_normals.cc (+6, -0) (Diff)
/source/blender/blenkernel/intern/mesh_remesh_voxel.cc (+1, -1) (Diff)
/source/blender/blenkernel/intern/volume_to_mesh.cc (+1, -1) (Diff)
/source/blender/editors/object/object_remesh.cc (+2, -1) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_convex_hull.cc (+1, -1) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_mesh_primitive_cone.cc (+2, -4) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_mesh_subdivide.cc (+1, -1) (Diff)
/source/blender/nodes/geometry/nodes/node_geo_subdivision_surface.cc (+1, -1) (Diff)
Tehnyt: Miika HämäläinenViimeksi päivitetty: 07.11.2014 14:18MiikaH:n Sivut a.k.a. MiikaHweb | 2003-2021