- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
I am just starting to get my feet wet with OSL and need some help. I would like to control the index value on the OSL: 1 of N (color) node by scene frame number according to the following logic:
if frame number is < 100 then index = 0
if frame number is ≥ 100 and < 200 then index = 1
if frame number is ≥ 200 and < 300 then index = 2
I have connected the OSL: Frame Number node into the index input of the OSL: 1 of N (Color) node as shown below:
So I need to modify the frame number output in some way before it is fed into the Index input to be consistent with the logic I outlined above rather than a simple linear output of frame number. I looked for some OSL math node that might achieve this but came up empty. Maybe I just overlooked something?
I am sure there is a way using OSL language to modify either the Output of the Frame Number node or the 1 of N Color node or even write a stand-alone node to put between the 2 that does the math, but I would appreciate some help as to the best way to approach this.
Thanks for any help.
Solved! Go to Solution.