Black Week: −40% Pixor is $19.99 $11.99 until 2 December, on itch.io →

A white outline around the final sprite

A ring of white around a sprite makes it stand out on any background: a pickup, a selected unit, a sticker, a character on a busy level. In Pixor it is one node in the Style graph, and it goes all the way round.

An 8-direction walking character: the sheet this sample project renders

Sample project

An 8-direction walking character: the .pixor project and its library model (CC0). The sheet on the left is what it renders.

Beginner · about 5 minutes

The ring is drawn outside the sprite’s outline, around everything drawn there. It is a Style setting, so every side, every action and every frame of the sheet gets it.

1. Open a model

Open the sample, the crystal golem, or any model of your own. Pick the camera and the action you want first. The outline goes round whatever they draw.

2. Open the Line work group

Go to the Style step. The Style graph turns the render into pixel art, and its Line work group finds the silhouette, the inner lines and the creases. Click the arrow at the right of its title to open it in place. Click Frame to bring every node on screen.

3. Add a Line weight node

In the node library down the left of the graph, type line weight in Find. Drag Line weight into the open Line work frame, under Tidy lines. A node let go inside an open group’s frame joins that group.

Then wire it between Tidy lines and Line colours:

  • drag from the dot on the right of Tidy lines to the Lines input of Line weight;
  • drag from the dot on the right of Line weight to the Lines input of Line colours.

The Line work group open in the Style graph: Silhouette, Edges, Tidy lines and Line colours in a row, and a Line weight node wired between Tidy lines and Line colours, its preview a white ring around the golem

4. Make the border white

With Line weight chosen, set it up in the Inspector:

Setting Value What it does
Shadow side off on, it makes the outline two pixels thick on the side away from the light; leave it off for an even ring
Border 1 the number of rings drawn round the outline: 1 is one pixel, 2 is two
Own colour on the ring gets a colour of its own instead of the outer line’s
Colour #ffffff white, or any colour you like

The Inspector with Line weight chosen: Shadow side off, Border 1, Own colour on, Colour #ffffff

5. Check the result

Click the Output node, or look at the 2D View on its Final layer. The sprite has a closed white ring all the way round, including where an inner line meets the silhouette. The palette keeps the white exactly, and a fitted camera leaves the ring room inside the frame.

The 2D View: the crystal golem in pixel art with a one-pixel white ring all the way round, inside its 80 x 80 frame

Play the action to see every frame with it, and turn on Checks in the 2D View if you use a fixed canvas: anything cut at the frame’s edge is marked in lime.

6. Export, and reuse it

Click Export. The ring is part of the sprite on every frame of the sheet.

To use the same outline on other models, save the Style as a kit: right-click it in the Styles list and choose Save kit…. The kit holds its graph and its palette. In another project, Use kit… in the same menu makes it that project’s Style. From the command line, --style takes it:

pxr render golem.glb --style white-outline.pixorkit --size 80 -o golem.png

Next

Questions

Can the outline be thicker than one pixel?

Yes. Border is the number of rings drawn round the outline: 2 makes it two pixels thick. The camera leaves room for every ring.

Does it have to be white?

No. With Own colour on, Colour can be any colour: black for a sticker look, yellow for a selected unit, red for an enemy. With Own colour off, the rings take the outer line's colour, which simply makes the outline thicker.

My white comes out a slightly different colour.

An automatic palette keeps the ring's colour exactly. A fixed palette (a console palette, or one of your own) has only its own colours, so the ring takes the nearest one: add white to the palette if you want white.

Why is the ring cut at the edge of the frame?

The camera has a fixed canvas that is too small for the sprite and its ring. A fitted camera (Size) leaves room on its own; with a fixed canvas, make it larger. The 2D View's Checks mark anything cut at the edge in lime.

Can I use the same outline on other models?

Yes. Save the Style as a kit (right-click it in the Styles list, Save kit…), then Use kit… in another project, or pxr render model.glb --style white-outline.pixorkit from the command line.

Read next

Try it on your own model, free in your browser, or get the full version.

Try in browser Get Pixor