Announcement

Collapse
No announcement yet.

How To Create See Through Material That Allows to See Invisible Objects

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

    How To Create See Through Material That Allows to See Invisible Objects

    Hello,

    I would like to know if there is any way to create similar effect in Unreal Engine like in this video:

    https://www.youtube.com/watch?v=t46-nzisJa8

    ie creating a transparent object which allows to see the things that haven't been seen before.



    #2
    yeah you can do it by messing around with custom depth.
    you could also kinda do something similar with material masks to some extent. https://youtu.be/GXbE0IqbA7w

    I'll cover the custom depth method since it seems to be what is going on in your pics.
    I don't really understand why this method works but it seems to do so. It can probably be improved. Basically the mesh that you need invisible is a translucent material with the opacity controlled via some math I can't explain.

    (See the details panel rendering section of the mesh) Then the thing you look through should not be rendered in the main pass, but does need to 'render customdepth pass'. The thing you are looking through is an opaque material.

    When you don't render something on the main pass it becomes invisible so you'd need a duplicate translucent mesh in the same location with this method.(didn't test this part ... Edit: tested works)


    idk if it will work the same in the forward renderer, I only tested in deferred.(Edit: test in forward rendering, works correctly.)

    additional resource
    https://www.tomlooman.com/the-many-u...h-in-unreal-4/


    Click image for larger version  Name:	InvisibleThingMaterial.png Views:	1 Size:	306.4 KB ID:	1537423

    Click image for larger version  Name:	OpaqueThingToLookThrough.png Views:	1 Size:	71.6 KB ID:	1537422
    Last edited by IndieGameCove; 10-09-2018, 05:29 PM.
    YT Channel: https://www.youtube.com/channel/UCoc...KYPSK6g7vZ5CNg

    Comment


      #3
      I'm not sure you can do it to this extent in UE4 as we don't have any direct control over the order in which things are rendered like other engines.

      If you look at the material of the holographic sights in RoboRecall, that does some custom depth masking to draw outlines around enemies, I used this technique to draw a hologram effect over objects in a scene. As far as I'm aware, that's as much as you can really do.

      Comment


        #4
        Might be achieveable with a render target mapped to the screen space acting as a mask and your hand acts as a white brush.

        Comment


          #5
          wickerman123
          the method I mentioned does do exactly what is in the video. you're probably thinking that using the custom depth method you can only get a solid color or outline highlight effect which is generally true I guess, but this case is an exception.
          Last edited by IndieGameCove; 10-09-2018, 06:23 PM.
          YT Channel: https://www.youtube.com/channel/UCoc...KYPSK6g7vZ5CNg

          Comment

          Working...
          X