Sunday, September 14, 2025

Intro to Blueprints

Treasure Chest



1. Exported a treasure chest asset from FAB. Created a rig and "open chest" animation in Maya. Imported it into my project as a skeletal mesh and an animation.

2. Created a montage from the imported animation. Disabled the enable auto blend settings so the animation would stop playing once over. 


3. Created an animation blueprint to control the skeletal mesh animation.


4. Created a blueprint for the chest. Added a "G" keyboard input so that when the "G" is pressed the chest animation plays.


5. Created a widget blueprint using the user interface. I ended up not liking how it looked, so I created a different way to pop up a text using the Niagara System, paired with my custom text asset (which I converted into a material), to achieve a pop-up in the level on top of the chest instead. I chose to do the Niagara system because I want the text sprite to rotate with the camera. I kept the widget pop-up in the level blueprint for documentation purposes.






6. Create a collision box to act as a trigger box (as learned in class) so that when the player gets close to the chest, the text pops up (the Niagara system activates), and when the player moves away from the chest, the text goes away.

7. Next, I created a translucent glow material for the chest so I could make it emit an outline. Since the chest poly count is low, it looked weird, so I duplicated and then subdivided the static mesh of the chest in Maya. In the materials, I made the outside of the mesh transparent and the inside glow using a "twosidedsign" node paired with a lerp node. I added an offset to the world position normals to create the outlined effect.

I created a scalar material node in the blueprint and connected it to a new timeline so the material would "blink." The timeline has 3 keyframes where its value goes down, up, then down. I created a Boolean variable to determine whether the outline is active based on the actor's position relative to the trigger box. I connected it to the existing On Component Begin Overlap / On Component End Overlap events. I used the same variable for when the chest is opened ("G" is pressed), but with a "Set Visibility" node to ensure it completely disappears when the chest is opened. 



























8. Next, I wanted to fix the "G" input event so that it would only work when the player is inside the trigger box (I created a platform in the scene that is the same size as the trigger box to show when "G" event can occur). Additionally, I modified the text pop-up so that it would only appear when the player is in the trigger box. I used the same method of creating a Boolean variable and getting its set node to determine when and when not to activate the event. 

9. Finally, for my dynamic material, I connected it to the press "G" event's animation montage so that after the chest opens, a pearl with an emissive material would gradually start to glow. I used another timeline node with a glow track to animate the emissive.

 







This is how the final BP_Chest ended up looking:












How it looks in the game scene:





















Better Quality Video:



Directory Structure:

1. I created a new level in our <YourName>_HW2 previous project (//CLASSES/Cohort22/Students/Jocelyn.Fayola/Tech Art/JocelynFayola_HW/)






































2. Created a new level named HW4Blueprints
(//CLASSES/Cohort22/Students/Jocelyn.Fayola/Tech Art/JocelynFayola_HW/JocelynFayola_HW2/Content/TechArt/Maps/HW4Blueprints.umap)

















3. My BP_Chest is in a separate folder under the Content/TechArt folder
(//CLASSES/Cohort22/Students/Jocelyn.Fayola/Tech Art/JocelynFayola_HW/JocelynFayola_HW2/Content/TechArt/MyBlueprint/ChestBP/BP_Chest.uasset)

4. All other assets used are in this Tech Art folder. The original treasure chest static mesh should be under the FAB project folder. 

No comments:

Post a Comment

Start of FIEA Portfolio