PixarAnimationStudios / OpenUSD

Universal Scene Description
http://www.openusd.org
Other
6.12k stars 1.22k forks source link

inclusive/exclusive stage time range docs #1482

Open dgovil opened 3 years ago

dgovil commented 3 years ago

The documentation on a stages time range implies an exclusive range, whereas I think USD uses inclusive ranges.

https://graphics.pixar.com/usd/docs/567231471.html says We will use USD's cinema default of 24 frames per second, and design the spinning motion to repeat after 192 frames, or 8 seconds but has

usda 1.0

( "Step 1: Start and end time codes" endTimeCode = 192 startTimeCode = 0 upAxis = "Z" )

However, 0-192 in inclusive ranges should be 193 frames, not 192. Therefore I believe either the start should be 1 or the end should be 191

spiffmon commented 3 years ago

Hi @dgovil , Thanks for pointing out that the documentation (both SdfLayer and UsdStage) could be more explicit - we'll use this bug to track enhancing it. You are correct that our intention is that the range is inclusive of endTimeCode, which I believe is the behavior you see in usdview. Many of our shots internally have a startTimeCode of 101, for example. I didn't dig super-deeply into the tutorial you reference - are you saying it's problematic for it to start at frame 0 for looping purposes? If so, I agree we might want to update it to start at frame 1, as well.

dgovil commented 3 years ago

Hey Spiff, So I think it's fine for it to start on frame 0 (I didn't actually check for how the loop looks? Not sure if it stutters or not). The issue was that it described it as 192 frames of animation, but it should be described as 193, or either the start/end should be pulled in by a single frame to make it 192 if that was the intended range. It just caused some confusion in a discussion so I just wanted to flag it.

spiffmon commented 3 years ago

Ah - got it - thanks!

On Mon, Mar 29, 2021 at 2:44 PM Dhruv Govil @.***> wrote:

Hey Spiff, So I think it's fine for it to start on frame 0 (I didn't actually check for how the loop looks? Not sure if it stutters or not). The issue was that it described it as 192 frames of animation, but it should be described as 193, or either the start/end should be pulled in by a single frame to make it 192 if that was the intended range. It just caused some confusion in a discussion so I just wanted to flag it.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/PixarAnimationStudios/USD/issues/1482#issuecomment-809734593, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABPOU2G2EPA5CLXMMY7ES4DTGDYD3ANCNFSM4Z73IQTA .

-- --spiffiPhone

jilliene commented 3 years ago

Filed as internal issue #USD-6628