Integrate & Improve FlexiCubes

Also updated the default .mtl file settings
This commit is contained in:
MrForExample
2024-04-12 16:49:42 +02:00
parent 086567f3e9
commit 85a083d87c
665 changed files with 1209 additions and 408 deletions
+1 -3
View File
@@ -151,14 +151,12 @@ class OrbitCamera:
def calculate_fovX(H, W, fovy):
return 2 * np.arctan(np.tan(fovy / 2) * W / H)
def get_projection_matrix(znear, zfar, fovX, fovY):
def get_projection_matrix(znear, zfar, fovX, fovY, z_sign=1.0):
tanHalfFovY = math.tan((fovY / 2))
tanHalfFovX = math.tan((fovX / 2))
P = torch.zeros(4, 4)
z_sign = 1.0
P[0, 0] = 1 / tanHalfFovX
P[1, 1] = 1 / tanHalfFovY
P[3, 2] = z_sign