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"

Is there a way to make a material's "Two Sided" checkbox a parameter?

Hey all! Is there a way to expose the "two sided" checkbox of a material so it can be used by a blueprint and applied to a different material?

Obviously what I have here isn't going to work, but it's along the lines of the variable I'm trying to get.alt text

Thanks in advance!

Product Version: UE 4.15
more ▼

asked May 26 '17 at 06:50 PM in Blueprint Scripting

avatar image

25 1 3 8

avatar image KMClough May 28 '17 at 04:35 PM

Thanks guys! I dug around to see what I could do with your suggestions, and I think I'm close. My blueprint generates a material instance that is a copy of another one and I've found a node that can call up material property overrides, but it's being phased out. I want to be able to make a branch so it makes the copy out of the appropriate fading material, but it keeps running through as false. The base property overrides node is the one I found- I split open the pins to get the warning node above it where two sided is listed. I made sure to activate the override in the base material and set it to true, but I'm under the impression that my condition for the branch isn't doing much. (The set fade material on top is the two sided master, the bottom is one sided) alt text

update.png (227.3 kB)
(comments are locked)
10|2000 characters needed characters left

3 answers: sort voted first

Got it! So the easiest way is to just give the material instance a gameplay tag and compare it to get the bool working. alt text Thanks again for all the help guys, it definitely got me looking in the right places!

more ▼

answered May 28 '17 at 04:53 PM

avatar image

25 1 3 8

avatar image KMClough May 28 '17 at 05:24 PM

alt text Here's the altered snippet that actually works :)

thisoneworks.png (125.6 kB)
(comments are locked)
10|2000 characters needed characters left

It is automatically a Parameter in your Constant Material Instances. You can't change it at runtime.

Create a Material Instance out of your One-sided Material. Under Material Property Override you can override the Two-Sided Property.

You can then create a Dynamic Material Instance out of this Material Instance. As I mentioned, you can't set the Two-Sided at runtime! You have to change the Material (/-Instance) if you want to switch between Two and One sided

alt text

unbenannt.jpg (64.3 kB)
more ▼

answered May 28 '17 at 04:00 PM

avatar image

487 18 36 60

avatar image sdrb Apr 01 '18 at 01:42 PM

The easiest solution this one.

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

No, it is not possible to make that checkbox a parameter. You should create two different material instances and set two sided enabled for one of them. Then swap them in blueprints as needed.

more ▼

answered May 28 '17 at 03:47 PM

avatar image

7.7k 129 29 290

(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