We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.

Changing materials on every loop of an animation.

Home Forums Puzzles Changing materials on every loop of an animation.

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #64394
    vergecurious
    Customer

    Hello again,

    What is the puzzle logic for changing materials in an object or background in a scene after every loop of an animation. Let’s assume we have three materials or backgrounds and I am using an animation frame as a trigger.

    Thanks in advance.

    #64396
    xeon
    Customer

    you could just use two nested puzzles:

    on animation “MyAnimation” frame “the end frame”
    do
    assign material MyNewMaterial to object(s) “myObjects”

    Attachments:
    You must be logged in to view attached files.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #64410
    vergecurious
    Customer

    That works fine if you only want to change the material once. Using your puzzle what if you have three materials and you want to change it every time the animation goes to frame 100 in a loop?

    #64411
    xeon
    Customer

    You can add an if else loop. Be sure to add global variable to initialize it.
    the other puzzles would be placed after the play animation puzzle.

    • This reply was modified 10 months, 3 weeks ago by xeon.
    Attachments:
    You must be logged in to view attached files.

    Xeon
    Route 66 Digital
    Interactive Solutions - https://www.r66d.com
    Tutorials - https://www.xeons3dlab.com

    #64415
    vergecurious
    Customer

    Hey thanks. I got it to work:-)

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.