Announcement

Collapse
No announcement yet.

How to Edit Post Process Material Parameter

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    How to Edit Post Process Material Parameter

    I'm using a Post Process Material (Click here for an example) to adjust the in-game Gamma. I would like to give the player the option to adjust the Gamma (like a slider). The only problem I'm having is I have no idea on how to edit a post process material's parameters. I know how to do this for regular materials, but that method doesn't seem to work for post process materials. I cannot find out how to obtain a dynamic instance of the material, so I can edit it using Blueprints. Any help is greatly appreciated. I'll post a picture of the material.

    Click image for larger version

Name:	gammacorrection.jpg
Views:	2
Size:	56.4 KB
ID:	1142360
    Last edited by drb1992; 12-29-2014, 03:15 PM.
    Logitech Wheel Plugin

    #2
    First add a PostProcessComponent to your character.



    Then




    What we are doing here?

    So, we add a postprocesscomponent to my character.
    Then on The Begin Play event we create a new Dynamic Material Instance and we store it in the variable MYPPMAT (My PostProcess Material).
    After that we set the component to unbound and then we assign the new material instance to postprocesscomponent settings.
    On the key event P and M we get a reference to material and we read the scalar parameter name value of "Gamma" and we add/subtract 1, after that we set the new value.



    Surely exists some better solution. You are free to find it.
    Last edited by Komahz; 12-29-2014, 09:29 AM.

    Comment


      #3
      That did the trick. Thanks a lot. I didn't even know you could add a post process to the character.
      Logitech Wheel Plugin

      Comment


        #4
        Trying to do the same thing in 4.10 (creating a dynamic blendable material instance) and I get the following warning from my "Make Post Process Settings" node:
        "Warning Blendables - the native property is not tagged as BlueprintReadWrite, the pin will be removed in a future release"

        So, how do we change blendable parameters on the fly, then?

        Comment


          #5
          Yeah, I get that same error too - which also prompts a crash of the engine, every time.

          Comment


            #6
            Originally posted by SVR33 View Post
            Trying to do the same thing in 4.10 (creating a dynamic blendable material instance) and I get the following warning from my "Make Post Process Settings" node:
            "Warning Blendables - the native property is not tagged as BlueprintReadWrite, the pin will be removed in a future release"

            So, how do we change blendable parameters on the fly, then?
            +1 over here. What to do without the Blendables-node?

            Thanks,

            Comment


              #7
              +1 Is there any solution?

              Comment


                #8
                You need to use "Add or Update Blendable" node

                Comment


                  #9
                  Originally posted by Ignisor View Post
                  You need to use "Add or Update Blendable" node
                  How do you make a blendable object from a material instance dynamic?

                  Comment


                    #10
                    Originally posted by xnihil0zer0 View Post
                    How do you make a blendable object from a material instance dynamic?
                    Hey Xnihil0zer0, any luck with this? I've come back around to this problem and I'm stuck in the same place.

                    Comment


                      #11
                      Nevermind, I've got it. For anyone else who's wondering, this (recently updated?) doc covers it.

                      https://docs.unrealengine.com/latest...les/index.html

                      Comment


                        #12
                        Originally posted by Ignisor View Post
                        You need to use "Add or Update Blendable" node
                        Thank you! [MENTION=43160]Ignisor[/MENTION]

                        Comment


                          #13
                          Hi. This pin was removed.
                          You should now do the following>
                          Make WeightedBlendable from the Dynamic Material Instance
                          Make Array from the result
                          Make WeightedBlendables from the result
                          Pass it as "Post Process Materials" to Make PostProcessSettings

                          Comment


                            #14
                            In 4.16 there is a warning "The native property is not tagged as BlueprintReadWrite, the pin will be removed in a future release."
                            Twitter | Twitch | Instagram

                            Comment


                              #15
                              Thanks benT9 . I went the long way around for that nugget of info
                              http://unrealdeveloper.uk

                              Comment

                              Working...
                              X