Post

Ever Studio - Services (Self Employment)

Ever Studio - Services (Self Employment)

Encode/Decode Data via PNG (Unreal Engine)

A client had a brief where they wanted data to be serialized into the transparent pixels of an image they generated during gameplay. Since the transparent sections weren’t display to the user, this allowed for the RGB values to be filled sequentially with the user data. This allowed the image to be shared and for the data to be loaded in another instance of the game. I created a C++ plugin which provided some functions to encode/decode data to and from a PNG file. Because there are several potential failure points that could happen during these processes, I created enum states that are returned after the functions are called and gave the client a path to handle those states.

Here you can see the test data that was used during encoding and compared against when decoding:
Here are the enum return states:
This is a test image which has spread out transparency:
This is a debug visualisation of the resulting data being encoded into the transparent pixels:

Physx asset runtime changes

A developer wanted the ability to adjust properties such as body collision enabled state, bone constraint rotation, body rotation and shape specific extents/radius within a physics asset. This was not possible to control via blueprint by default. Upon investigation I believe Epic may have made that decision as changes to those values require the physics bodies to be recreated which has the potential to cause unusual behaviour (e.g. physics bodies flying around). The client only wanted the changes to happen once on the creation of the mesh at runtime, and they also wanted the ability for the changes to be instanced between different meshes. I created a C++ UPlugin containing blueprint nodes that allowed for transient duplicates of the original physics asset to be made and for the properties previously mentioned to be exposed.

Physics body rotation:

Physics body collision toggle:

Physics constraint rotation: