Skip to content

Bake a portrait

Designer · 30 min · No code

Result: a party member has a portrait of their own, cut out on a transparent background. It shows on their HUD plate, on the Party screen and in the equipment screen's character strip. A second, full-body menu portrait fills their card on the main menu.

Before you start

Any image in the right shape works. This page shows how to render one with the editor's built-in tools.

What a portrait must be

Property Value Why
Size 320 × 384 pixels (5:6), as the samples Larger than any box it is drawn in; mipmaps scale it down cleanly
Background Transparent (alpha) The plate draws the portrait over its own frame and shadow
Framing Head and neck, facing the camera The HUD box is small; the samples are framed close on the face, and a waist-up bust is hard to read
Texture Group UI Loads at full resolution and never streams down

Steps

1. Render the character in the editor

Skip to step 2 if you already have artwork.

  1. Create an empty level (File › New Level › Empty Level) with one directional light and a Sky Light. Save it in a scratch folder of your own, such as MyGame/WorkLevels: it is a work level, not game content.
  2. Drag your pawn Blueprint into the level, or for a VRoid member drag its skeletal mesh.
  3. Select its mesh component. Set Animation Mode to Use Animation Asset and pick an idle, for example MM_Unarmed_Idle_Ready from Lyra's Mannequin animations (or the MF_ version for a feminine character), so it is not in a T-pose.
  4. Under Rendering, tick Render CustomDepth Pass. This is what lets the screenshot tool cut the character out.
  5. Place a Camera Actor facing the character at head height and pilot it (right-click › Pilot). Frame head and shoulders.
  6. Open High Resolution Screenshot... from the viewport's camera menu (the one labelled Perspective). Tick Use custom depth as mask, set Screenshot Size Multiplier to 2 or more, and click Capture.

The image lands in your project's Saved/Screenshots folder with the background transparent.

2. Crop it

  1. Open the PNG in your image editor.
  2. Crop to a 5:6 rectangle around the head, and scale to 320 × 384.
  3. Check the edge of the silhouette on a light background. If it has a dark fringe, feather or defringe the edge by one pixel.
  4. Save as T_Portrait_Rook.png.

3. Import it

  1. Drag the PNG from your file browser into the Content Browser folder MyGame/Party/Portraits.
  2. Open the texture and set:
    • Texture Group: UI
    • Compression Settings: EditorIcon, as the samples (uncompressed, keeps a clean alpha edge)
    • Mip Gen Settings: SimpleAverage, so the portrait scales down without aliasing
    • Filter: Trilinear
  3. Save.

4. Set it on the character

  1. Open the character's member definition, for example PartyMember_Rook.
  2. Under XenoCore › Party, set Portrait to T_Portrait_Rook. Save.

5. Optional: a menu portrait

The main menu shows each active member as a full-height card. It uses Menu Portrait (on the same member definition); left empty, the card falls back to Portrait.

  1. Render the whole body as in step 1, standing in an idle, facing the camera.
  2. Crop to 600 × 1720 pixels with the crown of the head near the top and the body centred on the head. The card shows only the top part of the image (Portrait Crop 0.55 on the card, roughly crown to hips) and fills its height, so a head placed lower is cut off at the waist. Portrait Crop is a setting of the card itself, not of your texture; you never need to change it.
  3. Import it with Texture Group UI, Compression Settings BC7 (it is much larger than a HUD portrait), Mip Gen Settings SimpleAverage and Filter Trilinear.
  4. On the member definition, under XenoCore › Party, set Menu Portrait to it. Save. The samples are Characters/VRoid/<Name>/T_XenoCore_MenuPortrait_VRoid_*, for example Characters/VRoid/Kael/T_XenoCore_MenuPortrait_VRoid_L.

The HUD samples are in Characters/Party/Portraits, for example T_XenoCore_Portrait_Blue: open one to compare your import settings.

Test it

  1. Open Maps/L_XenoCore_Gym and press Play with the character in the active party.
  2. Their HUD plate shows the new portrait, cut out cleanly against the plate.
  3. Open the menu: the character's card shows the menu portrait. Check the Party screen and the equipment screen's character strip too.

If it doesn't work

The portrait shows a black or grey box around the character

The PNG has no transparency, or the texture's alpha was stripped on import. Check the texture editor's alpha channel view. Re-export with transparency.

The portrait is blurry

The texture is streaming a lower mip. Set Texture Group to UI and tick Never Stream.

The leader's HUD plate still shows the old face

The plate for the character you control reads the same Portrait field. If it does not change, you are testing from a save or the definition was not saved.

Re-make the portrait when the character changes

A portrait is a picture, not a live render. Change a character's materials and the old portrait still shows the old colours.

Going further