4
$\begingroup$

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.

$\endgroup$
5
$\begingroup$

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

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.