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 material in blueprint

Hello Unreal Community,

I have a question regarding changing materials dynamically from blueprints.

I change the material from blueprint as the image above but when the changing initializes the material does not apply. It lefts the character without any texture.

How can I solve this problem?

Thank you!

alt text

alt text

alt text

Product Version: UE 4.19
Tags:
1.png (592.4 kB)
2.png (516.1 kB)
3.png (585.5 kB)
more ▼

asked Jun 24 '18 at 10:41 PM in Blueprint Scripting

avatar image

MateiSoft
1 1 2 1

avatar image Nebula Games Inc Jun 25 '18 at 02:18 AM

Try casting to your player character not directly trying to change the mesh material from "get player character" node.

avatar image MateiSoft Jun 25 '18 at 07:00 AM

Hey!

Thank you for the reply! So

So you say not from "get player character". I try to change the material from a HUD blueprint. How can I change the material as you say, directly to my player character? If I try to cast just from the node, it brings the capsule variable.

Thank you!

alt text

4.png (536.0 kB)
avatar image MateiSoft Jun 25 '18 at 07:11 AM

BTW. If i drag and drop the material on the character, still doesn't apply. But on other objects, it applies. Other materials on the character works.

avatar image MateiSoft Jun 25 '18 at 07:53 AM

So, the same materials that work, i copy and pasted them and it works... but with those tried, it doesn't work. So I think it's not the matter of blueprints... correct? If so... what happened with those materiales that didn't worked?

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

1 answer: sort voted first

Hey,i think the material is not correct. you need convert the texture to parameter then create dynamic material instance in your blueprint. in the last,use node set texture parameter(maybe),apply the dynamic material instance to your character.

more ▼

answered Jun 25 '18 at 08:31 AM

avatar image

lynnVon
1 1 1

avatar image MateiSoft Jun 25 '18 at 11:48 AM

is it necessary? I mean, it's an independent material. Not just one applied to the character and then try to modify the main one applied. Is it necessary also for an independent one?

avatar image lynnVon Jun 26 '18 at 01:26 AM

If you want to change the material dynamically,you need do this. And the material is still independent

(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