align_corners and padding for TexturesUV

Summary:
Allow, and make default, align_corners=True for texture maps. Allow changing the padding_mode and set the default to be "border" which produces more logical results. Some new documentation.

The previous behavior corresponds to padding_mode="zeros" and align_corners=False.

Reviewed By: gkioxari

Differential Revision: D23268775

fbshipit-source-id: 58d6229baa591baa69705bcf97471c80ba3651de
This commit is contained in:
Jeremy Reizenstein
2020-08-25 11:26:58 -07:00
committed by Facebook GitHub Bot
parent d0cec028c7
commit e25ccab3d9
8 changed files with 104 additions and 31 deletions

View File

@@ -1505,9 +1505,13 @@ def join_meshes_as_batch(meshes: List[Meshes], include_textures: bool = True):
Merge multiple Meshes objects, i.e. concatenate the meshes objects. They
must all be on the same device. If include_textures is true, they must all
be compatible, either all or none having textures, and all the Textures
objects having the same members. If include_textures is False, textures are
objects being the same type. If include_textures is False, textures are
ignored.
If the textures are TexturesAtlas then being the same type includes having
the same resolution. If they are TexturesUV then it includes having the same
align_corners and padding_mode.
Args:
meshes: list of meshes.
include_textures: (bool) whether to try to join the textures.