| 52 | |
| 53 | |
| 54 | def subsample_to_nr_strands(self, nr_strands_to_select): |
| 55 | nr_strands_total = self.positions.shape[0] |
| 56 | indices_strands = np.random.randint(nr_strands_total, size=nr_strands_to_select) |
| 57 | |
| 58 | #new positions |
| 59 | self.positions = self.positions[indices_strands,:,:] |
| 60 | self.root_normal = self.root_normal[indices_strands,:] |
| 61 | self.root_uv = self.root_uv[indices_strands,:] |
| 62 | self.root_position = self.root_position[indices_strands,:] |
| 63 | |
| 64 | |
| 65 | def compute_tbn(self, mesh_verts, mesh_uv, mesh_faces, mesh_v_tangents, mesh_v_bitangents, mesh_v_normals): |