We are filtering prims in a scene index by hiding a prim (returning an empty Rprim : return HdSceneIndexPrim() ) when its number of vertices is greater than 10 000.
When doing so, we get a warning from Hydra in :
S:/jenkins/workspace/ECP/ecg-usd-build/ecg-usd-full-python3.10-windows/ecg-usd-build/usd/pxr/imaging/hdSt/basisCurvesComputations.h -- HdStBasisCurves(/MayaHydraViewportRenderer/_MayaHydra_HdStormRendererPlugin_00000175E67CBDE0/_Index_MayaHydraSceneIndex_0000017586DB0F70/rprims/pSphere1/pSphereShape1/DormantPolyWire_876)- Primvar points has incorrect size for vertex interpolation (need 0, got 382), using fallback value (1, 0, 0) for rendering.
The problem is that the expected number of verts is 0 and we arre providing the full verts array. I am unsure this follows the filtering but I think it's likely to be related.
But I think the logic in HdSt_BasisCurvesPrimvarInterpolaterComputation::Resolve() should be changed when numVertsExpected is 0 as you're doing :
std::fill(primvars.begin(), primvars.end(), _fallbackValue);
Which is useless in this case.
I am unusure if having 0 vertsexpected is a normal value or not though.
Under a debugger, the _topology variable looks completely empty :
Description of Issue
We are filtering prims in a scene index by hiding a prim (returning an empty Rprim : return HdSceneIndexPrim() ) when its number of vertices is greater than 10 000. When doing so, we get a warning from Hydra in :
S:/jenkins/workspace/ECP/ecg-usd-build/ecg-usd-full-python3.10-windows/ecg-usd-build/usd/pxr/imaging/hdSt/basisCurvesComputations.h -- HdStBasisCurves(/MayaHydraViewportRenderer/_MayaHydra_HdStormRendererPlugin_00000175E67CBDE0/_Index_MayaHydraSceneIndex_0000017586DB0F70/rprims/pSphere1/pSphereShape1/DormantPolyWire_876)- Primvar points has incorrect size for vertex interpolation (need 0, got 382), using fallback value (1, 0, 0) for rendering. The problem is that the expected number of verts is 0 and we arre providing the full verts array. I am unsure this follows the filtering but I think it's likely to be related.
But I think the logic in HdSt_BasisCurvesPrimvarInterpolaterComputation::Resolve() should be changed when numVertsExpected is 0 as you're doing : std::fill(primvars.begin(), primvars.end(), _fallbackValue); Which is useless in this case. I am unusure if having 0 vertsexpected is a normal value or not though. Under a debugger, the _topology variable looks completely empty :
◢ | _topology | shared_ptr {...} [3 strong refs] [default] | std::shared_ptr
| ◢ [ptr] | 0x00000175e63eaa20 {...} | pxrInternal_v0_23pxrReserved::HdSt_BasisCurvesTopology *
| ◢ pxrInternal_v0_23pxrReserved::HdBasisCurvesTopology | {_curveType=linear _curveBasis=??? _curveWrap=segmented ...} | pxrInternal_v0_23pxrReserved::HdBasisCurvesTopology
| ▶ pxrInternal_v0_23pxrReserved::HdTopology | {...} | pxrInternal_v0_23pxrReserved::HdTopology
| ▶ _curveType | linear | pxrInternal_v0_23pxrReserved::TfToken
| ▶ _curveBasis | ??? | pxrInternal_v0_23pxrReserved::TfToken
| ▶ _curveWrap | segmented | pxrInternal_v0_23pxrReserved::TfToken
| ▶ _curveVertexCounts | { size=0 } | pxrInternal_v0_23pxrReserved::VtArray
| ▶ _curveIndices | { size=0 } | pxrInternal_v0_23pxrReserved::VtArray
| ▶ _invisiblePoints | { size=0 } | pxrInternal_v0_23pxrReserved::VtArray
| ▶ _invisibleCurves | { size=0 } | pxrInternal_v0_23pxrReserved::VtArray
| _numPoints | 0 | unsigned __int64
Steps to Reproduce
System Information (OS, Hardware)
Package Versions
Build Flags