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"

MakeMateriaAttribute error in Material Function

Version: 4.12.1

I want to use a switch in a material function with MakeMaterialAttributes but I have an error and I doesn't understand why. The error is too generic.

alt text

Error [SM5] (Node MakeMaterialAttributes) Error on property BaseColor

If I remove the switch, I don't have any error. alt text

The workflow is the same in both screenshot, it should work with both graph.

Product Version: UE 4.12
Tags:
mf_noerror.png (201.7 kB)
more ▼

asked Jul 12 '16 at 01:48 PM in Bug Reports

avatar image

mleblanc
1 2 3 4

avatar image mleblanc Jul 12 '16 at 01:49 PM

Actually it doesn't seem to possible to use a Texture Object with a Switch

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

1 answer: sort voted first

Hey mbleblanc,

This is actually intended as you are not allowed to cast between non-numeric types. I have provided a test image just for clarification as well.

Static Switch with Texture Objects

alt text

Unless you are on a tight budget or are worried about the number of texture samples used, you can still use the Switch node with regular Texture Samples.

Static Switch with Texture Samples

alt text

Let me know if you have further questions or need additional assistance.

Cheers,

Andrew Hurley

Let me know if you have further questions or need additional assistance.

more ▼

answered Jul 12 '16 at 05:08 PM

avatar image mleblanc Jul 12 '16 at 05:22 PM

So it's not possible to do that in a material function? I want to have a debug flag to disable a texture in a material function.

alt text

avatar image AndrewHurley Jul 12 '16 at 07:41 PM

No, the math will not be accepted for the material function either. The same rules apply. Is there a reason you cannot use a texture sample?

avatar image mleblanc Jul 12 '16 at 07:52 PM

Ok I switch to texture sample, it's ok since it's only for debug purpose. Thanks!alt text

mf_switch.png (217.4 kB)
(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