Nikhila Ravi a3932960b3 Texturing API updates
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
2020-07-29 16:11:23 -07:00
..
2020-06-29 13:15:51 -07:00
2020-07-09 18:04:06 -07:00
2020-07-29 16:11:23 -07:00
2020-01-23 11:53:46 -08:00
2020-04-26 07:18:57 -07:00
2020-01-23 11:53:46 -08:00
2020-01-23 11:53:46 -08:00
2020-01-23 11:53:46 -08:00

Setup

Install dependencies

pip install -U recommonmark mock sphinx sphinx_rtd_theme sphinx_markdown_tables

We want to include the root readme as an overview. Before generating the docs create a symlink to the root readme.

cd docs        
ln -s ../README.md  overview.md

In conf.py for deployment this is done using subprocess.call.

Add a new file

Add a new .md or .rst file and add the name to the doc tree in index.rst e.g

.. toctree::
   :maxdepth: 1
   :caption: Intro Documentation

   overview

To autogenerate docs from docstrings in the source code, add the import path for the function e.g.

Chamfer Loss
--------------------

.. autoclass:: loss.chamfer.chamfer_distance
    :members:
    :undoc-members:

    .. automethod:: __init__

Build

From pytorch3d/docs run:

> make html

The website is generated in _build/html.

Common Issues

Sphinx can be fussy, and sometimes about things you werent expecting. For example, you might encounter something like:

WARNING: toctree contains reference to nonexisting document u'overview' ... checking consistency... /docs/overview.rst:: WARNING: document isn't included in any toctree

You might have indented overview in the .. toctree:: in index.rst with four spaces, when Sphinx is expecting three.

View

Start a python simple server:

> python -m http.server

Navigate to: http://0.0.0.0:8000/