how to batch modify layer stack value ?

   2043   6   1
User Avatar
Member
306 posts
Joined: May 2007
Offline
Hi
here are many lights, and the primvar in layer stack is time dependent, I need change back to "Default value".
how to do it in python or wrangle?
I just need as long as it is time independent.
thank you!
Edited by luoqiulin - Sept. 15, 2022 11:25:15

Attachments:
layer_scack.jpg (267.8 KB)

https://vimeo.com/user3971456/videos [vimeo.com]
User Avatar
Staff
4200 posts
Joined: Sept. 2007
Offline
The Timeshift LOP may be the best bet; but if you can prevent it from being time-sampled in the first place, that's usually better in the long run.
I'm o.d.d.
User Avatar
Member
75 posts
Joined: Dec. 2017
Offline

Didn't find a good way to batch execute it in VEX.
But you can use timeshift LOP to remove timesample.



The TimeShift LOP extract the attribute at the specified time code and generate the attribute with the same name(with specify 'Over'). In this way, USD can overwrite the original attribute with timesample when compositing layers.

I think you can use python script to automate this process, just select flatten layer on final output. Then timesample will disappear.


goldleaf
The Timeshift LOP may be the best bet; but if you can prevent it from being time-sampled in the first place, that's usually better in the long run.
As goldleaf said, it will be more elegant if you directly output the layer without timesample when authoring the layer.

Attachments:
USD_timeSample.jpg (121.2 KB)
USD_timeshift.jpg (42.2 KB)
USD_timeSample.7z (25.9 KB)

User Avatar
Member
8839 posts
Joined: July 2007
Offline
Just out of curiosity as I'm still trying to understand USD
what are the downsides of having 1 timesample as in the screenshot?

1 timesample doesn't sound to me like anything time dependent, is it causing performance issues in USD or how does it differ from a single constant value?
Since from a smart system I'd expect it to recognize such case as constant
Edited by tamte - Sept. 16, 2022 00:49:55
Tomas Slancik
FX Supervisor
Method Studios, NY
User Avatar
Staff
4525 posts
Joined: July 2005
Offline
I don't think there is much (if any) difference in terms of performance. But I suspect having a single time sample (at what time?) would be more confusing and less immediately obvious as a non-animated value than using a default (which shows up as a different color in the scene graph details, for example).
User Avatar
Member
306 posts
Joined: May 2007
Offline
Didn't find a good way to batch execute it in VEX.
But you can use timeshift LOP to remove timesample.

timeshift is good enough, thanks!
https://vimeo.com/user3971456/videos [vimeo.com]
User Avatar
Member
306 posts
Joined: May 2007
Offline
tamte
Just out of curiosity as I'm still trying to understand USD
what are the downsides of having 1 timesample as in the screenshot?

1 timesample doesn't sound to me like anything time dependent, is it causing performance issues in USD or how does it differ from a single constant value?
Since from a smart system I'd expect it to recognize such case as constant

when I export lights to other dcc, such as katana. the string parameter with timesample can't be renconsized.
https://vimeo.com/user3971456/videos [vimeo.com]
  • Quick Links