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"

Why does my Switch Param in the material editor not work in post process?

Hello everyone. I've been doing some post process stuff but I'm having problems with StaticSwitchParameter. Look at this example:

alt text

Then I have a material instance and there I can enable and disable "EnableTest" and the color changes on the material preview. That material instance is applied as a blendable in a post process volume. However, in-game it only shows the color corresponding to the default value of "EnableTest". Changing the value in the material instance does not have any effect in-game, only in the material preview. Other post processing stuff I've been testing worked fine in-game.

I'm missing something or is this a bug? Thanks.

Product Version: Not Selected
mat.png (50.1 kB)
more ▼

asked May 24 '14 at 01:51 PM in Rendering

avatar image

345 24 22 202

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

1 answer: sort voted first

Hey PacoChan -

How do you have your post process volume setup to accept your Post Process Material?

Switches are not supposed to be dynamic in nature. They are meant to control which of two choices are being rendered at compile time and the other side of the tree is ignored. If you want a setup like that which is dynamic in nature use a scalar parameter to LERP between the two options that way both sides of the tree are rendered and can be switched up dynamically.

Thank You -

Eric Ketchum

more ▼

answered May 25 '14 at 03:34 PM

avatar image

Lovecraft_K ♦♦ STAFF
36.6k 703 260 737

avatar image PacoChan Jun 03 '14 at 01:59 PM

I'll do it that way then. Thanks for your answer.

avatar image devast3d Nov 05 '14 at 04:13 PM

I'm also having similar problem. Chaning StaticSwitchParameter in the MaterialInstanceEditor does not affect anything..

avatar image DotCam Nov 05 '14 at 04:42 PM

That should work properly in the Material Instance, but because it is a Static switch you cannot change the value later on from a blueprint for example using a DynamicMaterialInstance. I too have had some issues with the StaticSwitchParameter though.

Try using a regular switch statement and plug in a StaticBoolParameter to change the value, I can confirm this will allow you to change from an instance as I use it in a few materials.

Hope that helps!

avatar image Onoa Mar 21 '15 at 03:27 AM

Unfortunately, using a Bool doesn't work either when the material is used inside a Post Process. The only solution is to change it inside the material and recompile it it seems.

Also, the static switch setup or even the bool, doesn't work in editor mode, so it's not possible to easily preview a material using this setup, even if it's not intended to be real-time changed.

So in essence, the preview mode doesn't work in editor mode.

(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