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"

UMG - Setting dynamic material values on widget


I'm developing a first-person VR game and I want a blinking effect on my camera. To do that I have an instanced material called M_Blink_Inst which have some values that create the effect of a blink (simple). The material has "User Interface" domain. I created a widget called UMG_Blink that has just one image component which texture is my M_Blink_Inst.

To make it work, in another BP called BP_PlayerCar (is the player I'm using inside a car where the blinking effect should work) I add a widget component (which class is UMG_Blink) and a stereo layer component that is Face Locked and has the "Live Texture" checked. In an event called "Possessed" I get the widget class with the "Get User Widget Object" node, cast it to my UMG_Blink, get the Image from the widget and from there I get the "Dynamic Material" (which I think is my instanced material). Then with a Timeline and the "Set Scalar Parameter Value" I want to modify it on runtime but that is not happening.

In the game I can see the blinking material but it won't move anyway.

Hope you can help me out, PLEASE! I've been struggling a few days with this problem. Attached you will find some pics that may help you. If you need anything else, just let me know.

By the way! My first attempt was using post process materials... but I couldn't get the material through the Post Process Settings node to modify it...

Thanks in advance!

Regards, Jovimaca.

alt text alt text alt text

Product Version: UE 4.16
1.png (214.1 kB)
2.png (154.0 kB)
3.png (58.2 kB)
more ▼

asked Oct 25 '17 at 11:42 AM in Rendering

avatar image

13 2 7 10

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

1 answer: sort voted first

what you need to do is create a dynamic material instance and set a new brush on your image. Then you can change whatever parameter you want in your material.

alt text

more ▼

answered Oct 25 '17 at 07:29 PM

avatar image

844 9 17 30

avatar image Jovimaca Oct 26 '17 at 07:22 AM

Oh! Flash7 thank you so much for your help! I'll give it a try and I'll let you know!

Regards, Jovimaca.

avatar image Jovimaca Oct 26 '17 at 08:20 AM

Hey Flash7, sorry for the dumb question >.< How do you get the node that outputs from the "Image Charge" variable? I cannot get it... haha! I feel really dumb, but I've never used this kind of nodes.

avatar image Flash7 Oct 26 '17 at 02:07 PM

Not sure what you mean, but this is how I use it: alt text

avatar image Jovimaca Oct 27 '17 at 07:25 AM

Yeah! I solved it!

I'm now able to change values from my material on my umg with a Timeline. The problem now is that the material is not changing continuously but "by chunks" (I don't know if I'm explaining properly). I guess the problem is on my material...

Anyway, I'll give this question as solved since you really solved it! Haha! Thanks a lot!!

Regards, Jovimaca.

avatar image Jovimaca Nov 06 '17 at 10:09 AM

It was a problem related with the duration of the timeline and the rate of it. Everything's fine now!

(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