emissive material turn on and off

hello guys
I made emissive material, everything is fine, but I want to have more control over on and off,
So my material is pulsing and I can change duration of that pulse but it is linear, and I dont want that. I want light to be off till 15 second of animation, then after 15 seconds to gradually turn on in 2 seconds be on 2 seconds and gradually turn off in 1 second. So time of duration would be 20 seconds but amplitude wouldnt be usuall sin or cosin but something like custom (dont want to play with BP I am amateur for that). I am making some animation and I have exact times when something goes on and off so it wont be just this 20 seconds light. Also put it in loop when finish. If I could make custom curve and implement in material that would be great, or there is other options with parameters or something else? Also I am not pro so be detailed as possible as it can be :slight_smile: Thanks

other options with parameters

This - most control. You will need a dynamic material instance in order to manipulate it:

A timeline will give you all the control that you need:

detailed as possible as it can be

  • the length of the anim can be set in the timeline
  • shift clicking in the timeline graph adds keys to the curve
  • right clicking keys allows you to set the way values interpolate
  • you can set it to Autoplay and / or Looping at the top
  • ensure the Parameter Name on the Set Scalar node matches the name of the material param - a common gotcha

It would look a bit like this, judging by the descriptio:


Bonus: you can load a timeline dynamically with an external curve if you decide that material now needs another run-time emissive pattern.

Also, you could probably leverage curve atlas for this:

When I see blueprint, i feel like i miss something and that I am not good enough :slight_smile:
Yes that is what I am looking for!
But there is another one solution but I think your have better control! I think of this while I was eating…
Use sequencer.
-in sequencer add actor (actor to sequencer), pick name of object that material or multiple materials are signed on
-click +Track and select mesh of that actor static mesh component
-then click in static mesh component click +track and find in material parameter element0 or element1 if you have multiple materials
-click on that material +parameter and add all parameters that you create in material (your instanced material)
-after that make keys on frames that you want to make changes
-use curve to make it how you want
-profit
:slight_smile:

Well I tried atlas already but have no idea how to leverage that parameter, and there is not too much info on internet about atlas curve, its all about color, I can make curve and have black and white texture (curve) that will represent my 0,1 and gradient that represent float, but I have no idea how to implement that (put time on curve atlas) as alpha channel between lerped 2 emission collors?I couple hours trying that till I found sequencer. If you can make step by step that would be great!

tried everything with atlas parameter but I guess I am doing something wrong, is it even possible to use this parameter for time curve in material editor? I guess I need more experience with functions in UE. Any help would be good

Probably this; just note the curve’s 0-1 space, so key precision is paramount.

Are you some guy

Just some guy. Epic staff will be marked as such in their signature.

First of all I don’t know how to thank you! It works!
If you ask me this is way that you have biggest control and easiest way to control emission on or off with effects like fade in or out. So there is 3 solutions for this: 1. For me best this one with atlas curve where you make your curve and have control in parameters over your emission. 2. Blueprint but that is more towards developers and programmers (I am not) 3. Also easy way in sequence but that is hard work you and not easy to adjust all timings because I have more than 16 emmision objects that are related one to another. What I didnt get it is why do you use RED on curve? is it because its vector? Can you post link or something related to this because I see a lot using red channel. Than why did you use frac and divide??? That is where I stuck its not clear in my mind?I just tried with multiply time and parameter and simple things like that. P.S. Are you some guy that is answering all question on answerhub or part of EPIC team? Thanks again!

What I didnt get it is why do you use
RED on curve? is it because its
vector? Can you post link or something
related to this because I see a lot
using red channel.

No reason as this has nothing to do with colours. We need a scalar value. You could pack 4 scalar curves into a single colour; think of RGB as of XYZ:

333667-screenshot-4.jpg

333665-screenshot-2.jpg

333666-screenshot-3.jpg

So the G can drive something else.

Than why did you use frac and divide

It’s about how Time works, this is what it spits out:

Image from Gyazo

We’re only interested in what is after the decimal since we’re dealing with 0-1. Frac discards whole numbers so we’re getting a 0-1 value over 1s. Now we need to stretch that 1 second over Duration hence the division.


Materials are not my strongest suit - learning every day. Today I’ve learnt a bit about Curve Atlas - first time user, ha! Previously I only knew about their existence and what they do (roughly), but never needed one. And this is surely a tip of the iceberg…

I’m not too artsy, probably the opposite of your skillset.

ok just a guy :smiley: how to make this answered does this Epic do or we have to do something?
I am not artist, engineer but use it mainly for visual presentation although i have some ideas for program usage. I got it with rgba so if i made all 4 lines same output in rgba would be same as single (proboably balck and white) and if i mix curves it would be different numbers, got it. So this curve was converted in gradient that in material editor color picker represent rgba numbers. Atlas looks like storage for different curves. Like you said curve works only in 0-1 space probably because texture 0,1 space so we had to divide in 20 parts and that is how we got 20 sec. I got it. If we didnt used divide we could use constant and insted 20 write 0,05 and got same time, but that would make mess if it was used by somebody who didnt create material to divide 1 by number of seconds that it need. This way it is perfect in inststance material. Nice move bro :smiley:

Yup, it all make sense.

Good luck with the rest!


And there should be a tickbox somewhere above to flag it as answered:

https://answers.unrealengine.com/static/how-to-use-answerhub.html

Hey, I’m trying to use this and the “NewCurveBase” won’t plug into the Curve slot in the material editor. The slot goes red when I try to drag it. Am I doing something wrong?

Appreciate any help, thanks!

This was exactly what I was looking for. Thank you for the awesome answer, @everynone It works like a charm ))

try NewCurveBase param to connect RED channel with B in multiply, and left in MATERIAL EXPRESSION CURVE ATLAS ROW PARAMETERS In CURVE you have to place your curve from Atlas I guess NewCurveBase named in your example

Hey thanks for your response! I switched it to the red channel but still can’t get the NewCurveBase to drag & drop into the Curve. Any ideas? I feel like I’m missing something obvious somehow. I’ve never messed with curves before.

my guess you didnt save NewCurveBase to NewCurveLinearColorAtlas. Open NewCurveLinearColorAtlas and on right side add element, add your New curveBase and try again to add curve in your material param. You can add multiple curves to atlas and then just switch curves.

Awesome, so helpful, thank you!! It is working now and this has made it so much easier to get a specific pattern for my emissive lights!
It’s currently working for what I want but for future uses, do you know of a way to place keyframes past 1 horizontally? This would make it possible to stretch the time out further but everything turns off if the keyframes go past 1 for some reason. I’ve attached an image of my three curves and how I’m progressing them towards 1 so it makes more sense what I mean by going past.