USD prim visibility when in SOPs

   2453   5   0
User Avatar
Member
44 posts
Joined: Oct. 2014
Offline
Hi there fans of Tarkovski sci-fi,

I have a very simple USD file, basically a hierarchy that consists of a transform with with a mesh cube and a mesh sphere underneath. The cube visibility is set to hidden (`token visibility = "invisible"`).

Question:

- a) when I bring this in LOPs -- say with a file LOP node -- everything is cool. The cube is correctly hidden.
- b) when I bring this in SOPs -- say with a usdImport SOP -- the cube is visible.
- c) even worse: is I use a LOPImport SOP that imports the above a) from LOPs, the cube it is visible (in SOP)

So basically, SOPs seems to completely ignore the USD visibility.
Is this intended? If not how to easily respect it?

Cheers,

P

(file attached)
Edited by pbdj - June 14, 2022 00:13:22

Attachments:
visibility.usda (98.7 KB)

User Avatar
Member
336 posts
Joined: Nov. 2013
Online
In sops if you drop down a unpack usd to polygons you should get a usdvisibility prim attribute. From there you can do something like @usdvisibility=="invisible" in the group field of a visibility sop to hide the corresponding prims. I'm not sure why usd packed prims don't get a usdvisibility attribute. Hopefully just an oversight.
User Avatar
Member
336 posts
Joined: Nov. 2013
Online
Actually, assuming you have a path attribute on the usd packed prims it's one line to grab the visibility from whatever stage in a primitive wrangle (without unpacking to polygons):

s@vis = usd_attrib("op:/stage", s@path, "visibility");
User Avatar
Member
44 posts
Joined: Oct. 2014
Offline
Believe it or not I could not repro any of the two w/a you suggested (which I both undertand btw). I just cant manage to get the cube to be invisible.

BTW the unpack is not necessary because the usdimport is actually a digital asset and inside you can see it creates a lopnet, reads the usd file in lop and the lo-imports it into sop. There is then an unpack node built in, so can unpack from the usdimport directly.

Nevertheless, I think this needs to work OOTB. We cannot have artist in production have to know it, sadly. I will ping SESI support as I believe this really needs to work OOTB.
User Avatar
Member
336 posts
Joined: Nov. 2013
Online
Agreed there should be toggle for this. I attached a scene demonstrating my original example in a sop modify although thinking about it some more this probably doesn't handle inherited invisibility correctly.
Edited by antc - June 15, 2022 12:12:59

Attachments:
visibility.hipnc (139.9 KB)

User Avatar
Member
1 posts
Joined: July 2016
Offline
Hey there!
For people coming from a search engine finding this, there is now an option on the SOP unpack usd : "Import Computed Visibility"
A hero isn't the one who always wins. It's the one who always tries. – Spider-Man (Miles Morales)
  • Quick Links