Commit 8a3a9ea
committed
USDScene : Load bounds from UsdGeomModelAPI extents hints
This can provide significant performance improvements where the ModelAPI has been used to provide cached extents. This knocks around 30% off the time taken to open the file and compute the root bound of the ALab in Gaffer. If USD composition time is omitted so only the bound computation is measured in isolation, a full 95% is knocked off the time. In the case of the ALab, the new root bound is also far more reasonable for some reason - I suspect the model extents are masking a bad authored extent on a leaf object elsewhere in the scene.
This has the potential to be surprising for any folks who have authored inaccurate model extents in the past, so I've made it possible to turn off the behaviour using an environment variable. I'd like to default things on in Cortex itself, but we can debate the appropriate default for Gaffer when we next update the Cortex version.1 parent fdfd188 commit 8a3a9ea
File tree
3 files changed
+93
-21
lines changed- contrib/IECoreUSD
- src/IECoreUSD
- test/IECoreUSD
3 files changed
+93
-21
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
| 7 | + | |
5 | 8 | | |
6 | 9 | | |
7 | 10 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
58 | 58 | | |
59 | 59 | | |
60 | 60 | | |
| 61 | + | |
61 | 62 | | |
62 | 63 | | |
63 | 64 | | |
| |||
528 | 529 | | |
529 | 530 | | |
530 | 531 | | |
| 532 | + | |
| 533 | + | |
| 534 | + | |
| 535 | + | |
| 536 | + | |
| 537 | + | |
| 538 | + | |
| 539 | + | |
| 540 | + | |
| 541 | + | |
| 542 | + | |
| 543 | + | |
| 544 | + | |
| 545 | + | |
| 546 | + | |
| 547 | + | |
| 548 | + | |
| 549 | + | |
| 550 | + | |
| 551 | + | |
| 552 | + | |
| 553 | + | |
| 554 | + | |
| 555 | + | |
| 556 | + | |
| 557 | + | |
| 558 | + | |
531 | 559 | | |
532 | 560 | | |
533 | 561 | | |
| |||
820 | 848 | | |
821 | 849 | | |
822 | 850 | | |
823 | | - | |
824 | | - | |
825 | | - | |
826 | | - | |
827 | | - | |
828 | | - | |
829 | | - | |
| 851 | + | |
830 | 852 | | |
831 | 853 | | |
832 | 854 | | |
833 | 855 | | |
834 | 856 | | |
835 | 857 | | |
836 | | - | |
| 858 | + | |
837 | 859 | | |
838 | | - | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
839 | 865 | | |
840 | | - | |
841 | | - | |
842 | | - | |
| 866 | + | |
| 867 | + | |
| 868 | + | |
843 | 869 | | |
| 870 | + | |
| 871 | + | |
| 872 | + | |
| 873 | + | |
844 | 874 | | |
845 | 875 | | |
846 | | - | |
| 876 | + | |
847 | 877 | | |
848 | 878 | | |
849 | 879 | | |
| |||
873 | 903 | | |
874 | 904 | | |
875 | 905 | | |
876 | | - | |
877 | | - | |
878 | | - | |
879 | | - | |
880 | | - | |
881 | | - | |
882 | | - | |
883 | | - | |
| 906 | + | |
884 | 907 | | |
885 | 908 | | |
886 | 909 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4211 | 4211 | | |
4212 | 4212 | | |
4213 | 4213 | | |
| 4214 | + | |
| 4215 | + | |
| 4216 | + | |
| 4217 | + | |
| 4218 | + | |
| 4219 | + | |
| 4220 | + | |
| 4221 | + | |
| 4222 | + | |
| 4223 | + | |
| 4224 | + | |
| 4225 | + | |
| 4226 | + | |
| 4227 | + | |
| 4228 | + | |
| 4229 | + | |
| 4230 | + | |
| 4231 | + | |
| 4232 | + | |
| 4233 | + | |
| 4234 | + | |
| 4235 | + | |
| 4236 | + | |
| 4237 | + | |
| 4238 | + | |
| 4239 | + | |
| 4240 | + | |
| 4241 | + | |
| 4242 | + | |
| 4243 | + | |
| 4244 | + | |
| 4245 | + | |
| 4246 | + | |
| 4247 | + | |
| 4248 | + | |
| 4249 | + | |
| 4250 | + | |
| 4251 | + | |
| 4252 | + | |
| 4253 | + | |
| 4254 | + | |
| 4255 | + | |
| 4256 | + | |
| 4257 | + | |
| 4258 | + | |
| 4259 | + | |
4214 | 4260 | | |
4215 | 4261 | | |
0 commit comments