Announcement

Collapse
No announcement yet.

Decal on translucent Object

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

    Decal on translucent Object

    Hey,

    i try to get a decal projection on a Glass or translucent object. I´ve searched a lot, and found some older posts about this. Seems years ago it didnt work.....

    Is this the same today or is it fixed now and there is any trick or tipp how i can handel it?
    I´m want a sticker porjection on a Glass Hlafwall.

    Thanks
    Cheers Marc

    #2
    The issue is that decals require depth to project onto which translucent meshes do not render. You could work around this by having a second copy of the mesh that is "hidden in main pass" and set the material on that mesh to be opaque. It should render depths and give something to project onto but I haven't tried it yet.
    Ryan Brucks
    Principal Technical Artist, Epic Games

    Comment


      #3
      Still nothing?

      Comment


        #4
        Originally posted by RyanB View Post
        The issue is that decals require depth to project onto which translucent meshes do not render. You could work around this by having a second copy of the mesh that is "hidden in main pass" and set the material on that mesh to be opaque. It should render depths and give something to project onto but I haven't tried it yet.
        Tried. Not working

        Comment


          #5
          bah, any solution to this yet?

          Comment


            #6
            The workaround suggested does work, we use it all the time. The mesh needs a duplicate and it needs to have an oqaque material. It needs to be set to hidden in main pass.
            Ryan Brucks
            Principal Technical Artist, Epic Games

            Comment


              #7
              ok thanks, no luck so far but will keep trying.

              Comment


                #8
                Yeah i cant get this working at all, frustrating knowing that it works for you guys!

                Any other settings we might need to change for this to work?

                Comment


                  #9
                  Well my custom depth visualization just looks like unlit mode so i guess it has something to do with that. No idea how to enable custom depth properly.

                  Comment


                    #10
                    Originally posted by RyanB View Post
                    The workaround suggested does work, we use it all the time. The mesh needs a duplicate and it needs to have an oqaque material. It needs to be set to hidden in main pass.
                    I can't seem to get your suggested workaround to work.

                    I'm trying to get bullet hole decals to show up on glass meshes on hit events. I duplicated the glass mesh and duplicated it's material, setting the duplicates material to opaque. I then turned off collision on the translucent glass mesh, and unchecked Render in Main Pass on opaque glass mesh, then rebuilt the lighting. Still not showing up. The impact sounds and particle fx are correctly showing for the glass physical material, but the bullet hole decals not.

                    Is there something I'm missing?

                    Comment


                      #11
                      Hey guys,

                      Sincere apologies as I apparently gave some bad advice. I was incorrectly remembering how this works. Setting 'render in main pass' to be false does not allow writing to regular depth, but it does allow rendering to Custom Depth.

                      Regular decals will not work with it, but you can use a box mesh and use something similar to "Worldposition behind translucency" but using CustomDepth to replace scene depth. Then you can do you own decal projection in a material.
                      Ryan Brucks
                      Principal Technical Artist, Epic Games

                      Comment


                        #12
                        No worries,

                        Not being able to get this to work actually led me to a much better solution for what i was doing.

                        Cheers!

                        Comment


                          #13
                          Originally posted by RyanB View Post
                          Hey guys,

                          Sincere apologies as I apparently gave some bad advice. I was incorrectly remembering how this works. Setting 'render in main pass' to be false does not allow writing to regular depth, but it does allow rendering to Custom Depth.

                          Regular decals will not work with it, but you can use a box mesh and use something similar to "Worldposition behind translucency" but using CustomDepth to replace scene depth. Then you can do you own decal projection in a material.
                          Hey.
                          Could you give more details on that solution ?
                          I'm actually working on a Water Material, derived from the "Water Plane" free asset, the Ocean one but added Transluceny to it.
                          I'm trying to add some "wake" behind a ship that would move on the water, and the Decals sounds the easiest way to do it, but as mentionned not working on transperent surfaces.

                          How can I do the "ghost opaque" mesh solution ?

                          Comment


                            #14
                            If its just a water plane, I would just use a plane on the water, and if the water has some displacement, copy the displacement/wave logic into the 'wake' material and make sure it just has the same offset.
                            Ryan Brucks
                            Principal Technical Artist, Epic Games

                            Comment


                              #15
                              Originally posted by elec2ron View Post
                              No worries,

                              Not being able to get this to work actually led me to a much better solution for what i was doing.

                              Cheers!
                              Heya ! please enlighten us on that better solution! My life depends on it, jk jk!

                              Comment

                              Working...
                              X