Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting up Model Cards textures can hang HdStorm/USDVIEW #3239

Open
deboisj opened this issue Aug 16, 2024 · 1 comment
Open

Setting up Model Cards textures can hang HdStorm/USDVIEW #3239

deboisj opened this issue Aug 16, 2024 · 1 comment

Comments

@deboisj
Copy link

deboisj commented Aug 16, 2024

Description of Issue

Setting up Model Card textures on point instances can cause hdStorm / usdview to hang. See repro steps bellow.

Breaking while it hangs it is looping here : https://github.com/PixarAnimationStudios/OpenUSD/blob/dev/pxr/imaging/hdSt/mesh.cpp#L366

I think numInstanceLevels is initialized to 0.... so -1 and it being a size_t/unsigned...it starts looping at the max value... it would probably end eventually...but....going to be a while!

Steps to Reproduce

Using this USDA file with a simple point instancer with draw modes / cards :

#usda 1.0
(
    endTimeCode = 1
    startTimeCode = 0
)


def Xform "Comp" (
	apiSchemas = ["GeomModelAPI"]
	kind = "assembly"
)
{
	def PointInstancer "Instancer" (
		kind = "assembly"
	)
	{
		point3f[] positions = [(0, 0, 0), (4, 4, 4)]
		int[] protoIndices.timeSamples = {
			0: [1, 1],
		}
		rel prototypes = [
			</Comp/Instancer/Protos/Proto1>,
			</Comp/Instancer/Protos/Proto2>,
		]

		def "Protos" (
			kind = "assembly"
		)
		{
			def Xform "Proto1" (
				apiSchemas = ["GeomModelAPI"]
				kind = "component"
			)
			{
				uniform token model:cardGeometry = "cross"
				uniform token model:drawMode = "cards"
				token visibility = "visible"

				def Cube "cube"
				{
					color3f[] primvars:displayColor = [(1, 0, 0)]
				}
			}

			def Xform "Proto2" (
				apiSchemas = ["GeomModelAPI"]
				kind = "component"
			)
			{
				uniform token model:cardGeometry = "cross"
				uniform token model:drawMode = "cards"
				token visibility = "visible"

				def Cone "cone"
				{
					color3f[] primvars:displayColor = [(0, 1, 0)]
				}
			}
		}
	}
}

From the interpreter in USDVIEW, run this :

p = usdviewApi.stage.GetPrimAtPath("/Comp/Instancer/Protos/Proto2")
m = UsdGeom.ModelAPI.Apply(p)
m.CreateModelCardTextureXPosAttr().Set("D:\\Models\\USD\\uvgrid.jpg")
m.CreateModelCardTextureYPosAttr().Set("D:\\Models\\USD\\uvgrid.jpg")

image

System Information (OS, Hardware)

Windows

Package Versions

0.24.05

@jesschimein
Copy link

Filed as internal issue #USD-9998

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants