CARVIEW |
Select Language
HTTP/2 200
date: Sun, 27 Jul 2025 18:55:00 GMT
content-type: text/html; charset=utf-8
vary: X-PJAX, X-PJAX-Container, Turbo-Visit, Turbo-Frame, X-Requested-With,Accept-Encoding, Accept, X-Requested-With
x-repository-download: git clone https://github.com/facebookresearch/pytorch3d.git
etag: W/"e32160d82d6581d578fc25eb3ee6968b"
cache-control: max-age=0, private, must-revalidate
strict-transport-security: max-age=31536000; includeSubdomains; preload
x-frame-options: deny
x-content-type-options: nosniff
x-xss-protection: 0
referrer-policy: no-referrer-when-downgrade
content-security-policy: default-src 'none'; base-uri 'self'; child-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/; connect-src 'self' uploads.github.com www.githubstatus.com collector.github.com raw.githubusercontent.com api.github.com github-cloud.s3.amazonaws.com github-production-repository-file-5c1aeb.s3.amazonaws.com github-production-upload-manifest-file-7fdce7.s3.amazonaws.com github-production-user-asset-6210df.s3.amazonaws.com *.rel.tunnels.api.visualstudio.com wss://*.rel.tunnels.api.visualstudio.com objects-origin.githubusercontent.com copilot-proxy.githubusercontent.com proxy.individual.githubcopilot.com proxy.business.githubcopilot.com proxy.enterprise.githubcopilot.com *.actions.githubusercontent.com wss://*.actions.githubusercontent.com productionresultssa0.blob.core.windows.net/ productionresultssa1.blob.core.windows.net/ productionresultssa2.blob.core.windows.net/ productionresultssa3.blob.core.windows.net/ productionresultssa4.blob.core.windows.net/ productionresultssa5.blob.core.windows.net/ productionresultssa6.blob.core.windows.net/ productionresultssa7.blob.core.windows.net/ productionresultssa8.blob.core.windows.net/ productionresultssa9.blob.core.windows.net/ productionresultssa10.blob.core.windows.net/ productionresultssa11.blob.core.windows.net/ productionresultssa12.blob.core.windows.net/ productionresultssa13.blob.core.windows.net/ productionresultssa14.blob.core.windows.net/ productionresultssa15.blob.core.windows.net/ productionresultssa16.blob.core.windows.net/ productionresultssa17.blob.core.windows.net/ productionresultssa18.blob.core.windows.net/ productionresultssa19.blob.core.windows.net/ github-production-repository-image-32fea6.s3.amazonaws.com github-production-release-asset-2e65be.s3.amazonaws.com insights.github.com wss://alive.github.com api.githubcopilot.com api.individual.githubcopilot.com api.business.githubcopilot.com api.enterprise.githubcopilot.com; font-src github.githubassets.com; form-action 'self' github.com gist.github.com copilot-workspace.githubnext.com objects-origin.githubusercontent.com; frame-ancestors 'none'; frame-src viewscreen.githubusercontent.com notebooks.githubusercontent.com; img-src 'self' data: blob: github.githubassets.com media.githubusercontent.com camo.githubusercontent.com identicons.github.com avatars.githubusercontent.com private-avatars.githubusercontent.com github-cloud.s3.amazonaws.com objects.githubusercontent.com release-assets.githubusercontent.com secured-user-images.githubusercontent.com/ user-images.githubusercontent.com/ private-user-images.githubusercontent.com opengraph.githubassets.com copilotprodattachments.blob.core.windows.net/github-production-copilot-attachments/ github-production-user-asset-6210df.s3.amazonaws.com customer-stories-feed.github.com spotlights-feed.github.com objects-origin.githubusercontent.com *.githubusercontent.com; manifest-src 'self'; media-src github.com user-images.githubusercontent.com/ secured-user-images.githubusercontent.com/ private-user-images.githubusercontent.com github-production-user-asset-6210df.s3.amazonaws.com gist.github.com; script-src github.githubassets.com; style-src 'unsafe-inline' github.githubassets.com; upgrade-insecure-requests; worker-src github.githubassets.com github.com/assets-cdn/worker/ github.com/assets/ gist.github.com/assets-cdn/worker/
server: github.com
content-encoding: gzip
accept-ranges: bytes
set-cookie: _gh_sess=p4zZYgYJ4ueZQqBsxjPHHBEhXrK6w25t3bhA6eSBSCtCPMD0z2MdwyR2%2BsWJw%2FddohQk%2BZka7gMx6DFql4aIOHKbRQD%2FFEt%2FF1AsX5tCnjuCfKmJ6i%2BI4XDeB%2B7AtfxcwD6SnIiDUH7kQazK769gwySRBrD3Yg5hOshE9vJfB%2B9fvDbCnyRJyTpmOzdhvHy9QOHzg%2BnlcDPrzSCHw6%2Bfa22E73%2B3jaLJIKwDAa6DCJccBvnuXm4DEox%2BN9FLZRVbeSBFFgVyUJJUguG6J%2BxhBA%3D%3D--WhBuofleezS6XD%2FX--D91vPykqPSbtRlxqUNaGjA%3D%3D; Path=/; HttpOnly; Secure; SameSite=Lax
set-cookie: _octo=GH1.1.2113171222.1753642499; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 18:54:59 GMT; Secure; SameSite=Lax
set-cookie: logged_in=no; Path=/; Domain=github.com; Expires=Mon, 27 Jul 2026 18:54:59 GMT; HttpOnly; Secure; SameSite=Lax
x-github-request-id: A900:3467EF:11026D5:1643ABA:68867603
Deduplicate texture maps when joining · facebookresearch/pytorch3d@e12a081 · GitHub
Copy file name to clipboardExpand all lines: pytorch3d/renderer/mesh/textures.py
Copy file name to clipboardExpand all lines: pytorch3d/renderer/mesh/utils.py
Copy file name to clipboardExpand all lines: tests/test_render_meshes.py
Skip to content
Navigation Menu
{{ message }}
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit e12a081
Deduplicate texture maps when joining
Summary:
If you join several meshes which have TexturesUV textures using join_meshes_as_scene then we amalgamate all the texture images in to a single one. This now checks if some of the images are equal (i.e. the tensors are the same tensor, in the `is` sense; they have the same `id` in Python) and only uses one copy if they are.
I have an example of a massive scene made of several textured meshes with some shared, where this makes the difference between fitting the data on the GPU and not.
Reviewed By: theschnitz
Differential Revision: D25982364
fbshipit-source-id: a8228805f38475c796302e27328a340d9b56c8ef1 parent cd5af25 commit e12a081Copy full SHA for e12a081
File tree
Expand file treeCollapse file tree
4 files changed
+155
-42
lines changedFilter options
- pytorch3d/renderer/mesh
- tests
Expand file treeCollapse file tree
4 files changed
+155
-42
lines changedpytorch3d/renderer/mesh/textures.py
Copy file name to clipboardExpand all lines: pytorch3d/renderer/mesh/textures.py+22-21Lines changed: 22 additions & 21 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
10 | 10 |
| |
11 | 11 |
| |
12 | 12 |
| |
13 |
| - | |
| 13 | + | |
14 | 14 |
| |
15 | 15 |
| |
16 | 16 |
| |
| |||
1028 | 1028 |
| |
1029 | 1029 |
| |
1030 | 1030 |
| |
1031 |
| - | |
| 1031 | + | |
1032 | 1032 |
| |
1033 | 1033 |
| |
1034 | 1034 |
| |
1035 | 1035 |
| |
1036 | 1036 |
| |
1037 |
| - | |
1038 |
| - | |
| 1037 | + | |
1039 | 1038 |
| |
1040 | 1039 |
| |
1041 | 1040 |
| |
| |||
1048 | 1047 |
| |
1049 | 1048 |
| |
1050 | 1049 |
| |
1051 |
| - | |
1052 |
| - | |
1053 |
| - | |
1054 |
| - | |
| 1050 | + | |
1055 | 1051 |
| |
1056 | 1052 |
| |
1057 | 1053 |
| |
| |||
1064 | 1060 |
| |
1065 | 1061 |
| |
1066 | 1062 |
| |
1067 |
| - | |
| 1063 | + | |
1068 | 1064 |
| |
1069 | 1065 |
| |
1070 |
| - | |
1071 |
| - | |
| 1066 | + | |
| 1067 | + | |
1072 | 1068 |
| |
1073 | 1069 |
| |
1074 | 1070 |
| |
| |||
1102 | 1098 |
| |
1103 | 1099 |
| |
1104 | 1100 |
| |
1105 |
| - | |
1106 |
| - | |
1107 |
| - | |
1108 |
| - | |
| 1101 | + | |
| 1102 | + | |
| 1103 | + | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
1109 | 1107 |
| |
1110 | 1108 |
| |
1111 | 1109 |
| |
1112 | 1110 |
| |
1113 | 1111 |
| |
1114 | 1112 |
| |
1115 |
| - | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
1116 | 1116 |
| |
1117 |
| - | |
| 1117 | + | |
1118 | 1118 |
| |
1119 | 1119 |
| |
1120 | 1120 |
| |
1121 | 1121 |
| |
1122 | 1122 |
| |
1123 | 1123 |
| |
1124 | 1124 |
| |
1125 |
| - | |
1126 |
| - | |
| 1125 | + | |
| 1126 | + | |
| 1127 | + | |
1127 | 1128 |
| |
1128 | 1129 |
| |
1129 | 1130 |
| |
| |||
1164 | 1165 |
| |
1165 | 1166 |
| |
1166 | 1167 |
| |
1167 |
| - | |
| 1168 | + | |
1168 | 1169 |
| |
1169 |
| - | |
| 1170 | + | |
1170 | 1171 |
| |
1171 | 1172 |
| |
1172 | 1173 |
| |
|
pytorch3d/renderer/mesh/utils.py
Copy file name to clipboardExpand all lines: pytorch3d/renderer/mesh/utils.py+84-12Lines changed: 84 additions & 12 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
64 | 64 |
| |
65 | 65 |
| |
66 | 66 |
| |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
67 | 86 |
| |
68 | 87 |
| |
69 | 88 |
| |
| |||
74 | 93 |
| |
75 | 94 |
| |
76 | 95 |
| |
77 |
| - | |
| 96 | + | |
78 | 97 |
| |
79 | 98 |
| |
80 | 99 |
| |
| |||
156 | 175 |
| |
157 | 176 |
| |
158 | 177 |
| |
159 |
| - | |
| 178 | + | |
160 | 179 |
| |
161 | 180 |
| |
162 | 181 |
| |
| 182 | + | |
163 | 183 |
| |
164 | 184 |
| |
165 | 185 |
| |
| |||
182 | 202 |
| |
183 | 203 |
| |
184 | 204 |
| |
185 |
| - | |
186 |
| - | |
187 |
| - | |
188 |
| - | |
189 |
| - | |
190 | 205 |
| |
191 | 206 |
| |
192 | 207 |
| |
| |||
200 | 215 |
| |
201 | 216 |
| |
202 | 217 |
| |
203 |
| - | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
204 | 221 |
| |
205 | 222 |
| |
206 | 223 |
| |
| |||
213 | 230 |
| |
214 | 231 |
| |
215 | 232 |
| |
216 |
| - | |
| 233 | + | |
217 | 234 |
| |
218 | 235 |
| |
219 | 236 |
| |
220 |
| - | |
| 237 | + | |
221 | 238 |
| |
222 | 239 |
| |
223 |
| - | |
| 240 | + | |
224 | 241 |
| |
225 | 242 |
| |
226 | 243 |
| |
| |||
236 | 253 |
| |
237 | 254 |
| |
238 | 255 |
| |
239 |
| - | |
| 256 | + | |
240 | 257 |
| |
241 | 258 |
| |
242 | 259 |
| |
243 | 260 |
| |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + |
tests/test_render_meshes.py
Copy file name to clipboardExpand all lines: tests/test_render_meshes.py+8-1Lines changed: 8 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
652 | 652 |
| |
653 | 653 |
| |
654 | 654 |
| |
| 655 | + | |
| 656 | + | |
| 657 | + | |
655 | 658 |
| |
656 | 659 |
| |
657 | 660 |
| |
| |||
697 | 700 |
| |
698 | 701 |
| |
699 | 702 |
| |
700 |
| - | |
| 703 | + | |
| 704 | + | |
| 705 | + | |
| 706 | + | |
| 707 | + | |
701 | 708 |
| |
702 | 709 |
| |
703 | 710 |
| |
|
+41-8Lines changed: 41 additions & 8 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| 15 | + | |
| 16 | + | |
| 17 | + | |
15 | 18 |
| |
| 19 | + | |
16 | 20 |
| |
17 | 21 |
| |
18 | 22 |
| |
| |||
873 | 877 |
| |
874 | 878 |
| |
875 | 879 |
| |
876 |
| - | |
877 |
| - | |
878 |
| - | |
879 |
| - | |
880 |
| - | |
881 |
| - | |
| 880 | + | |
| 881 | + | |
| 882 | + | |
| 883 | + | |
| 884 | + | |
| 885 | + | |
| 886 | + | |
| 887 | + | |
| 888 | + | |
882 | 889 |
| |
883 | 890 |
| |
884 | 891 |
| |
885 | 892 |
| |
886 | 893 |
| |
887 | 894 |
| |
888 |
| - | |
| 895 | + | |
889 | 896 |
| |
890 |
| - | |
| 897 | + | |
891 | 898 |
| |
892 | 899 |
| |
893 | 900 |
| |
| |||
930 | 937 |
| |
931 | 938 |
| |
932 | 939 |
| |
| 940 | + | |
| 941 | + | |
| 942 | + | |
| 943 | + | |
| 944 | + | |
| 945 | + | |
| 946 | + | |
| 947 | + | |
| 948 | + | |
| 949 | + | |
| 950 | + | |
| 951 | + | |
| 952 | + | |
| 953 | + | |
| 954 | + | |
| 955 | + | |
| 956 | + | |
| 957 | + | |
| 958 | + | |
| 959 | + | |
| 960 | + | |
| 961 | + | |
| 962 | + | |
| 963 | + | |
| 964 | + | |
| 965 | + |
You can’t perform that action at this time.
0 commit comments