Skip to content

Commit

Permalink
Fix UVMap reset to 0-1 for tile primitives
Browse files Browse the repository at this point in the history
  • Loading branch information
julienduroure committed Nov 1, 2023
1 parent 3919ac6 commit 36d5b94
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -531,11 +531,13 @@ def manage_material_info(self):
else:
indices = np.where((self.dots[uvmap_name + '0'] >= u) & (self.dots[uvmap_name + '0'] <= (u + 1)) & (self.dots[uvmap_name + '1'] <= (1-v) ) & (self.dots[uvmap_name + '1'] >= 1-(v + 1)))[0]

#TODOUDIM: reset UVMap to 0-1 is wrong here

# Reset UVMap to 0-1
# Reset UVMap to 0-1 : reset to Blener UVMAP => slide to 0-1 => go to glTF UVMap
self.dots[uvmap_name + '1'][indices] -= 1
self.dots[uvmap_name + '1'][indices] *= -1
self.dots[uvmap_name + '0'][indices] -= u
self.dots[uvmap_name + '1'][indices] -= v
self.dots[uvmap_name + '1'][indices] *= -1
self.dots[uvmap_name + '1'][indices] += 1

# Now, get every triangle, and check that it belongs to this tile
# Assume that we can check only the first vertex of each triangle (=> No management of triangle on multiple tiles)
Expand Down

0 comments on commit 36d5b94

Please sign in to comment.