How to outline a character?

Hello everyone,
I want to outline characters in my game, what is the best way to do it?

Thanks for any help!

There’s post processing methods…

Is it just characters, not environments? If so, in your 3d creation package, the old school trick is to duplicate the character mesh, inflate it a bit so it’s a teeny bit bigger than the original. On this duplicate, invert the normals and give it a new materials. Update the skins on the duplicate and export both as a single asset. In UDK, make a material to assign to the duplicate and keep it as a simple color. If you know how, you can also make it draw after solid geometry, but it’s not necessary to achieve the effect.

I’ve also wondered about this, as it’s something common in so many games.

@ConradG ‘s solution would certainly work, however it seems an extremely costly method to achieve such an effect. You would essentially double the skeletal vertices’ calculations on each skeletal mesh you apply the effect to. It would also require adding/removing additional skeletal mesh components to actors constantly at runtime. Especially messy when you start considering modular skeletal meshes (like myself), whereby I have 8 skeletal mesh components per pawn.

Having said that, I don’t have a better solution. However I’d be surprised if other games take this approach. Perhaps some combination of material + pp to define the edges of geometry.

I’m definitely interested to hear some ideas on cheaper implementations on this problem.

Perhaps taking some ideas from this example of rendering occluded actors may help: UDK | DevelopmentKitGemsRenderingOccludedActors

1 Like

Well, post process would be the most convenient.

I did not know your characters were modular, so yes, doing this manually would be tedious.
An alternate, but somewhat costly route, would be making a shader that pushes the vertices via WPO, then render it behind the character mesh. This could be done through stencils, which again, can also work for post process means.

Although this is for UE4, this article outlines (no pun intended) how to outline an object using pp and material: Tutorial – Creating outline effect around objects | Unreal Engine 4 blog

I HIGHLY recommend Tom Looman: Multi-color Outline Post Process in Unreal Engine 4 – Tom Looman

Very nice, however I don’t believe this would work for UDK, as I don’t believe the occlusion fill features referenced in this article are available.

I honestly think that simply having a toggle in your character materials to plug the raw fresnel output into your emissive channel would work fairly convincingly.

1 Like

Thanks for your answers. Yeah duplicating the character mesh is a solution, but I’m looking for something more optimized (for my multiplayer game).
And yeah, I’m working on a falloff/fresnel material solution. This is the best way to deal with performances for me.

I’ve tested this material on a character mesh and the duplicated technical. The result is very cool.
I will not use it, but if someone wants to do a cell shading effect, you can do it with this material.

For the fresnel method, I would think using an If node would allow for a harsh line. Just throwing out another idea, good luck!

1 Like

2 posts were split to a new topic: UE5 Adding Outline Effect

So you redid Tom Looman’s effort’s above?