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"

How would you change and revert and object material?

Hey guys, I was wondering how to change a material of an object and later be able to change it back to the original material. I am using a blueprint that allows me to pick physics objects up off of the floor and my final goal is to change the material to a less opaque material while I am holding the object, then simply change the material back to the original when I set the object down. I am having no trouble changing the material the first time, however, I cannot simply set the material back to the original because not all physics objects that I will be picking up have the same original material. Is there a way to possibly overlay a material and revert back to the original after I set the object down, or is there any other way of accomplishing this effect? Thanks.

Product Version: UE 4.8
Tags:
more ▼

asked Aug 12 '15 at 03:45 PM in Blueprint Scripting

avatar image

Anaklosmos
190 35 29 54

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

1 answer: sort voted first

You can store the initial material in a variable of type Material, then use that variable as input when you want to revert to your original material.

alt text

If you want to basically keep using the same material and only change one value, you could also use dynamic materials. These are more complicated to set up but very powerful. You'd probably have to make all your objects' materials dynamic, so depending on the size of your project this might not be feasible.

If this interests you, check out this tutorial series (particular parts 9 and 10): https://wiki.unrealengine.com/Videos?category=Materials

more ▼

answered Aug 12 '15 at 05:35 PM

avatar image

erinacea
1.8k 69 28 115

(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