Opiaa
(Opiaa)
November 7, 2017, 3:47pm
1
Hey!
I made a nice material for me, let’s say it’s just normal colour which would cover the whole mesh, for example: Imgur: The magic of the Internet
And I applied this to my mesh, but this mesh also have textures ( I mean, I have textures already done for this object)
How I can create something like - this object have this colour, but after 3 or 5 second (randomly) is changing and have textures?
Thanks!
Everynone
(Everynone)
November 7, 2017, 4:42pm
2
This could be approached in 2 (at least) ways:
have 2 separate materials and replace them after countdown using the SetTimerByEvent node
create a dynamic material instance with a parameter, use the parameter to switch between textures/colours
Opiaa
(Opiaa)
November 7, 2017, 5:23pm
3
Thanks! In the first way, should I just use normal blueprint? What type of blueprint? I’m sorry, I can tell that I am a bit new to UE4.
Everynone
(Everynone)
November 7, 2017, 5:47pm
4
Difficult to advise as I do not really know what you’re attempting.
I created a new actor with a cube inside. I manually placed in the level and:
I set a random time value between 3-5s, register a CustomEvent with a timer. The CustomEvent will fire every time the counter finishes, flipping between 2 materials.
Opiaa
(Opiaa)
November 9, 2017, 6:46pm
5
Yes! It’s exactly what I needed. Is there any way. to make this material change a bit slower? Or like a gradient. which would change this materials slowly?
Everynone
(Everynone)
November 9, 2017, 8:38pm
6
Yes, you could easily control it with a Timeline + lerp node + dynamic material. In this case you’d only need 1 material and lerp between 2 textures.
i tried that same thing thinking it would work earlier but it didnt seem to work