Announcement

Collapse
No announcement yet.

Special "Mesh-DisAppearing-Material"

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

    Special "Mesh-DisAppearing-Material"

    I saw a video in which meshes were only visible in a certain radius around the player, now I'm curious how to make such a shader.

    #2
    Here's a quick example of what makes the transition between two materials at a distance.

    In short, it's using PixelDepth as the Alpha of a Lerp. The image also shows examples of parameters for different instance materials. You don't have to setup all the parameter, it's just extra nice.

    Change the Close_Diffuse and Far_Diffuse to whatever you want to switch between.

    [shot]http://chrisholden.net/udk-pixeldepth-1.jpg[/shot]

    Comment


      #3
      Wow, thx..
      Now, how would I kind of clamp the transition, so there's no smooth transition, but a harsh change from A to B ?

      Edit: Solved, I used a "Floor"

      Comment


        #4
        Ok, so, on meshes the shader is working...now I tried building it into a post process chain. I made a copy of the UTPostProcess chain, and added a material effect after the FXHitEffect. My post process material is the setup as above, though the diffuse parts are both Constant3 Vectors...I connected the lerp to the UV node of a Scene Texture Sample and the Scene Texture Sample to the Emissive node. The material is Translucent and Unlit, and use with Material Effect is checked. Problem is, when I set my PostProcess Chain as the World Post Process Chain, I only get a black screen...kind of disappointing

        Comment


          #5
          SphereMasks work better for this, imho.

          Comment


            #6
            What do they work better for? The post processing? The material? Or the harsh transition?

            Comment

            Working...
            X