From 37dcd86681e0d0025454482b21a503ccccd2faac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=98=8E=E5=8D=8E?= Date: Tue, 26 Jul 2022 17:20:00 -0700 Subject: [PATCH 1/2] normalize UV coordinates to [0,1] in make_material_atlas() --- pytorch3d/io/mtl_io.py | 1 + 1 file changed, 1 insertion(+) diff --git a/pytorch3d/io/mtl_io.py b/pytorch3d/io/mtl_io.py index 166f98a8e..443ca0ba1 100644 --- a/pytorch3d/io/mtl_io.py +++ b/pytorch3d/io/mtl_io.py @@ -299,6 +299,7 @@ def make_material_atlas( # bi-linearly interpolate the textures from the images # using the uv coordinates given by uv_pos. + uv_pos -= torch.floor(uv_pos) textures = _bilinear_interpolation_grid_sample(image, uv_pos) return textures From 8984feb4aab597fbe659bc18c0143aba72494f14 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=88=98=E6=98=8E=E5=8D=8E?= Date: Tue, 26 Jul 2022 20:24:31 -0700 Subject: [PATCH 2/2] change default option for texture_wrap --- pytorch3d/io/obj_io.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch3d/io/obj_io.py b/pytorch3d/io/obj_io.py index 6d3e7eca9..cdd75e7e3 100644 --- a/pytorch3d/io/obj_io.py +++ b/pytorch3d/io/obj_io.py @@ -77,7 +77,7 @@ def load_obj( load_textures: bool = True, create_texture_atlas: bool = False, texture_atlas_size: int = 4, - texture_wrap: Optional[str] = "repeat", + texture_wrap: Optional[str] = None, device: Device = "cpu", path_manager: Optional[PathManager] = None, ):