Force Visibility attr?
1797 4 2- Tim Crowson
- Member
- 235 posts
- Joined: Oct. 2014
- Offline
- robp_sidefx
- Staff
- 451 posts
- Joined: June 2020
- Offline
Yes and no
I'll start with "no". USD treats invisibility as a pruning operation, so if
But now "yes". Let's say you have this:
The invisibility can be shuffled downwards like this:
This functionality is provided in
I don't currently have strong opinions on if/how this could/should be exposed to users (other than I do think it's a bit strange as a new user that you can't flag a primitive as visible), but you can definitely run this via a Python LOP.
I'll start with "no". USD treats invisibility as a pruning operation, so if
/root/world/truck
is flagged as invisible, then it won't even look at anything under it (i.e., /root/world/truck/geo/alwaysShowMePrettyPlease
might as well not even exist). So as far as attributes go, it really is only "invisible" or "inherit".But now "yes". Let's say you have this:
/root
/world
/truck - INVISIBLE
/ geo1
/ geo2
/ geo3 - WANT TO MAKE THIS VISIBLE
The invisibility can be shuffled downwards like this:
/root
/world
/truck
/ geo1 - INVISIBLE
/ geo2 - INVISIBLE
/ geo3
This functionality is provided in
UsdGeomImageable::MakeVisible()
(https://graphics.pixar.com/usd/docs/api/class_usd_geom_imageable.html#af47f609f24c8023ddacc6d216eaef0f3)I don't currently have strong opinions on if/how this could/should be exposed to users (other than I do think it's a bit strange as a new user that you can't flag a primitive as visible), but you can definitely run this via a Python LOP.
- Tim Crowson
- Member
- 235 posts
- Joined: Oct. 2014
- Offline
Thanks, Rob. I'll check that out.
In my case I'm dealing with the possibility that an upstream department may be animating visiblity (e.g. as animated vis in an alembic file for instance, whose animation gets layered onto the object in the stage), and for whatever reason we may need to override this downstream.
In my case, it's more like I have this:
I'll take a look at UsdGeomImageable::MakeVisible(). That sounds simple enough.
In my case I'm dealing with the possibility that an upstream department may be animating visiblity (e.g. as animated vis in an alembic file for instance, whose animation gets layered onto the object in the stage), and for whatever reason we may need to override this downstream.
In my case, it's more like I have this:
/root /world /truck - INVISIBLE, AS INHERITED FROM THE ANIM THAT IS LAYERED ONTO IT (AND I WANT TO OVERRIDE THIS TO FORCE VIS) / geo1 / geo2 / geo3
I'll take a look at UsdGeomImageable::MakeVisible(). That sounds simple enough.
Edited by Tim Crowson - April 9, 2021 11:53:45
- Tim Crowson
Technical/CG Supervisor
Technical/CG Supervisor
- robp_sidefx
- Staff
- 451 posts
- Joined: June 2020
- Offline
Let's make sure there's no misunderstanding about "inherited" in this context. It doesn't relate to layering but, rather, scene hierarchy. So as long as
/root/world
isn't invisible, then you just need to ensure the strongest visibility opinion on /root/world/truck
is set to "inherited" and not "invisible".
- Tim Crowson
- Member
- 235 posts
- Joined: Oct. 2014
- Offline
-
- Quick Links