Starter Project 2: Bear Necessities! đ©
Fluf World is abuzz with excitement for the upcoming fashion show! Our friend Party Bear has been invited, but thereâs a catchâhe needs to swap outfits on quickly and seamlessly to keep up with the showâs rapid costume changes!
Our task is to build a modular wardrobe system that allows Party Bear to effortlessly transition between different looks. Each accessory within an outfit will be itâs own blueprint instance and we will learn how we can use nested blueprints to multiple 3D objects working together.
By the end of this project, youâll have a flexible dressing system for a Party Bearâone that can be easily expanded if he decides to pick up a samurai armor or pirate ensemble next!
So letâs dive in and make sure Party Bear has everything he needsâbecause when it comes to bear necessities, a well-stocked wardrobe is at the top of the list!
Getting Started
Required Assets
Before we begin building our UBF project, youâll need a few assets to work with.
For this tutorial, weâll be using a range of 3D models and textures for both the Party Bear and his wardrobe. You can download the starter asset pack from the Asset Creator Pack provided to you. Get in touch with customersuccess@futureverse.com to gain access.
Additionally, ensure you have installed compatible versions of UBF Studio and UBF Previewer. For installation instructions, see the Installation and Setup sections for the respective apps:
Creating a UBF Project
Letâs again begin by launching UBF Studio and creating a brand new project. Select âCreate Projectâ in the welcome screen, then navigate to a suitable location on your drive and create a new folder to store your project. You can name it whatever you prefer, but for this tutorial, weâll use âUBF - Bear Necessities.â
Once the folder is created, navigate into it and select âCreate Projectâ to initialize your UBF workspace.
Project Setup & Importing Assets
In Bear Necessities, weâll be dealing with a broader range of assets than in our previous starter project. To keep everything neat and easy to navigate, letâs begin by organizing our workspace right from the start.
Firstly, download and unzip the Bear Necessities Starter Pack into your newly created project folder. This ensures that all the relevant 3D models and textures are placed directly within your UBF Project.
After extracting, return to UBF Studio and open or refresh your project. You should now see a folder hierarchy resembling the one below:
Inside each Resources folder, youâll find the relevant 3D assets and textures specific to that accessory or body part.
With our foundation in place, weâre ready to move on to the fun partâsetting up our Party Bear blueprint and preparing him for his outfit transformations!
Build-A-BearâLaying the Foundations
Itâs time to bring our Party Bear to life! Before we start on any accessories, we first need to establish a solid foundation. In this section, weâll walk through the process of creating and configuring our base bear blueprint. Weâll break this into three key stages: first, prepping our blueprint and wiring up some reusable logic; second, spawning our bear and giving him a glorious fur coat; and finally, bringing him to life with a pair of expressive, customizable eyes.
Bear BonesâCreating Our Blueprint Structure
- Creating the Bear Blueprint
Navigate to the Bear folder in the Project Explorer then right-click and select Create New Blueprint. Name the blueprint âBP_Bearâ (prefixing with âBPâ helps us quickly identify it as a blueprint and follows standard practice).
With our blueprint created, itâs time to start piecing together the logicâone node at a time.
- Creating a Scene Node
As we learnt in the first exercise, a Scene Node is a container, effectively the ârootâ of our bearâit ensures that every part of our character (body, outfits, accessories) stays grouped together.
Start by adding a âCreate Scene Nodeâ node to the blueprint and connecting itâs execution from the build node. Inside the nodeâs settings, assign it a nameâweâll simply call it âBearâ.
At this point, our blueprint creates a container in the scene, but weâll need to reference it multiple times throughout our blueprint. Instead of constantly dragging wires everywhere, we can make our blueprint cleaner by storing the Scene Node inside a variable.
- Storing the Scene Node in a Blueprint Variable
Blueprint Variables allow us to store values and retrieve them anywhere in our blueprint, just like variables in traditional programming.
To create a variable, navigate to the Blueprint Inspector (on the left panel of the editor) and select the Variables menu.
Clicking the â+ Add a Variableâ button will open up a popup allowing you to define your variable:
- Set the Variable Type to SceneNode.
- Give it any name you like, we will choose BearSceneNode.
Click Createâyou should now see it appear in your Variables list.
Now that weâve created our BearSceneNode variable, we need to store the output of our Scene Node inside it.
Back in the viewport, open the Create Node menu then search for and spawn a Set BearSceneNodeâthis is how we assign a value to our variable.
Drag the output pin of the Create Scene Node into the input pin of Set BearSceneNode and link the execution pin from Create Scene Node to Set BearSceneNodeâensuring the variable gets assigned immediately after the Scene Node is created.
We can now access the contents of this variable anywhere in our blueprint without needing to drag wires back and forth.
If you need to retrieve the value of BearSceneNode later in your blueprint, you can simply:
- Drag it directly from the Variables Menu in the Blueprint Inspector into the viewport.
- Alternatively, you can open the Create Node menu and search for Get BearSceneNode.
- Leveraging Mesh Configs
A MeshConfig is a collection of engine-specific configuration data that determines how a mesh is loaded at runtime. It can include settings such as axis configurations (defining which axis is considered forward upon import), skeleton overrides (specifying which skeleton to use for rigging or animations), and other parameters that standardize how a mesh is handled within a given engine context.
It is prudent to expose a MeshConfig input a blueprint for scenarios where a parent blueprint might want to specify its own mesh-loading parameters. For instance, a vehicle blueprint that spawns Party Bear as its driver could pass in a tailored MeshConfig, ensuring consistent orientation and skeletal setups across the entire system.
While our current example doesnât involve any parent blueprint calling the Bear blueprint (since itâs intended to be a top-level entity), the open and flexible nature of UBF means there could be a higher blueprint at some point down the line. By exposing a MeshConfig input here, we adhere to best practices and keep our blueprint extensible for potential future scenarios.
To set up this input, navigate to the Blueprint Inputs panel in the Inspector and create a new input of type MeshConfig, naming it something like InjectedMeshConfig
. Once this input is created, we can incorporate a simple check in our blueprintâs execution flow to see whether the caller has provided a MeshConfig.
Now that our InjectedMeshConfig input is in place, we need to handle the scenario where it is not provided (i.e., itâs null
). To accomplish this, weâll introduce a Branch node that checks whether a valid MeshConfig has been passed into the blueprint.
First, spawn a Branch node in your graph, connecting it to the next step in your blueprintâs flow. The Branch node evaluates a boolean condition, then routes the execution to True or False pins based on the result.
Next, we can retrieve the value of the InjectedMeshConfig input in the same way we do for variables and feed itâs value into an IsNull node. Connect the IsNull nodeâs bool output to the Condition input on the Branch node.
- Locking in the MeshConfig
Now that our Branch node splits the flow based on whether InjectedMeshConfig is null, we can implement the logic for each outcome. If InjectedMeshConfig is null (true path), we want to create a new MeshConfig at this stage. To do this, weâll use a CreateMeshConfig node.
This node requires two inputs:
- A Mesh Resource, which serves as the basis for generating the default configuration. We can set this to our
PB_Body_Standard
mesh. - A config override key, used to retrieve a specialized configuration in the executing experience. This key plays a crucial role in injecting gameplay-specific functionality into a UBF-spawned character.
Projects using UBF interpreters can define multiple mesh config overrides, which are preconfigured settings that include specific skeletons, rigs, and additional gameplay elementsâsuch as predefined sockets for equipping weapons or attachment points for accessories.
When using the CreateMeshConfig node, the provided key attempts to retrieve an existing override configuration from the running experience. If a matching override is found, it is applied automatically; otherwise, a new MeshConfig is generated based on the specified resource.
Since the primary difference between the two paths (true or false) is which MeshConfig we end up using, we can simplify our blueprint by storing the final MeshConfig in a single variable - simply called MeshConfig. If the condition is true (injected config was null), we create the MeshConfig and assign it to this variable. If itâs false (injected config was not null), we assign the InjectedMeshConfig to the same variable.
Fur RealâSpawning the Body and Applying a Custom Material
- Creating a Body Blueprint
While we could continue adding all the logic for spawning and customization directly into our main bear blueprint, itâs important to remember that this blueprint will soon be doing a lotâhandling foundational setup, orchestrating accessories, and more. To keep things clean, modular, and easy to maintain, weâre going to offload the responsibility of actually spawning the bearâs body into its own dedicated blueprint. This approach allows our main blueprint to serve as a high-level orchestrator, delegating specific tasks to more focused sub-blueprints.
So, letâs head back into the Bear folder, right-click, and create a new blueprint. Weâll name it: BP_SpawnBody
. This blueprint will be responsible for spawning and configuring our bearâs body mesh and applying the stylized fur material that brings it to life.
- Spawning the Body Mesh
With our setup complete, itâs time to bring the Party Bearâs body into the world. As weâve done previously, weâll use the SpawnMesh
node to make this happen. This node requires three key inputs: a mesh resource, a parent SceneNode, and a MeshConfig.
For the mesh resource, weâll directly reference the PB_Body_Standard.glb
file, as the bearâs body mesh will remain consistent across all use cases and doesnât require runtime variability.
Now, regarding the Parent (SceneNode
) and Config (MeshConfig
) inputsâwhile weâve already created these in our main Bear blueprint, they donât exist within this new BP_SpawnFur
blueprint. Since sub-blueprints do not have access to their parentâs internal variables, we need to explicitly define them as inputs to our BP_SpawnBody
blueprint so they can be passed down when executed.
To do this, navigate to the Blueprint Inputs panel of BP_SpawnFur
and create the following:
- An input of type
SceneNode
, namedBear-SceneNode
- An input of type
MeshConfig
, namedBear-MeshConfig
Once added, you can drag these inputs into the viewport and wire them directly into the corresponding pins on the SpawnMesh
node.
With our body-spawning blueprint now ready to receive instructions, letâs jump back to the main Bear blueprint and make use of it. Weâll use the ExecuteBlueprint2
node to run our newly created BP_SpawnBody
. Once added, select BP_SpawnBody
from the dropdown in the node, and youâll see the input fields update to match the ones we defined earlierâautomatically exposing the Bear-SceneNode
and Bear-MeshConfig
inputs.
Now wire up the execution flow so that both paths from the earlier Branch
node lead into this ExecuteBlueprint2
call. This ensures that regardless of whether we created a new MeshConfig or used an injected one, we always proceed to spawn the bearâs body.
Lastly, connect the two variables we previously createdâBearSceneNode
and MeshConfig
âinto the corresponding inputs on the ExecuteBlueprint2
node.
With everything in place, itâs time to preview our progress. Open the UBF Previewer, switch to Live Link Mode, and hit the Preview button in the top right of the blueprint viewport. If everything has gone according to plan, you should now see the first glimpse of your Party Bearâstanding proud and ready for customization!
- Applying the Fur Material
Now that our bear is showing up in the Previewer, itâs time to give him a dose of realismâfur! At the moment, our friend is looking a bit plain, so weâll use the Apply Material node to provide a warm, fuzzy coat.
The Apply Material node takes three parameters: Index (weâll set this to 0, since our bearâs body only has one material slot), Renderer, and Material (which weâll define shortly).
For the Renderer input, we simply take the first element in Renderers array returned from the Spawn Mesh node. Using the First
node, allows us to yield the first (and in our case, only) mesh renderer, which we can then feed into the Apply Material node.
Now weâre ready to create the actual fur material. Spawn a MakeFurMaterial node to define how the fur looks and we will work through customizing the required parameters as follows:
- Set the render mode to UseDiffuse, since we want to apply a diffuse texture to color the fur.
- To keep things flexible and allow customization in future instances, letâs create a Blueprint Input of type
Resource<Texture>
for the diffuse texture. Give your new input a name and a default textureâwe will use the nameFur-DiffuseTexture
and give it the default valueT_PB_Fur_RaspberryRipple_1024.png
. - This diffuse / base color texture needs to have sRGB enabled, we can ensure this by leveraging a Set Texture Settings node. This node can take in the input texture, enable sRGB and output the texture with the correct settings appliedâ then we can connect this into the diffuse texture slot on our material node.
- Next, weâll add normal, ORM, height, and ID maps to enhance realism. For each of these textures, you can use Set Texture Settings again to ensure sRGB is disabled, then feed them into the corresponding inputs on the MakeFurMaterial node. We do not expect instances to change these textures so we can reference them directly in our set texture settings. Set the different texture inputs as follows:
- Normal Tex:
T_PB_Body_Standard_LOD0_NR_1024
- ORM:
T_PB_Body_Standard_LOD0_ORM_1024
- Height Map:
T_PB_Body_Standard_LOD0_H_1024
- ID Map:
T_PB_Body_Standard_LOD0_CSTM_1024
- Normal Tex:
- Lastly, letâs adjust some of the primitive parameters to finish off the materialâs appearance:
- Set Occlusion to 1.
- Set Roughness to 0.5.
- Set Metallic to 0.5.
- Ensure Use Normal Map is enabled.
- Ensure Use ORM is enabled.
With these configurations in place and the Material output connected to the Material input on the Apply Material node, we should have a blueprint that resembles something like the one below:
Once again, open the Previewer, switch to Live Connection Mode, and press Preview in your blueprint editor. You should now see a fully furred-up Bear, ready to show off his new coat.
For completeness, letâs add one final touch. Currently, the diffuse texture used for the fur is exposed as an input in the BP_SpawnBody
blueprint, allowing it to be overridden by a parent blueprint or defaulting to the value we set earlier. However, our main Bear blueprintâthe one from which weâll eventually create instancesâdoesnât yet expose this input itself. To ensure we can control the fur texture (and thus the color) from our instances later on, letâs add a matching input to the Bear blueprint with the same default value. Once added, simply pass that input down into the BP_SpawnBody
execution, wiring it to the corresponding input to maintain consistency.
Eye on the Prize â Adding Customizable Eyes
- Creating the Spawn Eye Blueprint
Continuing our modular approach, weâll now focus on giving our Party Bear a proper set of expressive eyes. Since both eyes share the same underlying logicâonly differing in which model and texture they useâweâll create a reusable blueprint called BP_SpawnEye
. This blueprint will handle all the logic for spawning and configuring a single eye. Then, within our BP_SpawnBody
blueprint, weâll simply call BP_SpawnEye
twiceâonce for each eyeâpassing in the appropriate mesh and texture for the left and right sides respectively.
Letâs go ahead and create that new blueprint now.
- Spawning the Eye Mesh
Just like before, weâll be using the SpawnMesh
node to bring our eyes into the scene. As a quick refresher, this node requires three key inputs: a Mesh Resource, a Parent SceneNode, and a MeshConfig.
Unlike our previous body blueprint where the mesh resource was fixed, the eye blueprint will need all three values to be passed in from the outside. This ensures it remains flexible and reusableâallowing us to use the same blueprint for both the left and right eye, with different inputs for each.
Letâs go ahead and define the inputs in our blueprint now:
- A
Resource<Mesh>
input with nameEye-MeshResource
- A
SceneNode
input with nameBear-SceneNode
- A
MeshConfig
input with nameBear-MeshConfig
Once youâve created these inputs in the Blueprint Inputs section of the Inspector, drag them into the graph and wire them up to the corresponding inputs on your SpawnMesh
node.
If we return to our BP_SpawnBody
blueprint, we can now follow on from spawning the bearâs body and applying its fur by executing our newly created BP_SpawnEye
blueprintâtwice, once for each eye. Just like before, weâll use the ExecuteBlueprint2
node to call the eye blueprint and pass in the necessary inputs.
For both calls, weâll connect the existing Bear-SceneNode
and Bear-MeshConfig
variables to their respective inputs on the node. The only thing that changes between the two executions is the mesh resource we provide to the EyeResource
input.
- For the left eye, use the resource:
SK_PB_Standard_EyeLeft_LOD0
- For the right eye, use the resource:
SK_PB_Standard_EyeRight_LOD0
Once both executions are wired up, letâs verify things are working as expected. Open the UBF Previewer, switch to Live Link mode, and hit the Preview button in the top right of your Bearâs main blueprint viewport. You should now see your Party Bear staring back at youâwith both eyes in place! Theyâll still look a little plain for now, but weâll fix that next by giving them a proper material.
- Applying the Eye Material
Now itâs time to give those eyes a bit of personality! Inside our BP_SpawnEye
blueprint, letâs continue from where we left off after spawning the mesh by applying a materialâjust as we usually doâusing the Apply Material node.
As always, we can leave the Index input of the Apply Material node at 0
(targeting the first material slot). For the Renderer input, weâll use the first (and only) renderer returned from the SpawnMesh outputs. To retrieve it, we can use the First node from the array.
Next, letâs create the material itself. Since weâre aiming for a clean and simple look, weâll use a standard PBR material by spawning a MakePBRMaterial node. Follow up by spawning a SetTextureSettings node to manage our diffuse texture. Set the sRGB flag to true
, then connect the texture output to the Diffuse Texture input of the Make PBR Material node.
Now for the actual texture resourceâwe want to make this customizable, so letâs create an input in our graph of type Resource<Texture>
and name it Eye-DiffuseTexture
. We can give this a default value for testing, feel free to use any of the included eye BC textures:
T_PB_Eyes_Green_BC_1024
T_PB_Eyes_Purple_BC_1024
T_PB_Eyes_Red_BC_1024
Drag this input into our blueprint and connect it to the SetTextureSettings node we just created.
Next, letâs take the same approach for the Normal and ORM textures. Spawn a SetTextureSettings node for each, setting sRGB to false
this time. Since these textures wonât change, we can directly reference them. The textures to use are included in your resources and map to:
- Normal:
T_PB_Eyes_NR_1024
- ORM:
T_PB_Eyes_ORM_16
Last but not least, letâs ensure that all the properties are correctly configured on the MakePBRMaterial node:
- RenderMode:
UseDiffuse
- Opacity:
1
- Occlusion:
1
- Roughness:
0.5
- Metallic:
0.5
- Use Normal Map:
true
- Use ORM:
true
You should now have a PBR material that looks something like:
Connect your material to the Apply Material node, and voila! Youâre ready to preview. Head back to the Previewer, switch to Live Link mode, and hit the Preview button. Now you should see your Party Bear staring back at you with some expressive, vibrant eyesâfull of character and charm!
- Making the Eyes Customizable
Now that weâve got the eyes sorted, thereâs just one more touch we need to address. Currently, the Eye-DiffuseTexture
is an input to the BP_SpawnEye
blueprint, which means it can be set within the BP_SpawnBody
blueprint that calls it. However, to make customization even more accessible, we want to expose this input at the top level in our BP_Bear
blueprint.
To do this, weâll add a new input to the BP_SpawnBody
blueprint and link it to the existing input when executing BP_SpawnEye
.
Then, weâll repeat the same process in the BP_Bear
blueprintâadding a new input and connecting it to the ExecuteBlueprint2
node for BP_SpawnBody
.
Note we could even have two inputs would we want to customize each eye color independently but to keep it simple, we will assume both eyes share a single BC texture.
What we are doing here is effectively âdrilling downâ the parameter, allowing instance creators to define the customization of the bearâboth the fur color and the eye colorâat the top level, making it straightforward and intuitive to create unique, personalized Party Bears!
All Eyes on Me â Binding the Eyes to the Body
With the eye meshes now spawned and in place, the next step is to ensure they remain properly aligned and animated with the characterâs body. Without this connection, the eyes would stay static whenever the character moves.
To handle this, we need to bind the eye meshes to the bodyâs skeletonâbut only if a valid reference to that skeleton is available. Start by adding a new input to your blueprint, naming it something like In-BodySkeleton
, and setting its type to MeshRenderer.
After spawning the eye mesh and applying a material, insert a Branch node. Use the getter for your In-BodySkeleton
input and connect it to an IsNull node. The output of that node will control the condition of your branch, determining whether or not we proceed with binding.
Now, on the FALSE path (meaning the skeleton is valid), drop in a Bind Meshes node. This is what links the eyes to the bodyâs rig so they animate together naturally.
The Bind Meshes node expects two inputs:
-
Meshes: An array of mesh renderers to bind. Youâll connect this directly from the output of the node that spawns your eye meshes.
-
Skeleton: This is the source mesh rendererâthe rigâthat the other meshes will follow. Simply drag the âIn-Skeletonâ blueprint input into this input.
With this setup complete, the eyes will dynamically move alongside the rest of the body, bringing more life to your character.
Later, weâll make sure to pass in the bearâs skeleton into this blueprint from the BP_SpawnBody
blueprint. For now, the Spawn Eye blueprint setup is complete.
Bear-y Unique â Crafting Custom Bear Instances
With that, our Party Bearâs base blueprint is complete, and we now have the ability to render a Party Bear. This base bear blueprint acts as the template or foundational recipeâit defines how to render any bear, while allowing us to configure the colors of the eyes and fur through its inputs. Essentially, itâs like having a flexible character template that can be customized at runtime.
Instead of duplicating this entire blueprint for every variation we might want (which would be cumbersome and prone to errors), we can leverage blueprint instances. Think of a blueprint instance as a customized version of the base blueprintâa way to define specific configurations without modifying the original. For example, one instance might render a bear with blue fur and green eyes, while another could render a bear with red fur and yellow eyesâall while keeping the underlying logic of the base blueprint intact. This approach makes it incredibly efficient and easy to manage multiple variations without duplicating code.
To create some instances, navigate to our main BP_Bear blueprint and, in the inspector panel on the left, select the Instances menu. From here, select Create Blueprint Instance. This will immediately generate an instance of the blueprint, allowing you to customize any of the exposed inputs. In our case, these inputs are the Fur and Eye Diffuse textures. Change these values to whatever you like, and then save your instance in the Bear folder with a suitable nameâweâll use BPI_SimpleBear (using BPI to denote a blueprint instance).
This method allows you to create multiple bears that differ only in appearance, simply by creating additional instances. Weâll explore this concept further when we add accessories, but for now, feel free to preview your newly created blueprint instance. In the previewer, you should see your customized bear come to life, showcasing just how reusable this approach is!
Thread by Thread â Building Our Accessory Arsenal
Now that our Party Bear is fully formed and sporting a great look, itâs time to take his style to the next level with clothing and accessories! In this section, weâll focus on creating and managing these accessory blueprintsâranging from hats to jackets, and eyewear.
Creating the Base Accessory Blueprint
To maintain the same modular philosophy we used for the bearâs body and eyes, weâll start by creating a base accessory blueprint that can handle spawning any generic accessory. Each unique hat, jacket, or pair of glasses will then become an instance of this blueprintâmuch like the approach we used for the bear. You will notice some similarities to sections of the main Bear blueprint we set up initially, the reason for this is that it allows us to set up our accessories in such a way that they remain fully independent, allowing them to be viewed and configured on their own, while also making it easy to attach them to a parent (like our Party Bear).
- Setting Up the Parent Scene Node
Navigate to your Accessories folder and create a new blueprintâletâs call it BP_Accessory
. This blueprint will resemble much of the logic from the main bear blueprint but focused on accessories instead of a full character.
In the Blueprint Inputs panel, add a new input of type SceneNode
, naming it something like In-Parent
. This input will determine where in the scene the accessory is attached; if a valid scene node is passed in, the accessory will become a child of that node. If not, it remains independent.
Inside the blueprint, place a CreateSceneNode node. Drag In-Parent
from your variables into the graph and connect it to the Parent pin of CreateSceneNode. This ensures that, if provided, the accessoryâs newly created scene node will be a child of the passed-in parent. For the Name, feel free to use something like âAccessoryâ.
Next, add a private variable of type SceneNode
âcall it Parent
to differentiate it from In-Parent
. Spawn a Set Parent node, linking it to the output of CreateSceneNode. This variable will be used later to anchor any meshes we spawn.
- Handling the MeshConfig
Add another input of type MeshConfig
âweâll call it In-MeshConfig
. This will allow the accessory to either use an existing config provided by a parent blueprint or create its own if nothing is passed.
Drag In-MeshConfig
into the graph and feed it into an IsNull node, then add a Branch node. Wire the boolean output of IsNull to the Condition input of the Branch, splitting the logic based on whether a valid MeshConfig has been provided.
With this branch node in place we can split the execution into two flows:
- True Path (Null): If
In-MeshConfig
is null, weâll create a new MeshConfig. First, add an input of typeResource<Mesh>
âcall itIn-Mesh
âso that we can specify which mesh this accessory will use. Next, spawn a CreateMeshConfig node and connectIn-Mesh
to its Resource pin. - False Path (Not Null): If
In-MeshConfig
is valid, weâll just reuse it.
Add a private variable of type MeshConfig
âletâs call it MeshConfig
âand place Set MeshConfig nodes in each path of the Branch. In the true path, set it to the output of CreateMeshConfig, and in the false path, set it to In-MeshConfig
. This way, the rest of the blueprint can access a âfinalâ MeshConfig variable, regardless of whether we created it or inherited it.
- Spawning the Mesh(es)
Now that weâve laid the groundwork with scene node setup and mesh configuration, itâs time to bring the accessory to life by spawning the mesh itself.
To do this, drop in a SpawnMesh node into your blueprint and connect both execution paths from the earlier Branch node into its execution input. This ensures that no matter which path was takenâwhether the mesh config was passed in or generatedâweâll move forward with spawning the accessory.
The SpawnMesh node requires three inputs, all of which weâve already prepared:
- For the Resource input, connect your
In-Mesh
input. - For the Parent input, hook up the
Parent
variable, which holds the scene node we created earlier. - For the Config input, connect the
MeshConfig
variable, which now holds either the inherited or newly created configuration.
- Binding the Mesh(es)
Just like we did with the eyes, we need to make sure our accessory meshes are properly bound to the bearâs skeleton so they animate correctly with the rest of the body. Otherwise, theyâll stay frozen in place while the Party Bear grooves around.
Weâll follow the same pattern: first, ensure your blueprint includes an input called In-Skeleton
of type MeshRenderer
. This will be the rig that the accessory meshes follow.
After spawning the accessory meshes, insert a Branch node to check whether a valid skeleton has been passed in. You can do this by using the getter for In-Skeleton
, hooking it up to an IsNull node, and feeding that result into the condition input of the branch.
On the FALSE path (meaning the skeleton is valid) drop in a Bind Meshes node to connect the accessory meshes to the skeleton. Just like before, this node needs two inputs:
- Meshes: Connect this to the output from the accessory spawning node.
- Skeleton: Use the In-Skeleton blueprint input here.
- Applying Material(s)
To give our accessory some flair, the final step is to apply a material to the mesh(es) weâve just spawned. While in most cases an accessory will only have a single renderer, UBFâs flexibility means an asset could contain multiple mesh renderers. To future-proof our blueprint, weâll use a For Each node and iterate over all of them.
Start by spawning a For Each node, connect the execution pins into this node from both the TRUE exec flow of the branch node and following up from the BindMeshes node. Next, connect the Renderers
output from the SpawnMesh node into its Array
input. Youâll notice that the Array Element
type automatically updates to match the type of the input arrayâin this case, MeshRenderer
. This loop will give us access to each individual mesh renderer, one at a time.
The ForEach node provides two execution outputs:
- Loop Body: Executes once for each element in the array.
- Exec: Executes once after the loop has finished iterating through all elements.
Weâll use the Loop Body pin to connect a Apply Material node. For the Renderer input of this node, simply use the Array Element
pin from the ForEach loopâthis ensures that each mesh renderer receives the material application.
- Creating a Dynamic PBR Material
Now that weâve got our material setup using the Apply Material node, itâs time to define the material itself. For our accessories, we want this material to be dynamicâcapable of being configured by each accessory instance through graph inputs. This will allow each accessory to specify its own look and feel using custom textures and properties without needing to rewrite the logic each time. We will create a Make PBR Material that resembles the following image:
Letâs walk through how to set up this material in a dynamic way step-by-step:
-
Spawn a Make PBR Material node into your blueprint.
-
Render Mode
Set the Render Mode to
UseDiffuse
, as weâll always want to use a diffuse texture for visual definition. -
Alpha Texture
Create an input into the blueprint named
In-AlphaTexture
of typeResource<Texture>
.Route this through a SetTextureSettings node to disable sRGB, and connect the output into the
AlphaTex
input on the PBR material node.Then, enable
UseAlphaTex
by setting that checkbox totrue
. -
Diffuse Texture
Repeat the process for the diffuse texture:
- Create an input named
In-DiffuseTexture
of typeResource<Texture>
. - Pass it through a SetTextureSettings node, this time with sRGB enabled.
- Connect it to the
DiffuseTex
input of the PBR material.
- Create an input named
-
Base Color
Leave the
BaseColor
input at its default. -
Use Alpha
The
UseAlpha
input should only be enabled if an alpha texture has actually been provided. To achieve this:- Drag a pin from the previously created
Get In-AlphaTexture
node. - Pipe it into an IsNull node, then invert the result using a Not node.
- Connect the result to the
UseAlpha
input.
- Drag a pin from the previously created
-
Fresnel IOR
Set this to
0
. -
Opacity
Set this to
1
for full visibility. -
Emission
To support emissive elements:
- Create an input called
In-EmissionTexture
of typeResource<Texture>
. - Use a SetTextureSettings node to disable sRGB.
- Connect the result to the
EmissiveTex
input. - As before, check if the texture is null, use a Not node, and connect the result to the
UseEmission
boolean input. - Set
EmissionColorBoost
andEmissionTintBoost
to1
. - Leave the
UseEmissionTint
andEmissionTintColor
settings at their defaults.
- Create an input called
-
Normal Map and ORM Textures
Repeat the texture-handling pattern for both:
- Create inputs
In-NormalTexture
andIn-ORMTexture
of typeResource<Texture>
. - Pipe each through SetTextureSettings with sRGB disabled.
- Use IsNull â Not logic to control
UseNormalMap
andUseORM
, respectively. - Connect the textures and booleans to their respective PBR material inputs.
- Final Float Properties
- Set
Occlusion
to1
- Set
Roughness
to0.5
- Set
Metallic
to0.5
Once all your properties have been configured, connect the PBR material node into the Material input of the Apply Material
node you created earlier in the ForEach loop.
And with that, your base accessory blueprint is completeâflexible, modular, and fully customizable from the outside! All that is left is to start creating some accessories!
Creating the Accessory Instances using Blueprint Instances
With our base accessory blueprint now complete, weâre ready to start bringing some actual accessories to life! In this step, weâll create individual Blueprint Instances for each specific accessoryâstarting with a cozy beanie to keep our Party Bear warm.
- Beanie â Cozy, Warm, and Stylish
To begin, navigate to your Accessories
folder in the Project Explorer, right-click and select New Blueprint Instance. Name this instance something descriptive; weâll go with BPI_Accessory_Head_Beanie
. Youâll be prompted to select a base blueprintâchoose the BP_Accessory
blueprint we just finished setting up.
Once your instance is created, head over to the Inspector panel on the left side and open the Overrides section. This is where youâll find all the configurable inputs that we exposed in the base accessory blueprint. Letâs go ahead and provide the correct values for our beanie accessory:
In-Mesh
:PB_Head_Beanie.glb
In-DiffuseTexture
:T_PB_Beanie_Head_BC_1024.png
In-NormalTexture
:T_PB_Beanie_Head_NR_1024.png
In-ORMTexture
:T_PB_Beanie_Head_ORM_64.png
And just like that, weâve got ourselves a blueprint instance for our first accessory!
To test it out, open the UBF Previewer, switch to Live Connection mode, and press Preview from your instanceâs viewport in Studio. If everything is set up correctly, you should now see a snug beanie rendered and ready to be equippedâa perfect fit for our fashionable bear.
- Crown â Fit for a King
For our next accessory, itâs time to treat our Party Bear like the true legend he isâwith a crown. Weâll replicate the exact same steps we followed for the beanie, creating a new blueprint instance based on BP_Accessory
. This time, however, weâll use the following overrides to configure our crown:
In-Mesh
:PB_Head_Crown.glb
In-DiffuseTexture
:T_PB_Crown_Head_BC_1024.png
In-NormalTexture
:T_PB_Crown_Head_NR_1024.png
In-ORMTexture
:T_PB_Crown_Head_ORM_1024.png
Once youâve applied these values, jump into the previewer and admire the royal drip.
- Space Suit â Ready for Lift Off
Next up, itâs time to prepare for zero gravity! For this section, weâll create a space-themed outfit and just like with our previous accessories, weâll base this on the BP_Accessory
blueprint. Create a new blueprint instance and name it something like BPI_Accessory_Clothing_SpaceSuit
. When prompted, select BP_Accessory
as the base blueprint.
In the overrides section of the instance, plug in the following values:
In-Mesh
:PB_Clothing_SpaceSuit.glb
In-DiffuseTexture
:T_PB_SpaceSuit_Clothing_BC_1024.png
In-NormalTexture
:T_PB_SpaceSuit_Clothing_NR_1024.png
In-ORMTexture
:T_PB_SpaceSuit_Clothing_ORM_1024.png
Fire up the Previewer, hit Previewâand just like that, we have an astronaut-ready outfit looking stellar.
- Hawaiian Shirt â Ready for the Tropics
Every great party needs some laid-back island vibes, and nothing says ârelaxed but ready to grooveâ like a vibrant Hawaiian shirt. Weâre going to create this accessory just as we did with the othersâusing our trusty BP_Accessory
blueprint as the foundation.
Create a new blueprint instance in the appropriate folder and name it something like BPI_Accessory_Clothing_HawaiianShirt
. When prompted, set its base to BP_Accessory
.
In the overrides section, set the following values:
In-Mesh
:PB_Clothing_HawaiianShirt.glb
In-DiffuseTexture
:T_PB_HawaiianShirt_Clothing_BC_1024.png
In-NormalTexture
:T_PB_HawaiianShirt_Clothing_NR_1024.png
In-ORMTexture
:T_PB_HawaiianShirt_Clothing_ORM_1024.png
Preview the result and voilĂ âyouâve got yourself a bear-ready beach shirt, just waiting for some sun and waves!
- Cyclops Glasses â One Lens to Rule Them All
For the futuristic fashion-forward bear, nothing makes a statement quite like a single, bold lens. Letâs set up the Cyclops Glasses as their own blueprint instance.
Create a new instance named BPI_Accessory_Eyes_CyclopsGlasses
, based on the BP_Accessory
blueprint.
In the overrides panel, set the following:
In-Mesh
:PB_Eyewear_CyclopsGlasses.glb
In-DiffuseTexture
:T_PB_CyclopsGlasses_Eyewear_BC_1024.png
In-NormalTexture
:T_PB_CyclopsGlasses_Eyewear_NR_1024.png
In-ORMTexture
:T_PB_CyclopsGlasses_Eyewear_ORM_1024.png
Preview this instance and watch your bear get an instant sci-fi makeoverâready for a laser-powered dance floor.
- Eye Patch â A Bear with a Past
Every party has that one guest with a mysterious story and a silent swagger. Give your bear that rugged edge with a battle-worn eye patch.
Create another blueprint instance named BPI_Accessory_Eyes_EyePatch
using BP_Accessory
as the base.
Apply the following input overrides:
In-Mesh
:PB_Eyewear_EyePatch.glb
In-DiffuseTexture
:T_PB_EyePatch_Eyewear_BC_1024.png
In-NormalTexture
:T_PB_EyePatch_Eyewear_NR_1024.png
In-ORMTexture
:T_PB_EyePatch_Eyewear_ORM_1024.png
Now preview your work and youâll see an accessory for a bear whoâs clearly seen some things.
Dressed to Impress â Equipping Our Bear with Accessories
Weâre almost thereâour Party Bear is fully built, and weâve put together a wardrobe of stylish accessories. Now, itâs time to teach our bear how to wear those accessories by wiring them into our main BP_Bear
blueprint.
Leveraging our Bearâs Skeleton
Before we start making use of our accessory blueprint instances, remember that both our accessories and our eyes need a skeleton to bind to. Specifically, each of these blueprints expects an input called In-Skeleton
, which refers to the MeshRenderer of the bearâs body. This allows the meshes to animate correctly in sync with the bearâs movements.
Now hereâs the catch: the bearâs body mesh is actually spawned inside the BP_SpawnBody
blueprintânot directly within BP_Bear
. So we need a way to pass the MeshRenderer
back up to the parent blueprint so it can be forwarded to the accessory blueprints.
To do this, weâll use a Blueprint Output.
Head into the BP_SpawnBody
blueprint and open the Blueprint Outputs section in the inspector. Create a new output of type MeshRenderer
and call it Out-BodySkeleton
.
You may recall that right after spawning the body, we stored the first MeshRenderer
in a variable called BodySkeleton
. All we need to do now is expose that as an output. At the end of the graph, add a SetOutputs
node. This node allows you to specify what values to return to the parent blueprint. Connect the BodySkeleton
variable to the Out-BodySkeleton
input pin.
Since the eyes are spawned within BP_SpawnBody
itself, you should also make sure to connect the BodySkeleton variable to the In-Skeleton input on both of your BP_SpawnEye
blueprint calls.
Back in our BP_Bear
blueprint, youâll now notice that the ExecuteBlueprint2
node calling BP_SpawnBody
now exposes an output pin for Out-BodySkeleton
. Letâs store this value in a new variable named BodySkeleton
of type MeshRenderer
. We can then use this variable to feed the In-Skeleton
input of our clothing accessory node.
Equipping our First Accessory
Time to make use of our created Accessory Blueprint Instances. To do that, weâll now add a new ExecuteBlueprint2
node and tack it on to the end of our execution logic.
When working with the ExecuteBlueprint2
node, you can select a specific blueprint or blueprint instance directly from the dropdown. Once selected, UBF Studio automatically populates the nodeâs inputs and outputs to match the selected blueprintâs interface. You can try this now by selecting one of the accessory blueprint instances we created earlierâsuch as BPI_Accessory_Clothing_HawaiianShirt
âand youâll see all of the exposed inputs appear:
This is a great feature when you want to explicitly override every input. However, in our case, it introduces a subtle issue.
We only want to pass in the MeshConfig
, SceneNode
(Parent), and Skeleton
. The rest of the parametersâlike Mesh
, Textures
, and other visual elementsâshould be defined by the blueprint instance we pass in. Unfortunately, if we select a blueprint instance directly in the node, any unassigned fields are still overridden as null
âwhich unintentionally wipes out the default values inside the instance. In other words, weâre nullifying the behavior of the instance even if we leave those fields empty.
To work around this limitation, weâll create a lightweight blueprint that acts as a template or interface definition. It wonât contain any logic or nodesâit simply mirrors the signature of the inputs we want to pass explicitly into our accessory blueprint. Weâll call it BP_AccessoryTemplate
.
In your Accessories
folder, create a new blueprint and name it BP_AccessoryTemplate
. Inside the Blueprint Inspector, add the following inputsâensuring the names and types match exactly with those from BP_Accessory
:
In-MeshConfig
âMeshConfig
In-Parent
âSceneNode
In-Skeleton
âMeshRenderer
Once complete, return to the BP_Bear
blueprint. In your ExecuteBlueprint2
node, select BP_AccessoryTemplate
from the dropdown. Youâll notice the node now exposes only the three inputs we care aboutâperfect for our needs.
Even though the node is configured with this template, we donât actually want to run that blueprint. At runtime, we want to dynamically execute the real blueprint instanceâlike the Hawaiian shirt. To support this, weâll create an input into BP_Bear
that allows us to specify which accessory blueprint (or blueprint instance) should be used.
Open the Blueprint Inputs section in the inspector panel and create a new input of type Resource<Blueprint>
. Name it In-ClothingBlueprint
. Then, simply drag in the new input into the blueprint and connect it to the Blueprint input pin on the ExecuteBlueprint2
node.
Finally, connect the three required input pins using the variables weâve already prepared:
MeshConfig
âIn-MeshConfig
BearSceneNode
âIn-Parent
BodySkeleton
âIn-Skeleton
With everything wired up, open your BPI_SimpleBear
blueprint instance and set the In-ClothingBlueprint
field to one of your accessory instancesâletâs go with the Hawaiian shirt for that perfect summer vibe.
Save your instance, open the UBF Previewer, and hit Preview in the top-right corner of the viewport.
You should now see your fully dressed bear, complete with laid-back island styleâready to party like itâs luau season in Fluf World!
[SpawnMesh] Failed to get input 'Config'
- this is an expected log and it occurs because the Previewer does not have any built-in configs.The Full Ensemble
With the clothing slot complete, all thatâs left is to wire up the rest of the accessory slots we want to supportâHead and Eyes. Just like before, add two new inputs to your BP_Bear
blueprint:
In-HeadBlueprint
âResource<Blueprint>
In-EyeBlueprint
âResource<Blueprint>
Then, drop in two ExecuteBlueprint2
nodesâone for each accessory typeâand connect them in series at the end of your existing execution flow. For each node:
- Set the blueprint to
BP_AccessoryTemplate
to expose the correct input signature. - Connect your existing variables to the corresponding input pins:
MeshConfig
BearSceneNode
BodySkeleton
- Finally, override the
Blueprint
input by plugging in the matchingIn-HeadBlueprint
orIn-EyeBlueprint
input variable.
Now jump back into your BPI_SimpleBear
blueprint instance, and you should see both In-EyeBlueprint
and In-HeadBlueprint
as available fields. Select your favorite blueprint instances for each slotâweâll go with Cyclops Glasses and the Crownâhit Preview, and there you have itâŠ
A party-ready bear with full drip, from head to toe!
Thatâs a WrapâFluf Worldâs Freshest Fit
Youâve done it! Weâve gone from a humble base blueprint to a fully modular, mix-and-match dressing system worthy of the Fluf World Fashion Show runway.
With just a few reusable componentsâsmart use of nested blueprints, input parameters, and dynamic blueprint instancesâweâve given Party Bear the ultimate wardrobe. From cozy beanies to space suits, and stylish eyewear to royalty-approved crowns, your bear can now dress for any occasion⊠in real time, no patching required.
Even better, this system is fully extensible. Add new accessories, create more blueprint instances, or even build an entire outfit managerâthe possibilities are endless. Whether Party Bear is headed to a beach party, outer space, or a secret pirate rave, heâll always be dressed to impress.
So go ahead, hit that Preview button one last time and watch your bear shine.