Page MenuHomeAnticto

Mutable for Unreal Engine | Multilayer projection on switchable parts
Updated 548 Days AgoPublic

Please read the Create projected tattoos or stickers section before reading this one. This section describes some issues that may arise implementing complex image projection with nodes and the solutions Mutable provides to streamline the process. There's a complementary guide for programmers Multilayer projection programming.
The multilayer functionality only works with switchable parts that are implemented in child objects and use their own material nodes (not extend material nodes).
It's much easier to implement if all the switchable parts share a common base UE4 material.

Overview

Some games may need a lot of stickers, so creating nodes for each and every one of them can be cumbersome and create huge graphs. In fact, it may even be unknown during development how many will be needed because it could be up to the player to decide how many are wanted.

On top of that, the surface onto they have to be projected may even be unknown, or even not exist yet! That is the case with switchable parts. You may want to project an image onto the jacket the player is wearing, but that jacket is switchable at run-time. Duplicating the nodes required for projection for each and every jacket is just too much work.

Multilayer sticker projection is Mutable's solution for both of these problems. With just one node, this system will let you set up multiple layers of stickers, on any item of a group. For example, instead of having to add projection nodes to every single jacket in the project, you just have to connect one node to the jacket group node in the Customizable Object root asset, and you will get multiple layers of stickers on any jacket.

  1. Open the base Mutable asset of a character, for example Bandit_forFPS. Then add a "Group Projector Parameter" node to the graph, and connect it to the Group node you want to put the stickers on, for instance, the shirts. If the group node doesn't have an orange pin input to connect to, right-click on it and refresh it to make it appear.

image.png (165×479 px, 41 KB)

  1. Then select the "Group Projector Parameter" node, and fill in its properties. Give it a unique parameter name:

image.png (168×651 px, 50 KB)

  1. Also specify which textures will be available as options to be projected as stickers. For each sticker, select one texture and give it a name:

image.png (334×691 px, 69 KB)

Optionally textures can be added using a Data Table. See Option Images Data Table section below.
  1. To perform editing of the projectors on characters that are not in the default T-pose in a customization lobby, fill up the "Option Poses" array. Set the name and the UE4 pose asset in each element.

image.png (192×352 px, 18 KB)

  1. It's absolutely necessary to specify which channel of the UE4 base cloth material used by the shirts/items will be used to overlay the stickers. That means that the UE4 material used by the shirts/items needs a possibly new channel that overlays the stickers onto the base material texture. First specify the name of the new channel as "StickerLayer":

image.png (131×633 px, 29 KB)

  1. Then open the UE4 common base material or materials used by the shirts/items (M_Bandit_forFPS_Shirt_Basic in this case) and add a "StickerLayer" texture parameter with a completely black and transparent texture by default, and blend it inside the material, for instance with the base color:

image.png (593×787 px, 133 KB)

  1. Important! If you change a base material to add a StickerLayer channel, the Mutable Material nodes in each shirt/item will not get the change automatically. They should have to be manually refreshed in each Mutable shirt/item child asset, but Mutable offers an automated solution, right-click on the shit/item group node and click on "Refresh all material nodes in children", then save all modified assets:

image.png (364×665 px, 136 KB)

  1. After all these steps, recompile the Mutable base character and when it finishes you should get the new Multilayer Sticker projector on the preview viewport:

image.png (299×677 px, 23 KB)

  1. Just press the AddLayer button and a row of projector controls will appear below it. Use them to place and control the sticker:

image.png (489×680 px, 256 KB)

  1. Press the AddLayer button multiple times to add multiple stickers, and the projector controls to change the stickers, their type, their placement, opacity and projection pose. If you change the pose, it only affects the projection calculations but not the character's pose in the viewport. Drag and drop a pose asset to the viewport to set the character's pose.

image.png (537×671 px, 274 KB)

  1. Set the reference texture property in the "Group Projector Parameter" node to let Mutable know what properties the generated projection textures should have (compression, sRGB, etc.).

Option Images Data Table

To share multiple textures between multiple projector nodes, a Data Table can be used.

  1. Create a Structure:

image.png (1×781 px, 268 KB)

In this example, the Structure has been named DataTableStructure.
  1. Open it and create a new Variable:
    • Define a column name to be used later as a reference
    • Use Texture as the column type

image.png (833×1 px, 195 KB)

In this example, the column has been named TexutreColumn.
  1. Create a Data Table using the previously created Structure as row structure:

image.png (1×824 px, 255 KB)

image.png (228×562 px, 44 KB)

In this example, the DataTable has been named DataTable.
  1. Populate the Data Table with different textures:

image.png (307×790 px, 90 KB)

The names of the Data Table rows will identify the stickers and will be used as Option Names.
  1. Configure the Group Projector Parameter to use the Data Table:
    • Select the Data Table (Option Images Data Table):
    • Specify the column of the Data Table (Data Table Texture Column):

image.png (153×619 px, 21 KB)

Textures in the Option Images Data Table have priority over textures in the Option Images property if they share the same option name.
If using Option Images Data Table, remember to set the column name where to look for the textures (Data Table Texture Column).
Last Author
gerard
Last Edited
Sep 24 2021, 4:36 PM

Event Timeline

alexei published a new version of this document.May 21 2020, 5:26 PM
alexei edited the content of this document. (Show Details)
alexei edited the content of this document. (Show Details)
alexei published a new version of this document.May 22 2020, 12:53 PM
jordi changed the visibility from "All Users" to "Public (No Login Required)".Jun 10 2020, 11:27 AM
gerard published a new version of this document.Sep 28 2021, 11:47 AM