Announcement

Collapse
No announcement yet.

Material Instances

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

    Material Instances

    I'm currently trying to figure out how to switch the "on" texture in a material for a work light for one that's "off." I used the 2D Texture Param expression but when you go into Kismet there is no Set TextureParam action like there is in Unreal Engine 3. The only option in UDK is Set ScalarParam, but I'm pretty sure that's not what I need. Where did the "Set TextureParam" action in UDK go? Is there a substitute or a different way to go about this process now?

    #2
    I do not know where it went, but as workaround:

    use variable scalar node, multiply it with one texture then use (1-x) to multiply it with another texture, add both textures outputs, it will flip textures, and you should get same effect as replacing texture. Or just use linear interpolation to switch textures.

    Comment


      #3
      Ok, so I need the player to step on a trigger which switches the light from an "on" to an "off" state. Doing this should work? As far as Kismet goes, what should I do?

      Comment


        #4
        I really don't mean to be a bother, but I've been trying to figure out how to get these lights to work for a long time now. I would imagine someone has dealt with this problem at one point. Correct?

        Comment


          #5
          Just add the emmissive node to a 2nd texture parameter using your other texture. Or add the 2nd texture to your first in the diffuse slot. Multiply the 2nd texture by a parameter* named something like "lightbrightness" and set that to 0. It's then basically adding 0 to your first texture.

          *Just hold "4" and click in the material window. Then right-click and convert to parameter.

          Now create a material instance time varying from the base material. Now in matinee you can add a new group and the control the float material parameter. Be sure to assign the material instance and type in the parameter name "lightbrightness".

          Animate the "lightbrightness" parameter from 0 to 1 however long you want it to take. Tie the trigger to the matinee sequence and the texture will light up with your 2nd texture.

          Comment


            #6
            I don't know if its just something I did wrong (I hope so) but this could be a bug in the latest udk release.
            I cannot affect my material instances using a scalarparameter in Matinee and only in Matinee. I have tested my triggervolume touch even on just a set scalarparam and that works, but using matinee and doing the whole Float material graph thing doesn't work.
            I can get Matinee working with moving staticmeshes.
            Do you think its something to do with my materialinstanceactor? I place the actor on a random place on my map (doesn't seem like it can go anywhere else).

            Comment


              #7
              okay so I've managed to get the smooth material transition with the matinee working. I heard that matinee doesn't work with csg meshes so I did it with a static mesh.
              However, I still have the problem of doing this with postprocesseffects. When I step into a triggervolume, I can activate my custom material postprocesseffect, but I cannot get it to transition smoothly. Simultaneously, I can see the same material I used on one of my static meshes transition smoothly.

              Comment


                #8
                To change the smoothness of the transition for the post process volume, under settings change the DOF_Interpolation Duration
                Hope this helps
                Team13

                Comment


                  #9
                  thanks, but I'm not using a post process volume because it does not have custom material effects built into it. I'm using a trigger volume with kismet where I activate a change in the default postprocesschain so that I can get the same results as I would get with a postprocessvolume (except it would be with my own custom materialeffect).
                  I've decided to give up matinee and try using a timevarying material instance instead this time so that I can just have the material fade in when its activated - however, the new problem now is that everything inside the scalar parameter values keep resetting when I close the window and open it again.

                  Comment


                    #10
                    okay so I've just managed to figure out what I've done wrong - i didn't have the override box checked so it kept resetting to default. Now that I've got that I want to try to get my material to fade in - however, it only activates when I set it on loop - and I only want it to fade in once and then keep going.

                    Another problem I notice is that there is no automatic zeroing of the time - i.e. when I start the level, the material will start at a random time.

                    Comment

                    Working...
                    X