Material Parameter Collection not changing Opacity

Hi. I have a Material Parameter Collection controlling the opacity of my object. I use a timeline to lerp beteen 0 and 100 opacity. My problem is the opacity doesnt change at all and just stays completely opaque.


As far as i know this works. I know the timeline works 100% as i tested it with changing the color of the object but it just doesnt work with opacity.

I wonder 2 things:

  1. why your parameter name is in between quotation marks like ‘Opacity’ instead of Opacity like this

  1. why you have a drop down menu in Set Scalar Parameter Value? I don’t.

image

1 Like

Oh I get what you doing.

You trying to change the parameter of the main material.

You must create a dynamic material instance like this:

  1. you have a base material:

image

Then you create a dynamic material instance of it:

I also stored my material in a variable and assigned the material to a cube component

Then you can access the material variable and change the parameter like this:

image

Hope it helps :slight_smile:

@GernalIeal

TL goes from 0 to 1?

You say you can change the color, is that with the same collection?

And ( not sure about this ), does it need to be an instance? ( not at a machine right now ).

And… now that I see it. Of course, you need to go from 0 - 1. If you’re going from 0 - 100, you’ll probably miss the transparent part…

Thanks for this, seems my way was a little over engineered for such a simple result. After doing this and also changing my timeline to 0-1 instead of 0-100 as @ClockworkOceansaid, it works great.

2 Likes