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"

Office Holiday

Epic Games' offices will be on holiday from June 22nd to July 7th. During this period support will be limited. Our offices will reopen on Monday, July 8th. 

LERP between 2 materials

Just a quick question here really.

I have a player character that I simply want to make invisible, but I don't want him to immediately change his material to the invisibility material (just a basic opacity with refraction material). I'd like to be able to see the material transition slowly from one to the other.

I thought it was easy to do within the main player material (which is opaque), however when changing the material type to translucent, it loses it's glossiness and depth (literally just looks like a silhouette, even with 1 opacity)

Is there a way to do a LERP between 2 seperate materials (Not textures)?

Or am I going to have to do a harsh switch in material?

I found a node called "InterpolateMaterialInstanceParameters" which appears to be the only thing I can find that seems some-what relevant, however I'm not sure how it works and haven't been able to get it working. I plugged the player's material instance into "self" and "a" then selected the invisibility material inside of B, but ...no worky, probably because it's not what I think it's for :P

Anyway, help would be greatly appreciated, thanks! :)

Product Version: UE 4.10
more ▼

asked Mar 23 '16 at 12:01 AM in Rendering

avatar image

244 18 26 38

avatar image DP Studio Mar 23 '16 at 01:11 AM

Could try lerping through material functions and make another function containing the material breaks and lerps?

avatar image Otreum Mar 23 '16 at 09:41 AM

Hmmm, I'll need to look into material functions, I'm honestly not too knowledgeable with the material editor or materials in general, I just thought this might be a simple process and I have completely overlooked it haha.

I'll look into material functions and see how they work as I'm not entirely sure what you mean at all unfortunately :(

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

1 answer: sort voted first


You can use Layers for blend two or more materials. And of course you can dynamically adjust blending your materials.

alt text

This is example


blend01.png (521.1 kB)
more ▼

answered Mar 23 '16 at 12:00 PM

avatar image

8.4k 254 41 399

avatar image Otreum Mar 23 '16 at 10:10 PM

Thank you svv3dUDN :) This is very helpful, but unfortunately does not quite do the job.

One material has a blend mode of Opaque, it has an orange base colour, 0 metallic and 0.4 roughness, but no opacity or refraction channels etc, the other material is simply a Translucent blend mode material with 0 opacity and 1.1 refraction.

If I make the new material into an opaque one, and set the LERP value to 1 (should be fully transparent with refraction) the material just goes black.

If I make the new material translucent with a value of 1, it functions how it should, however if the lerp was 0, there is no metallic value, no roughness etc, it's just a flat base colour :(

I also tried to change blend mode to Masked, and tried to LERP between the 2 masks, but the orange colour only goes slightly darker as the mask goes from full white to full black up until a LERP value of 0.66, then becomes 100% transparent. I can change the opacity mask clip value which allows the colour to go darker as the opacity mask goes to full black, but still remains at 1 opacity until the threshold/clip value is reached before suddenly becoming invisible, but it's not a smooth transition at all.

I swear I have seen this done somewhere in UE4, I just feel kinda durpy that I haven't worked it out haha :(

(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