How to Set Scalar Parameter Value to change from 1 to 0 over a second

“Set Material” Node > “Set Scalar Parameter Value on Materials” Node

I want to change the parameter value from 1 to 0 over the span of 1 second. Add timeline doesn’t come up as an option… im trying to do this in an Actor Component.

Hi,
you could create a Timeline
image
then open it and add a float track by clicking on the big + in the top left corner and just next to it set the length to 1 second.


Add two points on the curve, set first one to 0; 0 and the second one to 1; 1.

On Update the value will change according to your curve setup and once you reach the end of the Timeline, the Finished pin will fire.

Add timeline doesnt come up as an option… im trying to do this in an Actor Component.

I seem to understand that you are thinking of a performance issue

This is how I do it and use it heavily in my projects,

In this way, a standard interpolation change is obtained in the material, and the change duration supports scaling and flipping

You could add the timeline in the actor that uses the component and feed the value into the component.

As for you @Prairie, why do you have a divide node when you’re dividing by 1? Also, I believe that the saturate node would be cheaper than the clamp at the end

This is only used to control the interpolation change time, if you divide by 2, your interpolation change time will become 2 seconds

Can you elaborate as to how I would go about doing this?

Can you explain this a bit… sort of new… what node is “time” and “alpha” and “float”

so many options come up

it the red dot a collapse of the screenshot below?

The material node contains a time node, which will increase according to time, and the blueprint also has a function to obtain time. When you need to interpolate, set the game time obtained by the blueprint to the material, and the difference between the two times will start from 0. increase, from 0 to 1

alpha mainly controls flipping, if alpha=1, time interpolation is from 0 to 1, if alpha=0, time interpolation is from 1 to 0

I re-uploaded the screenshot:

1 Like

I dont know what im doing but if i right click and type “time” I dont see a node that just says TIME. I do see it if i go into the material graph… do you mean that i shoud:

  1. open the material, go to its material graph

  2. copy the code there for your second screenshot

  3. Use the top screenshot in my blueprint

??

The first picture is the blueprint
The second picture is the material

Just added 10 nodes with different scalar values with a delay in between… dirty but it got the job done.

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.