KatsBits Community

RedMatch 2, Custom Player Outline & Papercraft Effect (skin)

kat · 1 · 69152

0 Members and 1 Guest are viewing this topic.

Offline kat

  • Administrator
  • Hero Member
  • *
    • Posts: 3128
    • KatsBits

Took a look at a game on Steam called RedMatch 2 (not an indorsement BTW), a stripped-down PvP online multiplayer (players can create their own password locked games which is nice).

Anywho, the game uses Unity's default 'capsules' as the player and are introduced in the title background image styled with a toon outline, with a further 'paper' outline a-la paper-Mario (see below). In game the players are basically the raw capsules minus these outlines, which got the grey matter thinking, "how would that be done without post-processing?".

Players are introduced to the user styled with a 'toon' and 'paper' outline.

Ordinarily it might be possible to use a billboard to achieve this effect, a flat plain that's shaped to fit the player that's always orientated towards the camera, but this only work axially, that is when players are all on the same level/plain (height from the ground), as soon as this changes, i.e. jumping or looking down on the scene from above, the perspective changes and the outline effects 'breaks' because the capsule is misaligned, the shape no longer 'fits' the elevated or depressed perspective of the player.

Simulated in Blender, from a higher elevation the 'outline' effect aligns to the camera but are no longer shaped correctly relative to the scene.

The cheap solution to the effect is duplicate the capsule, apply the appropriate material, invert the mesh and enable 'backface culling'. This allows the effect to properly 'track' with the player, from all angles, because the duplicate capsules are the same shape, the effect itself then dependant only on 'two-sided' mesh display being disabled so the inside of the objects are visible (meshes are inverted).

Exact duplicates of the player capsule are inverted and assigned appropriate materials, which display as outlines from all angles.

For greater affect, and to replicate a 'papercraft' style appearance, each outline mesh can be shaped and distorted, but care needs to be taken not to reshape too much to avoid directional clipping; part of one outline occluding the other due to the angle-of-incidence between them and the viewport camera.

Each 'outline' mesh is shaped and deformed to randomise their appearance, replicating the 'papercraft' visual style.