Unreal Engine : Outlines WITHOUT Post Processing

Sdílet
Vložit
  • čas přidán 18. 06. 2024
  • Cartoony games usually require some sort of outlines around your characters, environments and a whole bunch of other objects. A while ago i made a video on a post processing effect to do this with. Today, let's take a look at a somewhat cleaner, if not more expensive way to get outlines.
    Project file downloads:
    CZcams members: • Post
    Patreons: / 106479025
    Join the discord for any help you need! : / discord
    Join this channel to get access to perks:
    / @thegamedevcave
    support the channel and development over on patreon : / thegamingcaves
    Get personalized Coaching : www.fiverr.com/s/2P9GaN
  • Věda a technologie

Komentáře • 15

  • @GewoonEenNick
    @GewoonEenNick Před 15 dny

    wow! this is exactly what i wanted
    thanks!

  • @hamitkeles8885
    @hamitkeles8885 Před 14 dny

    You are a hero... thanks.😃

  • @wofkwengel
    @wofkwengel Před 14 dny

    The reason cubes have issues with outlines has nothing to do with polycount, It's simply because they have hard edges.
    Also you don't need to program anything in blueprints to put outlines on a character, you can put it straight in the skeletal mesh asset.

    • @thegamedevcave
      @thegamedevcave  Před 14 dny

      as you can see in the video itself, higher poly count will make the displacement smoother. yeah it is because of hard edges, but adding more geometry, even if just flat faces (while not great to do, definitely don't' subdivide it like 10x of course), does help solve the issue.
      I'd recommend you try it yourself, try importing a simple low poly cube, add the material and then add simple subdivisions to it and see the difference.
      I'm pretty sure it's to do with the vertex normal. when the cube's faces onto have 2 tringles each, the vertex normals point straight up, perpendicular to the face, but when there are more tringles on a flat face like that, the vertices on the edges have their normal pointing out diagonally, meaning that the offset is done diagonally which prevents the taring issue.
      you of course don't HAVE to make specific components to display outlines but if you're going to have a LOT of meshes in your game that all need outlines anyway, you really dont want to give every single one of them their own overlay material, that's just tedious, much easier to just make a component for it once and have it all done automatically.

    • @wofkwengel
      @wofkwengel Před 14 dny

      @@thegamedevcave Subdividing usually also smooths edges in addition to just adding divisions.
      The smooth edges are the thing that fixes the issue, not the polycount.
      For the character I was talking about adding the outline to the skeletal mesh in the content browser, so that anywhere you use it, it would have the outlines by default.
      To me that's super comfortable

    • @thegamedevcave
      @thegamedevcave  Před 14 dny

      that's the thing though, in the example i give in this video i specifically use linear subdivision, so the actual edges stay sharp...
      for the character, yeah that is true, but still that's for every character in your game, if you have like 100+ characters in total, setting up the component like this (even more so when it comes to the static meshes), will save a bit of tedious busywork. Of course, in no way required to do it that way, and if you're just adding it to 1 character there's no need to bother with it, but otherwise, why make things more time consuming on yourself?

    • @wofkwengel
      @wofkwengel Před 14 dny

      ​@@thegamedevcave I'm not talking about the shape of the model, I'm talking about the edge type. You can experiment with this in a modeling software like Maya. It lets you select edges and determine whether they're soft or sharp. When importing a model, UE interprets hard edges as being disconnected from one another. It's interesting, look into it!
      For assigning a material on multiple assets you can select them in your content browser, right click > Asset actions > Edit selection in property matrix.

  • @4nth365
    @4nth365 Před 15 dny +2

    pole position

  • @MCA-GK
    @MCA-GK Před 15 dny

    czcams.com/video/4-a8QZIf1Dc/video.htmlsi=rfzzFOKVut9e6v8H
    You just copied the unreal university channel method 😂

    • @thegamedevcave
      @thegamedevcave  Před 15 dny +1

      there are only so many ways to do it, this is the most straightforward way, i dont doubt there are dozens of people that made videos showing this method.. i recorded this video like a month ago anyway, so just nice timing that we both uploaded this around the same time i guess?

    • @MCA-GK
      @MCA-GK Před 15 dny

      @@thegamedevcave This is simple but performance cost and also two extra draw call one for overly material and the other one for internal mesh I used the @codelikeme channel video which is in post process

    • @thegamedevcave
      @thegamedevcave  Před 15 dny +2

      yeah it uses up a lot of extra drawcalls, so it's not exactly ideal in that regard. depends on a lot of factors but this is the same basic technique that has been used since the PS2 era for a lot of games. so altogether, it's not THAT big a deal i'd say.
      Post processing is generally probably cheaper to do though, but is not as consistent in the thickness out the lines.

    • @Grimstrike
      @Grimstrike Před 15 dny

      @@thegamedevcave Just because it's one more draw call, doesn't mean the method is inferior to postprocess ones, entirely depends on the project and frame budgets, there's no 'one correct way' of doing something usually. I personally really like this method (since this is exactly the visuals one of my projects were looking for), so thank you for the well-made tutorial, don't doubt the majority of viewers are appreciative of all the diverse solutions provided.

    • @thegamedevcave
      @thegamedevcave  Před 15 dny

      to be fair it's not just one one draw call, it's one more draw call PER mesh, which can add up quickly so it is something to be mindful of, but overall it does end up looking better than post processing in my opinion and while those extra draw calls might end up adding up to form some performance impact, usually saving draw calls in other ways when possible is probably worth it do be able to use this method :)
      There's up and down sides to each method for any desired results, this one is the same, just gotta be aware of those and see if they fit the usecase! I'm glad you found it helpful for yours!