Today I started to bring the models that I had created in MagicaVoxel and Blender to life! As I'm shifting my focus for the voxel weapons project from just one game (Hyper Light Drifter) to two (Hyper Light Drifter & Robo Recall) I saw the chance to bring these weapons to life as Robo Recall mods so they could be animated and used as actually weapons, not just models.
The pistol you see there is much more detailed than the previous Hyper Light pistol and was created in an exploded view so the exported obj model could be rigged inside Blender -
This new weapon in the line-up had to be torn apart so that the top slide, the carabiner, the trigger, and the lower pistol body could all have their own bones. the weapon was then exported as an fbx file and brought into UE4's Robo Recall mod kit.
The imported model in UE4 consists of several parts:
1) The green object is the mesh's material. It's preview is dark here but it's actually a very bright model
2) The red object is the texture. Since this is a voxel model the texture is very simple.
3) The purple object is the mesh itself with all it's import transforms
4) The orange object is the physics asset, a group of collision boxes that decide when the object has been hit/hit something in game.
5) The blue object is the skeleton, the armature we created inside of Blender.
UE4's material editor is quite slow on 16GB DDR3 machines, for some reason, but most of the node creation I needed for this was precreated for Robo Recall, so luckily I didn't need to wait around too long.
UE4 automatically creates physics objects in the shape of sphylls (essentially capsuloid pill shapes) around key bones of a mesh. Unfortunately, these sphylls often intercollide and will mess up the skeleton, so I had to delete them all and replace them with basic box colliders. This also helps the gun not roll around on the floor when dropped.
Unfortunately, when I imported the model it wasn't facing the right direction, and it wasn't at 0,0,0, so I had a lot of tweaks to make to get the mesh to sit right in the player's hand.