Posts

Showing posts from March 15, 2012

Expression - Reverse Seqeunce Frame Number

Today, I had the challenge of setting up a shot in Nuke that was shot in reverse. My CG element was rendered forwards. Therefore in the read node I needed an expression to evaluate the plate's current frame number to play in reverse. Frame range was 137-290. After thinking for a bit, I figured out the expression is lastFrame - (currentFrame - firstFrame). In my case this would be 290 - (frame - 137). (frame-137) would give me a positive zero-based frame number where if the current frame is 137, would return a zero. That number would be subtracted from the last frame of the sequence such that as the current frame increases, the relationship of the scan would be inverse and decreasing in frame number from the last frame, in the reverse order. This is just a reminder to myself in case I need to use this again :)