-
Notifications
You must be signed in to change notification settings - Fork 142
Description
Hi,
I am trying to use redner for differential rendering from some parametric model I am building for fruits.
I need to use the mesh normals to displace the surface. So I have tried using
vertex_normals = pyredner.compute_vertex_normal(vertices,triangle_list)
But I end up with the following normals (set as colors for the mesh,displayed with trimesh):
Here is a comparison with the same mesh (modeled then saved) in blender with the normal as color for the shader:
On the left an icosphere from blender (same base as my mesh) and on the right an UV sphere.
Any idea what could be the problem ? I am just doing the following :
modifier = shape_basis @ shape_coeffs
vertices = shape_mean.clone() + modifier.view(-1, 3)
R = pyredner.gen_rotate_matrix(pose)
vertices = torch.matmul(vertices,R)
vertex_normals = pyredner.compute_vertex_normal(vertices,triangle_list)
vertices and triangles faces are the same in the redner generated normals and in the blender one.
EDIT:
However if I display the mesh with open3d with the same vertices, triangles and colors as normals I get the correct values :
Cheers
Justin