I went and processed a few more animations for a basic locomotion moveset and hooked it up to WASD. The voxel fighting game is playable! (in the narrowest terms possible.)
Thus far I have:
- Walk Forward
- Walk Back (reversed forward)
There are actually slots for 3 different jumps, but I have yet to animate variations for forward and back. I might do front and back flips for those.
The walk back speed is slightly slower than the walk forward speed. Similarly, jumping away is more shallow than jumping forward. The idea is that this will make the game a bit more aggressive, as a retreating player will get caught by an advancing player. The values for the retreating velocities are adjustable, of course.
I am not sure how I feel about the static crouch and jump frames. They look a bit lifeless compared to the way the stance and walk animation swim through the voxel field. I may experiment with adding a few frames of animation to loop through in order to bring a little dynamism to those moves.
Also on display is a bit of triplanar worldspace uv mapping, giving the ground and polygonal blocks in the background a voxelized look via a normal map. I took care to make sure that the normal map tiles at 5cm of world space, and objects all snap to that gridsize. No partial voxels!
Thanks, and please remember to subscribe!
Here’s another animation test, this time the forward walk cycle. At the moment, the backward walk cycle is the same, just reversed, so no point in showing it now. Eventually I’ll animate a unique walk backwards with the character leaning away from the direction of travel.
So how does this work?
The high level view is that as previously mentioned, these are preprocessed frames of geometry, imported into UE4 as static meshes. The frames are stored in an array, and then a function loops through, swapping each mesh in and out with a bit of a delay in between.
Aesthetically, there’s still a bit of work to do here. For instance, as seen in the belt area there’s a bit of noise that needs touching up.
I am also not sure how I feel about the character’s proportions. I typically prefer a bit of a beefier style character, and to me his torso looks a little slim here.
As you can tell by the stationary floor pattern, the character isn’t actually going anywhere here; he’s just animating in place. Hooking this up as a controllable a character is a job and blog post for another day.
Comments on the blog are disabled, so probably best to direct feedback and questions to me over on the Twitter thread.
Thanks, and don’t forget to subscribe!
This tweet seems to have blown up a bit, as did its counterpart on the Unreal Engine Developers Community over on Facebook.
The positive reception is quite nice to see, taking my misgivings regarding voxel graphics into account, not to mention the work that went into it.
I am very appreciative for all the interest and kind words, thank you.
There were a number of questions and a bit of speculation as to what we’re looking at here. I will go into more detail as to how I did it at a later date, but as stated in the original post, this is an early work in progress test of the frame based, voxel animation system I am working on in Unreal Engine.
And what does that mean exactly?
These are preprocessed, 3D frames of animation which were imported into UE4, where they were animated via a custom animation feature.
What this isn’t:
- A post process material effect
- Realtime voxelization
- A Skinned and rigged mesh
- Animated in MagicaVoxel
Good guesses though! And please: If anyone comes up with a performant realtime voxelization solution that does all the things I need, let me know immediately. The pipeline I have going right now is rough. The less work I have to do manually, the better. 😉
Thanks for reading, and please be sure to subscribe for notifications of new content!