mirror of
https://github.com/facebookresearch/pytorch3d.git
synced 2025-12-15 11:50:35 +08:00
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
This commit is contained in:
committed by
Facebook GitHub Bot
parent
b73d3d6ed9
commit
a3932960b3
@@ -520,6 +520,9 @@
|
||||
],
|
||||
"metadata": {
|
||||
"accelerator": "GPU",
|
||||
"anp_metadata": {
|
||||
"path": "fbsource/fbcode/vision/fair/pytorch3d/docs/tutorials/camera_position_optimization_with_differentiable_rendering.ipynb"
|
||||
},
|
||||
"bento_stylesheets": {
|
||||
"bento/extensions/flow/main.css": true,
|
||||
"bento/extensions/kernel_selector/main.css": true,
|
||||
@@ -533,6 +536,9 @@
|
||||
"provenance": [],
|
||||
"toc_visible": true
|
||||
},
|
||||
"disseminate_notebook_info": {
|
||||
"backup_notebook_id": "1062179640844868"
|
||||
},
|
||||
"kernelspec": {
|
||||
"display_name": "pytorch3d (local)",
|
||||
"language": "python",
|
||||
|
||||
@@ -84,7 +84,7 @@
|
||||
"from skimage.io import imread\n",
|
||||
"\n",
|
||||
"# Util function for loading meshes\n",
|
||||
"from pytorch3d.io import load_objs_as_meshes\n",
|
||||
"from pytorch3d.io import load_objs_as_meshes, load_obj\n",
|
||||
"\n",
|
||||
"# Data structures and functions for rendering\n",
|
||||
"from pytorch3d.structures import Meshes, Textures\n",
|
||||
@@ -97,7 +97,7 @@
|
||||
" RasterizationSettings, \n",
|
||||
" MeshRenderer, \n",
|
||||
" MeshRasterizer, \n",
|
||||
" TexturedSoftPhongShader\n",
|
||||
" SoftPhongShader\n",
|
||||
")\n",
|
||||
"\n",
|
||||
"# add path for demo utils functions \n",
|
||||
@@ -316,7 +316,7 @@
|
||||
" cameras=cameras, \n",
|
||||
" raster_settings=raster_settings\n",
|
||||
" ),\n",
|
||||
" shader=TexturedSoftPhongShader(\n",
|
||||
" shader=SoftPhongShader(\n",
|
||||
" device=device, \n",
|
||||
" cameras=cameras,\n",
|
||||
" lights=lights\n",
|
||||
@@ -563,6 +563,9 @@
|
||||
],
|
||||
"metadata": {
|
||||
"accelerator": "GPU",
|
||||
"anp_metadata": {
|
||||
"path": "fbsource/fbcode/vision/fair/pytorch3d/docs/tutorials/render_textured_meshes.ipynb"
|
||||
},
|
||||
"bento_stylesheets": {
|
||||
"bento/extensions/flow/main.css": true,
|
||||
"bento/extensions/kernel_selector/main.css": true,
|
||||
@@ -575,6 +578,9 @@
|
||||
"name": "render_textured_meshes.ipynb",
|
||||
"provenance": []
|
||||
},
|
||||
"disseminate_notebook_info": {
|
||||
"backup_notebook_id": "569222367081034"
|
||||
},
|
||||
"kernelspec": {
|
||||
"display_name": "pytorch3d (local)",
|
||||
"language": "python",
|
||||
|
||||
Reference in New Issue
Block a user