Hello there,
First post here so please excuse any misstep
I’ve spent the week on the same issue and I figured I would post a solution I think might work.
Before I start, all the credit to that video that triggered a Eureka moment for me: https://www.youtube.com/watch?v=qt3x64Grlq0
So to make this work with the take recorder you will need:
- A material with your parameter definition
- A material Instance (that step might be optional) with the parameter checked
- Your blueprint with your object and the material instance associated
- A variable for each parameter you want to change. That variable needs to be exposed to Cinematics and Instance Editable
- A function for each variable, starting with “Set” and then the name of the variable (what is commonly called a setter)
Here is a simple example step by step (sorry I had pictures ready but since it’s my first post, well, I can’t post them…):
First create a new Material (with a single RGB parameter)
Then create a new Material Instance (in content browser, right click on the Material you just created, create Material Instance)
After that, create a new blueprint and add a simple sphere static mesh.
In the details, set the sphere material to the material instance you’ve just created.
Add a Linear Color variable, named NewColor and set the Instance Editable and Expose to Cinematics flags for the variable (in the variable details).
Create a new function named after the variable (in my case SetNewColor) that has an input with the same type (here Linear Color).
Make sure to check “Call in Editor” in the details of the function.
In the function itself set the value of the variable and call the Set Parameter function directly on the static mesh
In the event graph, call the function after a delay of 5 seconds after receiving the event Begin Play
(Nothing in the constructor)
At that point if you drag and drop your BP into the take recorder, hit the play button, start recording, wait for the color to change and stop the game.
When you review the sequence you should see the NewColor variable changing after a few seconds.
The NewColor variable will evaluate to the Set Function, allowing the BP to call the Set Parameter. The sphere will change color as the NewColor variable gets updated.
Note 1: It’s good practice to have setters - even outside of this use case. In this use case it’s quite interesting because it’s not a code that is specific to the Take recorder or the sequencer, so the code (BPs) remains clean
Note 2: you can adapt this functionality to pretty much anything you want, not just changing material colors
Note 3: Why is it not working in take recorder? Because the take recorder can only record a limited set of tracks (transform…) and the properties exposed by the BP. Changing a parameter on a material requires to call a function, which is not observed by the Take Recorder, and there are no direct reference to the parameters in materials, as they need to be updated on the Game Thread (or at least this is what I gathered from my countless hours spent reading the source code).
I hope it helped!