Summary: ## Updates - Defined the world and camera coordinates according to this figure. The world coordinates are defined as having +Y up, +X left and +Z in. {F230888499} - Removed all flipping from blending functions. - Updated the rasterizer to return images with +Y up and +X left. - Updated all the mesh rasterizer tests - The expected values are now defined in terms of the default +Y up, +X left - Added tests where the triangles in the meshes are non symmetrical so that it is clear which direction +X and +Y are ## Questions: - Should we have **scene settings** instead of raster settings? - To be more correct we should be [z clipping in the rasterizer based on the far/near clipping planes](https://github.com/ShichenLiu/SoftRas/blob/master/soft_renderer/cuda/soft_rasterize_cuda_kernel.cu#L400) - these values are also required in the blending functions so should we make these scene level parameters and have a scene settings tuple which is available to the rasterizer and shader? Reviewed By: gkioxari Differential Revision: D20208604 fbshipit-source-id: 55787301b1bffa0afa9618f0a0886cc681da51f3
Setup
Install dependencies
pip install -U recommonmark mock sphinx sphinx_rtd_theme sphinx_markdown_tables
Add symlink to the root README.md
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 weren’t 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/