Announcement

Collapse
No announcement yet.

Switching render texture surfaces

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

    Switching render texture surfaces

    Hello.

    I am currently trying to set up a security-camera like system in which a player can Touch a Trigger which will change what TextureRenderTarget2D a certain Material is referencing.

    Currently I have 2 SceneCapture2DActors successfully capturing their scenes and mapping them to a single face of separate cubes. I also have a large "television" on the wall which is just a BSP brush with its front face referencing the same material as one of the other cubes. So, I have two small cubes displaying the feeds of camera A and B. I also have a large TV on the wall displaying the feed of camera A.

    My question is this:

    How can I Touch a Trigger so that I can have the television display the feed of camera B? Can I get a handle on the material being applied to the brush face so that I may change its TextureSample reference? This is less than ideal, I believe, because it will also change the other instances of the material so that they display camera B's feed. With any luck, I can actually switch the material on the face of the television.

    Thank you.

    #2
    Don't know about a BSP but with a model you can Set Material from Kismet. So if you replace that BSP face with a model, that's what you can do.

    Alternate way possibly, this is just a theory, is to set up a Lerp node with your 2 textures and use MatInstConstant to be able to lerp between the two. This is probably more hassle considering you don't probably care to blend, just switch.

    Comment


      #3
      That's an idea. If I interpolate over a single frame it could work.

      I am more intrigued by the idea of using a model with a Set Material node however as I will probably be using a model in the future.

      I have only been at this for a week so let me make sure we're both talking about the same thing. You are suggesting I create a static mesh and switch its material using Kismet, correct? How should I go about this?

      Thanks for the help.

      Comment


        #4
        Yeah,

        You set up your trigger, however you wanna do that with Touch or Used or whatever trigger method you want. Hook the SetMaterial node on there and make the target your model and give it the material in there to set.

        If you wanna be able to keep using the trigger and it keeps switching between them then you can use a Switch node, make it loop, not randomly and give it 2 outputs. Then hook a SetMaterial from the 1st switch output and copy it and hook it into the 2nd output. So now you have 2 SetMaterial nodes. For the 2nd one give it the original material. Also remember to set your trigger amount to 0 to be able to trigger infinite amount of times.

        You would need to make the mesh that you place for this an interpActor. Because static mesh is just static and you can't change things on it during game play unless you use material instances on there.

        Comment


          #5
          OK, I'm on my way!

          I now have the material successfully mapped to an instance of the S_HU_Deco_SM_Metalbase01 mesh as an InterpActor. However, the UV coordinates are definitely not what I need.

          I only want the material I apply to be placed on the front (flat) side of the material. The other side should either remain as it was originally or I should be able to apply a separate material to it.

          How can I adjust either the texture or the UV coordinates so that I map the texture successfully?

          And thank you for your help.

          Comment


            #6
            You're gonna be better off to make your own model and map it as you need. Using the existing UDK model means to make any changes to it you'll need to export it, import into 3D software and make the changes and then get it back into the UDK as a new model.

            In your case you want to create a screen so all you need is a flat plane to form the screen. So, I would suggest that's how you approach that if you can.

            Comment


              #7
              Great, thank you. I'll try my hand at making a monitor of some kind.

              Comment

              Working...
              X