I'm trying to create an OSL shader which will select a different texture depending on which frame I'm rendering.

I don't need it to be in OSL but I have a mixture of texture groups each with a series of texture maps and I want to render every combination of each of them.

I thought I could setup a loop and iterate through an array to do so but I can't seem to figure out how to access the current frame information.


1 Answer 1


To access the frame info you could create a simple OSL script:

shader frame_node(
    int  frame= 1,
    color Color1 = color(0.8, 0.0, 0.0),
    output color Diffuse = 0)
    Diffuse = frame * Color1;

and keyframe the frame input socket accordingly. e.g.:

enter image description here


You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .