arnold-usd icon indicating copy to clipboard operation
arnold-usd copied to clipboard

Camera visibility not honored with skydomes in USD 21.11. Normals seem busted too.

Open ansuter opened this issue 3 years ago • 2 comments

Describe the bug

When using USDView from USD 21.11, and Arnold-USD 7.1.2, it seems primvars:arnold:camera, is no longer honored. In USD 20.11, if this is set to 0, I'd get an invisible skydome that still cast light. In 21.11, I now see the full skydome.

Before: image

After: image

You'll notice two things. The skydome is there in the after (which I don't want). And the cube looks extremely wonky (it looks like it has a sphere in it).

A clear and concise description of what the bug is.

To Reproduce Steps to reproduce the behavior:

  1. Use 7.0.0.1 arnold-usd
  2. Export simple scene with cube and skydome (with camera visibility off)
  3. Open in USDView

Expected behavior I expect camera visibility = 0 to result in no visible image for the skydome

Screenshots See above

Used Software Versions

  • Arnold: [e.g. 5.4.0.2] 7.1.2
  • USD: [e.g. 0.19.11] 21.11
  • Compiler: [e.g. GCC 4.8.5]
  • OS: [e.g. MacOS 10.15]
  • Any 3rd-party app: [e.g. Katana-3.2]

Additional context Add any other context about the problem here.

ansuter avatar Jul 11 '22 18:07 ansuter

image cube close-up

ansuter avatar Jul 11 '22 18:07 ansuter

I found a work around, but this doesn't seem quite right.

In HdArnoldGenericLight::Sync.

        // check camera light image visibility
        const auto& val = sceneDelegate->GetLightParamValue(id, TfToken("primvars:arnold:camera"));
        if (!val.IsEmpty()) {
            AiNodeSetFlt(_light, str::camera, val.UncheckedGet<float>());
        }

ansuter avatar Jul 11 '22 23:07 ansuter

Hi @ansuter du you have an example .usda scene that has this attribute and that fails for you in usd_view ? I'm testing here and it's working well for me. So there might be something different in the scenes that we're using

sebastienblor avatar Aug 19 '22 15:08 sebastienblor

my bad, it works properly in Solaris, but it fails indeed in usd_view. We'll investigate, thanks !

sebastienblor avatar Aug 19 '22 17:08 sebastienblor

I have the same issue in Solaris,

  • add and HDRI
  • set camera vis to 0
  • render with hydra in viewport
  • the HDRI is still visible
  • same goes for multiple primvars on the light primitive that will simply be ignored by HtoA but these primvars are there.
  • behavior is seen in Arnold 7+ in both H19.0 and H19.5

Ahmed-Hindy avatar Aug 23 '22 09:08 Ahmed-Hindy

in our tests the issue reported here is working well in Solaris H 19.0. The regression gets introduced after USD 21.11 where these primvars are returned differently by hydra, but houdini 19 was still using usd 21.08. If there is an issue that also shows up with usd 21.08, then it will be a different bug

sebastienblor avatar Aug 23 '22 11:08 sebastienblor