OpenUSD icon indicating copy to clipboard operation
OpenUSD copied to clipboard

USDImagingGL::TestIntersection (Under Hydra) Fails With USDSpheres Scaled With The Radius Attribute.

Open SimonCSmith opened this issue 11 months ago • 2 comments

Description of Issue

If you define a USDSphere and use the radius attribute rather than a scale transform, USDImagingGL::TestIntersection will fail to correct intersect the sphere (it seems to think the sphere has a unit radius instead).

Steps to Reproduce

Create a simple sphere in a udsa file as follows:

#usda 1.0
def Sphere "sphere1" ()
{
	 double radius = 2
}

Then load this into USDView and use the HdStorm reference renderer. Ensure the "show rollover prim info" is on, and mouse over the sphere from the edge to the middle. Notice that the tooltip will only appear when half way into the radius of the sphere. This is because the tooltip is driven from the USDImagingGL::TestIntersection call, and hence the radius not being taken into account in the internal intersection tests (where applying a scale of 2 would).

System Information (OS, Hardware)

Reproduced under Windows 10.

Package Versions

USD 23.08 (build under Visual Studio 2019 from source)

Build Flags

I don't think there are any specific build flags needed to reproduce this.

SimonCSmith avatar Feb 29 '24 09:02 SimonCSmith

Filed as internal issue #USD-9377

jesschimein avatar Feb 29 '24 18:02 jesschimein

I verified that scaling the sphere with a scaleOp, and a radius 1, TestIntersection works properly; however radius seems to be disregarded irrespective of the value of scaleOp.

meshula avatar Mar 01 '24 06:03 meshula