Immediate Triggers and Other Blueprints

As the final exhibition neared closer, I focused on enhancing a few different aspects of our project based on our latest dress rehearsal: restart button for the performance, adding fx based on immediate feedback from touch sensors, and fully integrating post-process settings based on discomfort level.

I started by adding a restart blueprint to our project. This process was fairly easy and much simpler than I had imagined. With the following blueprint, I was able to use the "R" key on the keyboard to restart the scene instead of shutting down nDisplay and launching it all over again.



Next, I worked on integrating post-process settings into our main camera. As I had figured out how to connect the camera I wanted to nDisplay and bring it into our master blueprint already, all that was left now was to pick the post-process effects we liked and adjust the settings as we needed.

We decided to work with the saturation, contrast, and film grain. As the discomfort level of the performer increases, these effects would also gradually increase on screen. Paired with other effects such as lights and particle effects, the mood of the scene would now get even darker and creepier.

(Post-process blueprint controlling saturation, contrast, and film grain.)

(Rest of the blueprint connecting post-process nodes to the touch input.)


Finally, I had to figure out a way to implement some visual effects based on the area that was being touched. We decided to implement these triggers because it would help the audience realize that their touching (and the touch area) has an immediate effect on the puppet and the scene.

My initial idea was to parent the FX emitters to the puppet as a child, but I realized this wouldn't work because the emitters exist inside the blueprint and can't be brought out. So I decided to try and see if I could bring the puppet skeleton into the blueprint and get coordinates of the joints, where the emitters would spawn when triggered.

I've found that there are multiple nodes to get joint/socket locations from a skeleton; some local, some global, some for playable characters, some for static, etc. After testing almost all of them, I realized that I needed to create sockets on our puppet's skeleton myself because getting the location of joints did not work.

To fix this, I opened the skeleton of our puppet and looked through the joint hierarchy. From here, I could right-click on a joint and create a socket that would be attached to the selected joint. I took note of the exact name of the joint as it would become useful in the future.


Now, I could use the "Get Socket Location" node in the blueprint and type in the name of the socket to check its coordinates. I connected a "Print String" function to the blueprint to troubleshoot. When I started the scene, I finally started getting some x,y,z coordinates in the printed string! However, all of them were 0,0,0 despite the puppet being placed in an arbitrary location within the scene that was not the origin.

I realized that the blueprint was either getting the local translation of the socket or it wasn't connected correctly to the puppet at all. The answer turned out to be both!

After testing more nodes and settings, I've found out that the issue lay with the skeleton variable I created in the master blueprint. This variable was grabbing the base puppet skeleton, however, the puppet's motions in the scene were coming through the skeleton inside the animation blueprint. 

When I changed the type of the skeleton variable from "Skeletal Mesh" to "Skeletal Mesh Actor", I was able to pick the animation blueprint actor from the contents and bring it into the master blueprint. When I edited the connections based on this change, I finally got the global translation of the socket as I hoped! 

For a quick test, I connected the output of the socket location to the "location" pin of Spawn Emitter and successfully had a fire fx emit from the hand of the puppet. For a blueprint that looks very brief and easy, I wouldn't have imagined that it would take me 3 hours to figure out successfully between all the settings and options, phew...

Comments

Popular posts from this blog

DMX in Unreal Engine

Final Tests on CRMX

Pixel Mapping