TF 2.0 is out! Get hands-on practice at TF World, Oct 28-31. Use code TF20 for 20% off select passes. Register now


Computes vertex normals from a mesh.


Defined in geometry/representation/mesh/

This function computes vertex normals as the weighted sum of the adjacent face normals, where the weights correspond to the area of each face. This function supports planar convex polygon faces. For non-triangular meshes, this function converts them into triangular meshes to calculate vertex normals.


In the following, A1 to An are optional batch dimensions.


  • vertices: A tensor of shape [A1, ..., An, V, 3], where V is the number of vertices.
  • indices: A tensor of shape [A1, ..., An, F, M], where F is the number of faces and M is the number of vertices per face.
  • clockwise: Winding order to determine front-facing faces. The order of vertices should be either clockwise or counterclockwise.
  • name: A name for this op. Defaults to "normals_vertex_normals".


A tensor of shape [A1, ..., An, V, 3] containing vertex normals. If vertices and indices have different batch dimensions, this function broadcasts them into the same batch dimensions and the output batch dimensions are the broadcasted.


  • ValueError: If the shape of vertices, indices is not supported.