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"

Make brush from material, how?

Hello people,

I have to create a widget button that allows the player to customize the material applied to a certain static mesh. The Button contains an Image in order to display a Slate Brush for preview purpose.

My question is: How can I create a slate brush starting from a material? I know that there is a function called Make Brush from Material, and the following picture shows how I'm using it

alt text

But unfortunatelly the result is an empy picture (transparent picture) as shown below:

alt text

The widget is correct because if I apply any other brush to the Image it works.

Also the input material is always valid and the Cast function never fails because of previous code not visible in the picture.

This is how one button should look like: alt text

Am I using the function in the wrong way or it's a bug?

Thanks :)

Product Version: UE 4.16
Tags:
immagine.jpg (82.3 kB)
immagine2.jpg (109.7 kB)
immagine3.jpg (25.6 kB)
more ▼

asked Jun 21 '17 at 11:39 AM in Using UE4

avatar image

Kevor
1 1 1

(comments are locked)
10|2000 characters needed characters left

1 answer: sort voted first

You are using a UMG and a UButton with a UImage.

The UImage can MakeBrushFromMaterial (c++: SetBrushFromMaterial) but it will not be visible as long as the Material's Domain is not "User Interface".

I have not found a way to dynamically set the "Material Domain" to a material.

I suggest refactoring the UI interaction.

more ▼

answered Apr 23 '18 at 10:27 AM

avatar image

Constantin Suman
39 2 7

(comments are locked)
10|2000 characters needed characters left
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