Skip to content

Commit

Permalink
Don't read primvars matching arnold attribute names #802 (#803)
Browse files Browse the repository at this point in the history
Co-authored-by: Sebastien Blaineau-Ortega <[email protected]>
  • Loading branch information
sebastienblor and sebastienblor authored Jun 15, 2021
1 parent ef3bd0c commit bec5250
Show file tree
Hide file tree
Showing 5 changed files with 368 additions and 5 deletions.
6 changes: 6 additions & 0 deletions testsuite/test_0179/README
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Read Curves radius properly, when a primvars:radius parameter is present
See #802

author: sebastien.ortega

PARAMS: {'scene':'test.usda'}
168 changes: 168 additions & 0 deletions testsuite/test_0179/data/test.usda

Large diffs are not rendered by default.

187 changes: 187 additions & 0 deletions testsuite/test_0179/ref/reference.log
Original file line number Diff line number Diff line change
@@ -0,0 +1,187 @@
00:00:00 70MB | log started Mon Jun 14 09:41:32 2021
00:00:00 70MB | Arnold 6.2.1.2 [24aa4e34] windows clang-10.0.1 oiio-2.3.2 osl-1.12.0 vdb-7.1.1 clm-2.0.0.235 rlm-14.1.3 optix-6.6.0 2021/06/08 09:15:44
00:00:00 70MB | running on REMS4QL1726, pid=36000
00:00:00 70MB | 2 x Intel(R) Xeon(R) Gold 5218 CPU @ 2.30GHz (32 cores, 64 logical) with 65154MB
00:00:00 73MB | NVIDIA driver version 442.50 (Optix 60600)
00:00:00 73MB | GPU 0: Quadro RTX 4000 @ 1545MHz (compute 7.5) with 8192MB (6252MB available) (NVLink:0)
00:00:00 73MB | Windows 10 (version 10.0, build 19041)
00:00:00 73MB | soft limit for open files is set at 2048
00:00:00 73MB |
00:00:00 73MB | loading plugins from C:\arnold\arnold-usd\build\windows_x86_64\msvc_opt\usd-0.20.11_arnold-6.2.1.2\procedural ...
00:00:00 77MB | usd_proc.dll: usd uses Arnold 6.2.1.2
00:00:00 77MB | loaded 1 plugins from 1 lib(s) in 0:00.09
00:00:00 77MB | loading plugins from C:\arnold\sdk\latest\bin\..\plugins ...
00:00:00 77MB | alembic_proc.dll: alembic uses Arnold 6.2.1.2
00:00:00 77MB | cryptomatte.dll: cryptomatte uses Arnold 6.2.1.2
00:00:00 77MB | cryptomatte.dll: cryptomatte_filter uses Arnold 6.2.1.2
00:00:00 77MB | cryptomatte.dll: cryptomatte_manifest_driver uses Arnold 6.2.1.2
00:00:00 77MB | skipping already loaded plugin: C:\arnold\sdk\latest\bin\..\plugins\usd_proc.dll ...
00:00:00 77MB | loaded 4 plugins from 2 lib(s) in 0:00.01
00:00:00 77MB | [kick] command: C:\arnold\sdk\latest\bin\kick test.usda -dw -r 160 120 -sm lambert -bs 16 -o testrender.tif -set driver_tiff.dither false -nocrashpopup -dp -v 6
00:00:00 77MB | loading plugins from . ...
00:00:00 77MB | no plugins loaded
00:00:00 110MB | [kick] applying 2 attr value overrides
00:00:00 110MB |
00:00:00 110MB | authorizing with default license managers: rlm, network, user ...
00:00:03 120MB WARNING | rendering with watermarks because of failed authorization:
00:00:03 120MB | [rlm] error initializing license system:
00:00:03 120MB | [rlm] * Can't read license data (-102)No such file or directory (errno: 2)
00:00:03 120MB | [clm.v1] generic license checkout error (22)
00:00:03 120MB | [clm.v2] SERVICE (7): expired license UI requires GUI mode
00:00:03 120MB | environment variables:
00:00:03 120MB | ARNOLD_LICENSE_ORDER = (not set)
00:00:03 120MB | ARNOLD_LICENSE_MANAGER = (not set)
00:00:03 120MB | [rlm] solidangle_LICENSE = (not set)
00:00:03 120MB | [rlm] RLM_LICENSE = (not set)
00:00:03 120MB | [clm] ADSKFLEX_LICENSE_FILE = (not set)
00:00:03 120MB | [clm] LM_LICENSE_FILE = (not set)
00:00:03 120MB |
00:00:03 139MB | [color_manager] no color manager is active
00:00:03 139MB | [color_manager] rendering color space is "linear" with declared chromaticities:
00:00:03 139MB | r(0.6400, 0.3300) g(0.3000, 0.6000) b(0.1500, 0.0600) and w(0.3127, 0.3290)
00:00:03 157MB |
00:00:03 157MB | there are 3 lights and 2 objects:
00:00:03 157MB | 1 persp_camera
00:00:03 157MB | 3 distant_light
00:00:03 157MB | 1 utility
00:00:03 157MB | 1 standard_surface
00:00:03 157MB | 1 driver_tiff
00:00:03 157MB | 1 gaussian_filter
00:00:03 157MB | 1 curves
00:00:03 157MB | 1 list_aggregate
00:00:03 157MB |
00:00:03 157MB | rendering image at 160 x 120, 1 AA sample
00:00:03 157MB | AA samples max <disabled>
00:00:03 157MB | AA sample clamp <disabled>
00:00:03 157MB | diffuse <disabled by depth>
00:00:03 157MB | specular <disabled by depth>
00:00:03 157MB | transmission samples 2 / depth 2
00:00:03 157MB | volume indirect <disabled by depth>
00:00:03 157MB | total depth 10
00:00:03 157MB | bssrdf samples 2
00:00:03 157MB | transparency depth 10
00:00:03 157MB | initializing 11 nodes ...
00:00:03 157MB WARNING | /Root/RootOffset/g_geometry/groom/hair_test/hair_testShape: varying user-data count wrong! (found 3135 expected 2565) -- disabling user-data 'rest'
00:00:03 158MB | creating root object list ...
00:00:03 158MB | node initialization done in 0:00.00 (multithreaded)
00:00:03 158MB | updating 12 nodes ...
00:00:03 158MB | default_light_fill: distant_light using 1 sample, 2 volume samples
00:00:03 158MB | default_light_key: distant_light using 1 sample, 2 volume samples
00:00:03 158MB | default_light_back: distant_light using 1 sample, 2 volume samples
00:00:03 158MB | scene bounds: (-1.76353204 10.3808632 -1.61705768) -> (1.77057827 14.232523 1.59582114)
00:00:03 158MB | node update done in 0:00.00 (multithreaded)
00:00:03 158MB | [aov] parsing 1 output statements ...
00:00:03 158MB | [aov] registered driver: "kick_driver" (driver_tiff)
00:00:03 158MB | [aov] * "RGBA" of type RGBA filtered by "kick_filter" (gaussian_filter)
00:00:03 158MB | [aov] done preparing 2 AOVs for 1 output to 1 driver (0 deep AOVs)
00:00:03 159MB | starting 64 bucket workers of size 16x16 ...
00:00:03 166MB | [accel] curves bvh4 done - 0:00.00 (wall time) - 2280 prims, 1 key
00:00:03 166MB | 0% done - 9 rays/pixel
00:00:03 166MB | 5% done - 15 rays/pixel
00:00:03 166MB | 10% done - 4 rays/pixel
00:00:03 167MB | 15% done - 1 rays/pixel
00:00:03 167MB | 20% done - 1 rays/pixel
00:00:03 167MB | 25% done - 3 rays/pixel
00:00:03 167MB | 30% done - 1 rays/pixel
00:00:03 167MB | 35% done - 2 rays/pixel
00:00:03 167MB | 40% done - 0 rays/pixel
00:00:03 167MB | 45% done - 0 rays/pixel
00:00:03 167MB | 50% done - 0 rays/pixel
00:00:03 167MB | 55% done - 0 rays/pixel
00:00:03 168MB | 60% done - 0 rays/pixel
00:00:03 168MB | 65% done - 0 rays/pixel
00:00:03 168MB | 70% done - 0 rays/pixel
00:00:03 168MB | 75% done - 0 rays/pixel
00:00:03 168MB | 80% done - 0 rays/pixel
00:00:03 168MB | 85% done - 0 rays/pixel
00:00:03 168MB | 90% done - 0 rays/pixel
00:00:03 168MB | 95% done - 0 rays/pixel
00:00:03 168MB | 100% done - 0 rays/pixel
00:00:03 168MB | render done in 0:00.028
00:00:03 168MB | [driver_tiff] writing file `testrender.tif'
00:00:03 170MB | render done
00:00:03 170MB |
00:00:03 170MB | -----------------------------------------------------------------------------------
00:00:03 170MB | scene creation time 0:00.18 machine utilization (7.01%)
00:00:03 170MB | plugin loading 0:00.10
00:00:03 170MB | unaccounted 0:00.08
00:00:03 170MB | -----------------------------------------------------------------------------------
00:00:03 170MB | frame time 0:03.22 machine utilization (0.98%)
00:00:03 170MB | driver init/close 0:00.01
00:00:03 170MB | rendering 0:00.02
00:00:03 170MB | pixel rendering 0:00.02
00:00:03 170MB | unaccounted 0:03.17
00:00:03 170MB | -----------------------------------------------------------------------------------
00:00:03 170MB | top session self-times by category
00:00:03 170MB | worker waiting 0:00.05 (74.48%)
00:00:03 170MB | RenderBucket 0:00.01 (12.79%)
00:00:03 170MB | thread blocked 0:00.00 ( 7.18%)
00:00:03 170MB | Plugin loader 0:00.00 ( 1.83%)
00:00:03 170MB | AiSceneLoad 0:00.00 ( 1.55%)
00:00:03 170MB | RenderSession::Setup 0:00.00 ( 0.63%)
00:00:03 170MB | -----------------------------------------------------------------------------------
00:00:03 170MB | top session self-times by node
00:00:03 170MB | worker waiting 0:00.05 (74.48%)
00:00:03 170MB | RenderBucket 0:00.01 (12.79%)
00:00:03 170MB | thread blocked 0:00.00 ( 7.18%)
00:00:03 170MB | Plugin loader 0:00.00 ( 1.83%)
00:00:03 170MB | AiSceneLoad 0:00.00 ( 1.55%)
00:00:03 170MB | RenderSession::Setup 0:00.00 ( 0.63%)
00:00:03 170MB | -----------------------------------------------------------------------------------
00:00:03 170MB | peak CPU memory used 170.26MB
00:00:03 170MB | at startup 73.46MB
00:00:03 170MB | plugins 3.79MB
00:00:03 170MB | AOV samples 0.67MB
00:00:03 170MB | output buffers 0.39MB
00:00:03 170MB | framebuffers 0.39MB
00:00:03 170MB | node overhead 0.00MB
00:00:03 170MB | message passing 0.13MB
00:00:03 170MB | memory pools 42.05MB
00:00:03 170MB | geometry 0.09MB
00:00:03 170MB | curves 0.09MB
00:00:03 170MB | accel structs 0.11MB
00:00:03 170MB | strings 24.25MB
00:00:03 170MB | profiler 0.01MB
00:00:03 170MB | unaccounted 24.94MB
00:00:03 170MB | -----------------------------------------------------------------------------------
00:00:03 170MB | ray counts ( /pixel, /sample) (% total) (avg. hits) (max hits)
00:00:03 170MB | camera 24160 ( 1.26, 1.00) ( 86.20%) ( 0.08) ( 1)
00:00:03 170MB | shadow 3869 ( 0.20, 0.16) ( 13.80%) ( 0.07) ( 1)
00:00:03 170MB | total 28029 ( 1.46, 1.16) (100.00%) ( 0.08) ( 1)
00:00:03 170MB | by ray depth: 0
00:00:03 170MB | total 100.0%
00:00:03 170MB | -----------------------------------------------------------------------------------
00:00:03 170MB | shader calls ( /pixel, /sample) (% total)
00:00:03 170MB | primary 2009 ( 0.10, 0.08) (100.00%)
00:00:03 170MB | total 2009 ( 0.10, 0.08) (100.00%)
00:00:03 170MB | by ray depth: 0
00:00:03 170MB | total 100.0%
00:00:03 170MB | -----------------------------------------------------------------------------------
00:00:03 170MB | geometry (% hit ) (instances) ( init mem, final mem)
00:00:03 170MB | lists 1 (100.0%) ( 0) ( 0.00, 0.00)
00:00:03 170MB | curves 1 (100.0%) ( 0) ( 0.09, 0.09)
00:00:03 170MB | -----------------------------------------------------------------------------------
00:00:03 170MB | geometric elements ( min) ( avg.) ( max)
00:00:03 170MB | curves 285 ( 285) ( 285.0) ( 285)
00:00:03 170MB | curve segments 2280 ( 2280) ( 2280.0) ( 2280)
00:00:03 170MB | -----------------------------------------------------------------------------------
00:00:03 170MB | acceleration structures: (% total)
00:00:03 170MB | list 1 ( 50.00%)
00:00:03 170MB | bvh 1 ( 50.00%)
00:00:03 170MB | total 2 (100.00%)
00:00:03 170MB | -----------------------------------------------------------------------------------
00:00:03 170MB | number of warnings, warning type:
00:00:03 170MB | 1: %s: varying user-data count wrong! (found %zu expected %d) -- disabling user-data '%s'
00:00:03 170MB | 1: rendering with watermarks because of failed authorization:
00:00:03 170MB | -----------------------------------------------------------------------------------
00:00:03 170MB | performance warnings:
00:00:03 170MB WARNING | Rendering CPU utilization was only 1%. Your render may be bound by a single threaded process or I/O.
00:00:03 170MB | -----------------------------------------------------------------------------------
00:00:03 165MB |
00:00:03 165MB | releasing resources
00:00:03 127MB | unloading 3 plugins
00:00:03 127MB | closing usd_proc.dll ...
00:00:03 127MB | closing alembic_proc.dll ...
00:00:03 127MB | closing cryptomatte.dll ...
00:00:03 127MB | unloading plugins done
00:00:03 127MB | Arnold shutdown
Binary file added testsuite/test_0179/ref/reference.tif
Binary file not shown.
12 changes: 7 additions & 5 deletions translator/reader/prim_reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -504,6 +504,10 @@ void UsdArnoldPrimReader::ReadPrimvars(
if ((name == "displayColor" || name == "displayOpacity") && !primvar.GetAttr().HasAuthoredValue())
continue;

// if this parameter already exists, we want to skip it
if (AiNodeEntryLookUpParameter(nodeEntry, AtString(name.GetText())) != nullptr)
continue;

SdfValueTypeName typeName = primvar.GetTypeName();
std::string arnoldIndexName = name.GetText() + std::string("idxs");

Expand Down Expand Up @@ -586,11 +590,9 @@ void UsdArnoldPrimReader::ReadPrimvars(

declaration += AiParamGetTypeName(primvarType);

// Declare a user-defined parameter, only if it doesn't already exist
if (AiNodeEntryLookUpParameter(nodeEntry, AtString(name.GetText())) == nullptr) {
AiNodeDeclare(node, name.GetText(), declaration.c_str());
}

// Declare the user data
AiNodeDeclare(node, name.GetText(), declaration.c_str());

bool hasIdxs = false;

// If the primvar is indexed, we need to set this as a
Expand Down

0 comments on commit bec5250

Please sign in to comment.