Page MenuHomeAnticto

Public | How to use table nodes
Updated 13 Days AgoPublic

This article explains how to create and use a Table Node to create variations of objects with similar characteristics.

Required Assets

There are two assets required to create a Table Node :

  • UDataTable: This asset will store all the asset of the different variations. Each column will represent a pin in our Table Node and each row a variation for our objects.
    image.png (98×342 px, 6 KB)
  • UStruct: This asset will determine the structure and default values of our Data Table. Each variable of this Struct will generate a new column in our Data Table. Also, this asset allow us to select the Default Asset which helps set similar properties between all the assets of the same column.
    image.png (111×357 px, 6 KB)

Before Start

There are some assets that require some conditions to work in a Table Node:

  • All Skeletal Meshes of the same column should have:
    • Same Layout Structure.
      image.png (700×701 px, 91 KB)
    • Same number of LODs.
    • Same number of Materials.
    • Same Material Slot structure (All material sections should we in the same position).
      Material Slots.PNG (1×2 px, 1 MB)
  • Material Instances can modify parameters of a Material Asset. Mutable must know which parameters are going to be modified in a Material Instance Column. To do so, we have to select all the modifiable values that our material instances will modify in the Default Material Instance. For example, if the Material Instance of the Row 3 modifies the parameter A, and the Material Instance of the Row 6 modifies the parameter B, we should set as modifiable the parameters A and B in the Default Material Instance.
Mesh Morph Nodes do not work with Table Nodes.

Mesh Variation

If we want to create a mesh variation with a Node Table first, as we said, we need to create first a UStruct and then a UDataTable. To create a UStruct we just right click on the content browser and then we type "struct" in the context menu that has appeared (Context Menu -> Blueprints -> Structure). We are going to name it "ExampleStruct". If we click on it to open the asset, we will see two tabs:

  • Structure: In this tab we are going to define the structure of our data table by pressing the "+ Add Variable" button.
  • Default Values: In this tab we are going to define the default values for each variable of the struct.
All UObject variables of the struct must have a default value, otherwise the variable won't appear in the node.

image.png (1×2 px, 84 KB)

As we already have a default variable created we are going to use it for our mesh. To do so, we have to select the drop down menu which specifies the type of our variable. We are going to search for Skeletal Mesh and the create a **Soft Class Reference". We are going to name our mesh variable "Hair Mesh" which would be the name of the column in our Data Table and the name of our pin in the Table Node.

image.png (1×2 px, 371 KB)

Once we have our first variable, we have to select a Default Value for it in the "Default Values" tab. Take into account that the Default Variable will be the reference mesh for all the meshes of the same column of our Data Table. That means that all the meshes of the same column will have the same Layout and also they should have the same amount of LODs and Materials (Sections). I will select the asset "Bandit_Hair_Backwards" for this example.

image.png (1×1 px, 246 KB)

At this point we already set up our Structure. Now it's time to create and set up our Data Table. To do so, we right click on the content browser and we type "Data Table" in the context menu (Context Menu -> Miscellaneous ->Data Table). We are going to name it "ExampleDataTable". If we open it, we will see that there are three tabs:

  • Data Table: This tab shows the information of each row and columns of the table. Right now there are two columns, one for the name of the row "Row Name" (automatically generated) and another one for the variable that we just created in the Structure "Hair Mesh".
  • Data Table Details: Tab with some information of the table. We are going to ignore it.
  • Row Editor: Tab to select the assets that we want to use for each row.

image.png (1×2 px, 75 KB)

Now is time to fill our Data Table to create some mesh variations. To do so, first we have to add a new row by clicking on the "+ Add". This will create a new row with the default values. We are going to keep the mesh with the default value and we are going to change the row name to "Backwards". This name is the one that will appear in the variation selector of our UI.

image.png (1×2 px, 102 KB)

We are going to create two new rows with the following Skeletal Meshes: "Bandit_Hair_Greek" & "Bandit_Hair_Sir".

image.png (1×2 px, 112 KB)

Now we have our Data Table set up. It is time to create our Customizable Object and test our Table Node. We are going to name our Customizable Object "TableNodeCustomizableObject". Once we have opened our Customizable Object, we need to create two nodes: a Table Node and a Material Node.

image.png (241×1 px, 47 KB)

Our Table Node doesn't have any pin because it doesn't have any Data Table assigned. To select a Data Table for our Table Node we have to click on the node and then fill the property Table, in the Node Properties tab, with our Data Table "ExampleDataTable". We will name the parameter as "Hair".

image.png (1×1 px, 185 KB)

We will see how the node refreshes automatically after select the Data Table and our mesh pins appear.

image.png (207×1 px, 64 KB)

Now we can connect the first LOD pin to the Material Node and connect the Material Node to the Base Object Node. We will select the material "HairMaterial" for our Material Node and then we will compile our Customizable Object.

image.png (181×1 px, 66 KB)

Results

Hair_Results.png (998×1 px, 585 KB)


