Announcement

Collapse
No announcement yet.

Edge Detection PostProcess Feedbacks

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

    Edge Detection PostProcess Feedbacks

    Hi everyone,

    I've been working on an edge detection post process last week and I would like to share it with you.

    First, few screenshots to show you the result :










    To summarize :

    I started from this tutorial that use a sobel operator.
    http://www.michalorzelek.com/blog/tu...round-objects/
    (a great start if you want to understand how edge detection works)

    I modified the texture sample to add more details to the edges. Instead of just using the depth, I converted the world normals to view space and created a Vector3 with (Normal X, Normal Y, Depth).
    (Inspired by a post from William Chyr and Lucas Pope)
    http://williamchyr.com/2014/05/revis...dge-detection/
    https://forums.tigsource.com/index.p...558#msg1025558


    I also added a falloff to reduce the intensity of the normals and the depth, so I avoid noisy details in the distance. I used a log2 falloff to keep some nice details at close distance even with a high max distance.
    The normals and depth have a different falloff. I find it nicer when the depth maximum distance is higher to just have the outlines of far objects.

    I share the blueprints (sorry for the bad screen quality but if you know how to take good quality screens of BP, just tell me), feel free to use it or modify it.

    If you have any feedback to improve the detection quality, optimisation tricks, or any feature that you might think could be useful, tell me.

    I hope it will help you








    Attached Files
    Last edited by Guthmann; 06-26-2017, 01:17 PM.

    #2
    Cool, looks great! Thanks for sharing.

    Comment


      #3
      I've been trying to figure out something very similar to this - thanks for sharing!

      Comment


        #4
        Thank you a lot for that mate

        Comment


          #5
          Originally posted by Guthmann View Post
          or any feature that you might think could be useful, tell me.
          Any chance of a download link?
          Any engine version will do...

          Comment


            #6
            great work, thanks!
            Rocketeer

            my portfolio
            my youtube

            Camera Volumes System
            Procedurally Instanced Meshes
            Simple Portals
            Water Flow For UDK
            Setup Swarm

            Comment


              #7
              I'm trying to recreate this from your BP diagrams, but it's not working. Any chance you could share the materials/project?

              Comment


                #8
                [MENTION=214437]Guthmann[/MENTION] I noticed some artifacts in 4.17 when using the thinnest line width (0.5). Maybe 0.5 isn't supposed to work?

                Comment


                  #9
                  Actually a super cool implementation! Nice and easy to follow






                  D/L the version I put together. I made some small changes to the UV inputs before the depth/image combination to allow for small tweaks to the final output. Really gives it a drawn look, I think. Also added lighting to it too, so it affects depth, colour, and lighting.
                  Last edited by Construc_; 08-17-2017, 08:29 AM.

                  Visit my portfolio: jhgrace.com

                  Comment


                    #10
                    Wonderful stuff, thanks for sharing. All I can really think of myself that can be added in as a feature is, have the line thickness able to be determined based on distance, if possible. I dont know very much about graphics programming, so I cant try it for myself. Could that be done easily?

                    Comment


                      #11
                      Also Construc_, would you be willing to make a bare bones project of these files working on there own so they can be migrated into other projects? Having the .uassets by themselves doesnt connect the references to each other and it breaks the material and has other issues. If so, that would be pretty sweet

                      Comment


                        #12
                        Good work, Thanks for sharing !

                        Comment


                          #13
                          Is there any chance to recreate the material to use on normal material that is not PP so I can apply to specified object? I've tried to change Scene Texture nodes in NormalDepthCombine function but it does not work with any regular nodes. Any ideas plz?

                          Comment


                            #14
                            Originally posted by Anh B. Nguyen View Post
                            Is there any chance to recreate the material to use on normal material that is not PP so I can apply to specified object? I've tried to change Scene Texture nodes in NormalDepthCombine function but it does not work with any regular nodes. Any ideas plz?
                            You can apply it to specific objects using a stencil instead.

                            https://answers.unrealengine.com/que...-material.html

                            Comment


                              #15
                              Originally posted by cyaoeu View Post

                              You can apply it to specific objects using a stencil instead.

                              https://answers.unrealengine.com/que...-material.html
                              yeah, I did. It worked well but there is one thing that this PP material does not work with transluency. Already tried reodering PP before transluency but does nothing. I posted my question in UE4 Facebook community as well and someone told me to fix the MF. So I think I might get a proper answer here
                              https://www.facebook.com/groups/ue4d...1778071020557/

                              Moreover, the edge dectection material is far more useful to implement curvature shaders such as soften the edges so I'd like to try on paticular mesh.
                              Below is the effect I want to recreate in UE4.
                              Last edited by Anh B. Nguyen; 07-10-2019, 09:59 AM.

                              Comment

                              Working...
                              X