This commit is contained in:
Akko
2023-05-15 16:23:02 +02:00
63 changed files with 1067 additions and 948 deletions

View File

@@ -586,13 +586,17 @@ def obj_to_scene(filename):
"""
Load from a obj file and convert to PyTorch tensors.
"""
f = open(filename)
lines = f.readlines()
with open(filename, 'r') as f:
lines = f.readlines()
data_lines = []
vertices = []
faces = []
for line in lines:
l=line.split()
# Ignore empty lines
if not l:
continue
#vertex
if(l[0] == "v"):
vertices.append(l)