Skip to content

Commit

Permalink
add gltf loader, add vertex_tangents to mesh class and to ops (#763)
Browse files Browse the repository at this point in the history
Signed-off-by: Clement Fuji Tsang <[email protected]>
  • Loading branch information
Caenorst authored Oct 26, 2023
1 parent 1a73983 commit 0e0a802
Show file tree
Hide file tree
Showing 33 changed files with 2,443 additions and 915 deletions.
1 change: 1 addition & 0 deletions docs/modules/kaolin.io.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ and :ref:`materials module<kaolin.io.materials>` contains Materials definition t

kaolin.io.dataset
kaolin.io.materials
kaolin.io.gltf
kaolin.io.obj
kaolin.io.off
kaolin.io.render
Expand Down
22 changes: 16 additions & 6 deletions examples/tutorial/camera_and_rasterization.ipynb

Large diffs are not rendered by default.

508 changes: 508 additions & 0 deletions examples/tutorial/gltf_viz.ipynb

Large diffs are not rendered by default.

22 changes: 11 additions & 11 deletions examples/tutorial/interactive_visualizer.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -61,19 +61,20 @@
"text": [
"SurfaceMesh object with batching strategy FIXED\n",
" vertices: [1, 5002, 3] (torch.float32)[cuda:0] \n",
" normals: [1, 5002, 3] (torch.float32)[cuda:0] \n",
" uvs: [1, 5505, 2] (torch.float32)[cuda:0] \n",
" faces: [10000, 3] (torch.int64)[cuda:0] \n",
" normals: [1, 5002, 3] (torch.float32)[cuda:0] \n",
" face_normals_idx: [1, 10000, 3] (torch.int64)[cuda:0] \n",
" uvs: [1, 5505, 2] (torch.float32)[cuda:0] \n",
" face_uvs_idx: [1, 10000, 3] (torch.int64)[cuda:0] \n",
"material_assignments: [1, 10000] (torch.int16)[cuda:0] \n",
" materials: [\n",
" 0: list of length 1\n",
" ]\n",
" face_vertices: if possible, computed on access from: (faces, vertices)\n",
" face_normals: if possible, computed on access from: (normals, face_normals_idx) or (vertices, faces)\n",
" face_uvs: if possible, computed on access from: (uvs, face_uvs_idx)\n",
" vertex_normals: if possible, computed on access from: (faces, face_normals)\n",
" face_uvs: if possible, computed on access from: (uvs, face_uvs_idx)\n"
" vertex_tangents: if possible, computed on access from: (faces, vertices, face_uvs)\n"
]
}
],
Expand Down Expand Up @@ -342,14 +343,13 @@
"execution_count": 5,
"id": "f10f6ab7-662c-4cf6-8af4-5f28ae79d795",
"metadata": {
"scrolled": false,
"tags": []
},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "68ea5e664b064a2eb97ef8ccdca004b9",
"model_id": "883f99f3b60141258fcc4dcf0db9d314",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -363,7 +363,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "5083ae6b7e594e3fad555f5c03d75ea3",
"model_id": "2ad9e66e6172456db0d425ebede7dbbf",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -410,7 +410,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "33ecbe9c9d92447691b7c93ac72c1c79",
"model_id": "74c34ff2505c42d4bf952ea9d14715fb",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -424,7 +424,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "ddd1612cd0224eaeb6b11ee7d08d9d21",
"model_id": "d0cc2f35f68b405a96512c659d67568f",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -471,7 +471,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "9bcd10fb4d7542ebbe094fd29ee73643",
"model_id": "a1418b4982154f6381b6669713503672",
"version_major": 2,
"version_minor": 0
},
Expand All @@ -485,7 +485,7 @@
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "82638dc05bfa4970a09aee4d197f95d0",
"model_id": "07ba006798f4479183455879fc81d681",
"version_major": 2,
"version_minor": 0
},
Expand Down Expand Up @@ -602,7 +602,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.10"
"version": "3.8.16"
}
},
"nbformat": 4,
Expand Down
102 changes: 56 additions & 46 deletions examples/tutorial/understanding_spcs_tutorial.ipynb

Large diffs are not rendered by default.

106 changes: 58 additions & 48 deletions examples/tutorial/working_with_meshes.ipynb

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions kaolin/io/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
from . import dataset
from . import materials
from . import gltf
from . import obj
from . import off
from . import render
Expand Down
Loading

0 comments on commit 0e0a802

Please sign in to comment.