Announcement

Collapse
No announcement yet.

World Normal Edge Detection ( and Speedpaint Art Style)

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

    World Normal Edge Detection ( and Speedpaint Art Style)

    Hello together,

    this is my approach on NPR shading in Unreal Engine 4. It is based on calculating world normal scene texture into a kind of blur pixel math. Its not finished though and since iam not a professional shader artist, it has its flaws and is unoptimized.
    I need to work more on the filtering methods so it does not cut so strong, even if that has its own style. To finish this up, i may have to ask some questions to you later.

    See you,

    Maternal

    Click image for larger version

Name:	Screen.jpg
Views:	1
Size:	666.0 KB
ID:	1161342

    #2
    cool work.
    looks really interesting to me.
    it is an postpro effect you can add to any scene ?
    www.ofpawnsandkings.de

    Comment


      #3
      Yes it is. There are some restrictions though. The Line /Edge detection takes normal information into account, so every asset with strong detailed normalmaps will look too sketched. Also, to filter out objects, objects should have more polygones - this improves the filtering. I have to test it with other scenes but the problem is, that my computer is not the best to test out this effect in other Demos. I won´t be able to record it smoothly.

      Click image for larger version

Name:	Screen2.jpg
Views:	1
Size:	393.5 KB
ID:	1087642Click image for larger version

Name:	Screen3.jpg
Views:	1
Size:	430.3 KB
ID:	1087643Click image for larger version

Name:	Screen4.jpg
Views:	1
Size:	297.7 KB
ID:	1087644

      Comment


        #4
        I´m back with Updates. I now have a good filtering method to prevent holes from Pixel intersection. As i said, i can´t record and play while the gameplay itself is around 45 Frames - which is only due to my old Computer.
        So I would be pleased if you could stop the Video sometimes and watch it in HD.



        We have to find a way to record this effects. A new Computer is planned, so this problem won´t be forever. Please let me know what you think about it.

        @Mods, i first thought this needs to be in work in progess, but it should be in the rendering subsection of the forum. I would appreciate if you could fix it.

        Comment


          #5
          Wow ! ^^ Really nice effect. I love this drawing-like rendering.

          Comment


            #6
            This is crazy <3
            Check out our game Arcus!

            Comment


              #7
              Beautiful work man, I love this!
              Carlos Montero | @cman2k | Technical Art Director @neoglyphic
              Working on Sunborn Rising and the Neofur Plugin | I made Black Mesa

              Comment


                #8
                Thank you ! Here is a better Video to show the effect.



                It is uploaded recently, so it takes a while to be HD.

                Comment


                  #9
                  Looks gorgeous! A lot of toon shading fails to work nicely on anything but static images, this one on other side looks great in motion. Great work!
                  Youtube Channel

                  Comment


                    #10
                    Thanks again I have exaggerated the effect:

                    Click image for larger version

Name:	ScreenShot00000.jpg
Views:	1
Size:	356.7 KB
ID:	1087815

                    3 Times the postprocess material looks even more like a oil paint sort of. Its crazy fast - i turned down the texture and effect quality to low.

                    Comment


                      #11
                      once again wow !
                      i really really like this effect.
                      cant wait to try it out on some of my projects.
                      do you plan to release it ?
                      www.ofpawnsandkings.de

                      Comment


                        #12
                        Yes it is planned to release it. However, i will have to optimize it for that. There are a few things that needs to be developed to prevent this "firing outline effect". This happens due to antialiasing which is temporal AA at the time ( which looks the best). You can´t notice it on stills, but on moving things and scenes. Also, i want to reimplement the custom depth mask, without that, it won´t be possible to filter out characters or highlights. Everything would look blurred. Speedpaints have always focus and not focused elements, so this is important and needs to be fixed.

                        Thank you for your interest in my work.

                        I have a new test video for you here:





                        Click image for larger version

Name:	ScreenShot00002.jpg
Views:	1
Size:	214.7 KB
ID:	1087840Click image for larger version

Name:	ScreenShot00003.jpg
Views:	1
Size:	329.3 KB
ID:	1087841Click image for larger version

Name:	ScreenShot00004.jpg
Views:	1
Size:	407.1 KB
ID:	1087842

                        Comment


                          #13
                          Ok, so i have some problems i can not solve myself. The first question is, how can i calculate sorting ? The main problem is that the pixel offsetting happens due to overlapping actors in depth. The postprocessing simply can not know which pixel has which depth. I tried to subdivide scene depth into 8 pieces to separate Meshes against each other. But that did´t solve the issue. Ambient occlusion seems to have some sort of "depthcheck" between two objects. While you don´t want it there ( black shadowing behind object) it could solve the flaming breakout issue on my material.

                          The second question is how Bokeh dof is filtered.

                          Click image for larger version

Name:	Depth.JPG
Views:	1
Size:	72.3 KB
ID:	1087881

                          Comment


                            #14
                            In the previous engine that I was using we had to build a small routine to properly handle this kind of cases. The idea is to take every mesh and it's smooth-groups and write down an individual index from 0-255 to one of the no used texture coordinates at vertices. Limiting index only to object didn't worked when mesh hard edges which had to be respected.
                            Later we render this index into g-buffer and use it in material shader to decide if shadows, ssao or other post process should behave differently when working on the edge of the object or near hard normal.
                            This is was based on old article, [edit] found it: http://www.students.science.uu.nl/~3...d_lighting.pdf
                            Perhaps UE4 already has such indexes or if you don't really care about hard edges then you could pass index as parameter to shader and render into custom g buffer. But again I don't know if UE4 allows to do it out of the box or you have to modify source code.
                            Last edited by BoredEngineer; 09-19-2015, 12:26 PM. Reason: Found article
                            Youtube Channel

                            Comment


                              #15
                              But now after I've re-read your post I'm not sure what you mean by post-process doesn't know what depth each sample have. It it done after anti-aliasing?
                              Youtube Channel

                              Comment

                              Working...
                              X