x

Search in
Sort by:

Question Status:

Search help

  • Simple searches use one or more words. Separate the words with spaces (cat dog) to search cat,dog or both. Separate the words with plus signs (cat +dog) to search for items that may contain cat but must contain dog.
  • You can further refine your search on the search results page, where you can search by keywords, author, topic. These can be combined with each other. Examples
    • cat dog --matches anything with cat,dog or both
    • cat +dog --searches for cat +dog where dog is a mandatory term
    • cat -dog -- searches for cat excluding any result containing dog
    • [cats] —will restrict your search to results with topic named "cats"
    • [cats] [dogs] —will restrict your search to results with both topics, "cats", and "dogs"

Changing the material through blueprint

Hey! I made a blueprint which was suggested me in my previous question: https://answers.unrealengine.com/questions/723111/material-changing-from-one-created-to-normal-textu.html

Now I just wanted to ask how to implement a timeline there, to make the swap between those two materials more smooth?

Thanks!

Product Version: UE 4.17
Tags:
more ▼

asked Feb 02 '18 at 05:30 PM in Blueprint Scripting

avatar image

Opiaa
11 3 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

3 answers: sort voted first

It's pretty simple if you use dynamic material instance.

1.Create One material

2.Add both of your textures between which you want to change over time

3.Add Lerp node and connect it's alpha to scalar parameter, name scalar parameter since it will be the handle to change between two textures. Here's simple examplealt text

4.Now in construction script of actor create this nodesalt text

5.Now in event graph add this nodes.alt text

6.Add float track to your timeline so that in 3 seconds it will change float value from 0 to 1.alt text

thus whenever you press T, or it at any event's it will change material smoothly since we feed slider value to scalar parameter over 3 seconds.

1.png (280.9 kB)
2.png (56.1 kB)
4.png (107.6 kB)
3.png (39.9 kB)
more ▼

answered Feb 02 '18 at 06:15 PM

avatar image

Sardorian
412 8 4 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

Okay, I tried to do that. But the problem is:

I have two materials, one of them is holographic one which connects only with Emissive and Opacity in this material window. The second one is a compicated texture with normal map etc., both texures comes from Unreal Marketplace, so they have loads of stuff going on. And this second material (texture) goes to all of the rest.

Somebody showed me this method, but only if those two materials shared those plug-ins (Like for example Base Colour), so then I could really do lerp and it was alright. But in this case I don't know what to do.

How to use this method in this case?

This is the texture:https://imgur.com/a/Dp2sZ 9 (With almost ready lerps.) This is holo: https://imgur.com/swaBglW

more ▼

answered Feb 02 '18 at 08:37 PM

avatar image

Opiaa
11 3 4

(comments are locked)
10|2000 characters needed characters left
Viewable by all users

https://answers.unrealengine.com/questions/526514/about-lerp-between-2-materials-with-different-blen.html?sort=oldest

since both of your materials have different blend mode unfortunately right now you cant blend between them

But as i know new feature of 4.19 will be material layers, so i think with material layers it can be done.

more ▼

answered Feb 02 '18 at 11:17 PM

avatar image

Sardorian
412 8 4 8

(comments are locked)
10|2000 characters needed characters left
Viewable by all users
Your answer
toggle preview:

Up to 5 attachments (including images) can be used with a maximum of 5.2 MB each and 5.2 MB total.

Follow this question

Once you sign in you will be able to subscribe for any updates here

Answers to this question