1. 27 Oct, 2020 1 commit
    • Jeremy Reizenstein's avatar
      images for debugging TexturesUV · aa4cc0ad
      Jeremy Reizenstein authored
      Summary: New methods to directly plot a TexturesUV map with its used points, using PIL and matplotlib.
      
      Reviewed By: gkioxari
      
      Differential Revision: D23782968
      
      fbshipit-source-id: 692970857b5be13a35a3175dc82ac03963a73555
      aa4cc0ad
  2. 06 Oct, 2020 1 commit
    • Georgia Gkioxari's avatar
      add texture vertex sampling functionality to textures · e651a429
      Georgia Gkioxari authored
      Summary: Enhance every texture type with `faces_verts_textures_packed` that allows users to query the texture of each vertex in mesh
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D24058778
      
      fbshipit-source-id: 19d0e3a244fa96aae462c47bf52e07dfd3b7c6f0
      e651a429
  3. 25 Aug, 2020 2 commits
    • Jeremy Reizenstein's avatar
      amalgamate meshes with texture into a single scene · 909dc835
      Jeremy Reizenstein authored
      Summary:
      Add a join_scene method to all the textures to allow the join_mesh function to include textures. Rename the join_mesh function to join_meshes_as_scene.
      
      For TexturesAtlas, we now interpolate if the user attempts to have the resolution vary across the batch. This doesn't look great if the resolution is already very low.
      
      For TexturesUV, a rectangle packing function is required, this does something simple.
      
      Reviewed By: gkioxari
      
      Differential Revision: D23188773
      
      fbshipit-source-id: c013db061a04076e13e90ccc168a7913e933a9c5
      909dc835
    • Jeremy Reizenstein's avatar
      align_corners and padding for TexturesUV · e25ccab3
      Jeremy Reizenstein authored
      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
      e25ccab3
  4. 22 Aug, 2020 1 commit
    • Nikhila Ravi's avatar
      Tutorials textures updates and fix bug in extending meshes with uv textures · 90f6a005
      Nikhila Ravi authored
      Summary:
      Found a bug in extending textures with vertex uv coordinates. This was due to the padded -> list conversion of vertex uv coordinates i.e.                 The number of vertices in the mesh and in verts_uvs can differ
      e.g. if a vertex is shared between 3 faces, it can
      have up to 3 different uv coordinates. Therefore we cannot convert directly from padded to list using _num_verts_per_mesh
      
      Reviewed By: bottler
      
      Differential Revision: D23233595
      
      fbshipit-source-id: 0c66d15baae697ead0bdc384f74c27d4c6539fc9
      90f6a005
  5. 21 Aug, 2020 1 commit
    • Jeremy Reizenstein's avatar
      Fix batching bug from TexturesUV packed ambiguity, other textures tidyup · 9a50cf80
      Jeremy Reizenstein authored
      Summary:
      faces_uvs_packed and verts_uvs_packed were only used in one place and the definition of the former was ambiguous. This meant that the wrong coordinates could be used for meshes other than the first in the batch. I have therefore removed both functions and build their common result inline. Added a test that a simple batch of two meshes is rendered consistently with the rendering of each alone. This test would have failed before.
      
      I hope this fixes https://github.com/facebookresearch/pytorch3d/issues/283.
      
      Some other small improvements to the textures code.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D23161936
      
      fbshipit-source-id: f99b560a46f6b30262e07028b049812bc04350a7
      9a50cf80
  6. 17 Aug, 2020 1 commit
  7. 29 Jul, 2020 1 commit
    • Nikhila Ravi's avatar
      Texturing API updates · a3932960
      Nikhila Ravi authored
      Summary:
      A fairly big refactor of the texturing API with some breaking changes to how textures are defined.
      
      Main changes:
      - There are now 3 types of texture classes: `TexturesUV`, `TexturesAtlas` and `TexturesVertex`. Each class:
         - has a `sample_textures` function which accepts the `fragments` from rasterization and returns `texels`. This means that the shaders will not need to know the type of the mesh texture which will resolve several issues people were reporting on GitHub.
        -  has a `join_batch` method for joining multiple textures of the same type into a batch
      
      Reviewed By: gkioxari
      
      Differential Revision: D21067427
      
      fbshipit-source-id: 4b346500a60181e72fdd1b0dd89b5505c7a33926
      a3932960
  8. 13 Jul, 2020 1 commit
    • Justin Johnson's avatar
      CUDA kernel for interpolate_face_attributes · 26d2cc24
      Justin Johnson authored
      Summary: When rendering meshes with Phong shading, interpolate_face_attributes was taking up a nontrivial fraction of the overall shading time. This diff replaces our Python implementation of this function with a CUDA implementation.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D21610763
      
      fbshipit-source-id: 2bb362a28f698541812aeab539047264b125ebb8
      26d2cc24
  9. 29 Mar, 2020 1 commit
    • Patrick Labatut's avatar
      Address black + isort fbsource linter warnings · d57daa6f
      Patrick Labatut authored
      Summary: Address black + isort fbsource linter warnings from D20558374 (previous diff)
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D20558373
      
      fbshipit-source-id: d3607de4a01fb24c0d5269634563a7914bddf1c8
      d57daa6f
  10. 17 Mar, 2020 1 commit
  11. 12 Mar, 2020 1 commit
    • Patrick Labatut's avatar
      Remove shebang line when not strictly required · 3c71ab64
      Patrick Labatut authored
      Summary: The shebang line `#!<path to interpreter>` is only required for Python scripts, so remove it on source files for class or function definitions. Additionally explicitly mark as executable the actual Python scripts in the codebase.
      
      Reviewed By: nikhilaravi
      
      Differential Revision: D20095778
      
      fbshipit-source-id: d312599fba485e978a243292f88a180d71e1b55a
      3c71ab64
  12. 11 Mar, 2020 1 commit
    • Jeremy Reizenstein's avatar
      getitem for textures · fb97ab10
      Jeremy Reizenstein authored
      Summary: Make Meshes.__getitem__ carry texture information to the new mesh.
      
      Reviewed By: gkioxari
      
      Differential Revision: D20283976
      
      fbshipit-source-id: d9ee0580c11ac5b4384df9d8158a07e6eb8d00fe
      fb97ab10
  13. 29 Feb, 2020 1 commit
    • Nikhila Ravi's avatar
      Barycentric clipping in the renderer and flat shading · ff19c642
      Nikhila Ravi authored
      Summary:
      Updates to the Renderer to enable barycentric clipping. This is important when there is blurring in the rasterization step.
      
      Also added support for flat shading.
      
      Reviewed By: jcjohnson
      
      Differential Revision: D19934259
      
      fbshipit-source-id: 036e48636cd80d28a04405d7a29fcc71a2982904
      ff19c642
  14. 23 Jan, 2020 1 commit