Texture, Colors and Float Variations

We can see in the results of the previous example that there are some visual artifacts in the Greek and Sir meshes. This is because we are using the same textures (Roughness, Normal, Details) for all the meshes and we should not. With the Table Node we can also create texture variations. To do so, we are going to create three new Texture 2D variables (Soft Object References) in our struct, one for each texture of the material (Roughness, Normal, Details). The default values would be: "Bandit_HairBackwards_D", "Bandit_HairBackwards_N", "Bandit_HairBackwards_R". We will also add a color variation to distinguish each type of hair. To do so, we will have to create a Linear Color variable and we will let the black color as default.

image.png (1×2 px, 104 KB)

Each new variable has created a new column in our Data Table, let's fill each row with the corresponding textures and colors. For the backward hair we will use the default values. For the greek hair we will us a brown color and the following textures: "Bandit_HairGreek_D", "Bandit_HairGreek_N", "Bandit_HairGreek_R". For the Sir hair we will us a white color and the following textures: "Bandit_HairSir_D", "Bandit_HairSir_N", "Bandit_HairSir_R".

image.png (248×2 px, 42 KB)

If we refresh our Table Node our new pins will appear.

image.png (330×1 px, 80 KB)

Let's connect these textures to our Material Node and compile. For the color parameter of the Material Node we will generate a texture by linking our color parameter and the Texture_D to a Texture Layer Node.

image.png (410×1 px, 138 KB)

We could also use a float variable to control some float parameters of the material, like the metallic parameter.

image.png (522×1 px, 156 KB)

Results

Hair_Results_2.png (1×1 px, 725 KB)

Using Material Instances as Presets

We can use material instances to clean a little bit the graph and have better control of the variations. To do so, we are going to delete all the textures, floats and color variables from our structure. Then, we will create a material instance variable (Soft Object Reference). We are going to name it "Hair Material".

However, before selecting a material instance, we have to create them. We will create three material instances from our material "HairMaterial": "HairMaterialBackwards", "HairMaterialGreek" and "HairMaterialSir". In each of this instances we will modify the parameters to match the values from the last example.

image.png (1×3 px, 3 MB)

image.png (375×715 px, 176 KB)

Now that we have our material instances, we have to select a default value (we will use the "HairMaterialBackwards") for our Structure and then, fill the values of our Data Table rows. Once we have all set up, we will have to refresh our Table Node. All the texture pins will disappear and a Material Pin will appear. Link this material pin to the Table Material pin of the Material Node and compile.

image.png (224×1 px, 76 KB)

All the instances of the row should be instance of the same material base than the Default Value instance.
The Default Value instance has to be an instance of the same material base than the material instance of the Material Node.
Result

Hair_Results_2.png (1×1 px, 725 KB)

Animation Blueprints

We can select which animation instance, animation slot and animation tags we want to use for each Skeletal Mesh column of the data table. To do so we have to create three new variables in our Structure. An Anim Instance variable, which has to be a Soft Class Reference, for the animation blueprint, an Integer variable for the animation slot and a Gameplay Tag Container variable for the animation tags.

Table nodes support multiple animation blueprints. Create as many animation variables as you need in the struct.

image.png (201×473 px, 14 KB)

We won't see new pins in our Table Node if we refresh it, because animation variables do not need a pin.

Once we have added these new variables, we can fill the information in the Data Table. Then, to indicate which animation instance, slot index and tags uses a skeletal mesh, we have to use the Table Node properties tab. In the "Animation Properties" section we will see a that if we select a mesh column in the "Mesh Column" parameter, three new combo boxes will appear. In this combo boxes we will have to select the Animation Instance column, the Animation Slot column and the Animation Tags column that the Skeletal Mesh Column will use.

image.png (179×608 px, 14 KB)

Last Author
max
Last Edited
Thu, Nov 17, 4:12 PM

Event Timeline

max created this object with visibility "Restricted Project (Project)".
max created this object in space Restricted Space.
max changed the title from How to use node tables to How to use table nodes.Apr 28 2022, 9:11 AM
max edited the content of this document. (Show Details)
max changed the title from How to use node tables to How to use table nodes.Apr 28 2022, 11:43 AM
max edited the content of this document. (Show Details)
max changed the title from How to use node tables to How to use table nodes.Apr 28 2022, 6:02 PM
max edited the content of this document. (Show Details)
max changed the title from How to use node tables to How to use table nodes.Apr 29 2022, 11:27 AM
max edited the content of this document. (Show Details)
max changed the title from How to use node tables to How to use table nodes.Apr 29 2022, 12:15 PM
max edited the content of this document. (Show Details)
max published a new version of this document.
max published a new version of this document.
ricard changed the visibility from "Restricted Project (Project)" to "Custom Policy".Jul 20 2022, 2:37 PM
ricard shifted this object from the Restricted Space space to the S3 Public space.
pep changed the visibility from "Custom Policy" to "Public (No Login Required)".Oct 20 2022, 5:10 PM