Week 16: Learning Unity and Blender in preparation for Ludum Dare 48

A 3D-modeled still-life composition of apples around a bowl, with one apple cut in half.
How do you like them apples?
I learned how to model 3D stuff in Blender last week.

tl;dr: I learned to use Unity and Blender in preparation for the Ludum Dare game jam.

What happened last week?

I did a game jam (Ludum Dare 48) over the weekend with some friends. They wanted to use a different game engine than I usually use, and they wanted to do stuff in 3D instead of 2D. So I spent last week learning a bunch of new stuff!

I probably won't use any of this new knowledge again this year, but understanding this big part of the game-dev world is pretty important, and I do think I'll use these skills again at some point.

The game jam!

I'll talk about the game jam in a follow-up post (it's not actually over yet!).

Laundry list

A 3D-modeled apple shape.
My apple, before adding anything fancy like textures.
A 3D model of some initial humanoid blocking for a baby.
The initial blocking for my baby model.
  • Read some docs on the animation system in Unity.
  • Decided/learned that in order to create an animated humanoid model from scratch, I need to define the animation clips within Blender.
  • Watched an ok tutorial on how to use Blender’s animation tools, in general.
  • Read a really great tutorial on how to create simple humanoid models in Blender.
  • Fought with Blender’s automatic weight painting being very buggy.
    • It was fine until I added fingers, then the entire body exploded. All bones were given completely random weight associations with remote parts of the body.
    • In the end, I had to manually re-assign all node groups for each bone.
  • Animated my baby model in Blender.
    • Created the idle animation without IK.
    • Then, when starting the walk animation, I noticed that my feet would dig into the ground between keys, and I learned that an IK rig is definitely the way to set up animations.
    • Followed a great quick tutorial on how to set up IK in Blender.
    • Created a walking animation, and re-did my idle animation.
    • Of course, adding the IK rig broke importing into Unity, so I fought with that for a bit.
      • The main issue was that I’d changed the parents of the foot and hand bones to be new IK bones, and these new IK bones weren’t parented to the rest of the skeleton.
      • Unity then complained that there were no foot or hand bones.
      • After a lot of Googling, I figured out that I could just fix this with the standard ctrl+P parenting flow within Blender.
      • However, it didn’t seem like this would work at first, because Unity was still reporting everything as SNAFU.
      • Yet again, after hours of frustrated head-banging, I found that just closing Unity and re-opening it magically fixed everything...
An animation of a 3D model of a baby who's wobbling on their feet.
My baby's "idle" animation.
  • Created a quick dandelion model in Blender.
A 3D model of a dandelion.
A dandelion!
  • Got my baby model working in Unity.
  • Followed a quick tutorial on setting up a character control within Unity.
  • Followed a terrain tutorial.
  • Added dandelion spawning and collecting logic.
  • Added a simple HUD to show dandelion count.
  • Debugged an issue with Unity’s WebGL exports not working out-of-the-box.
    • The default export configuration requires a server configuration that will handle something special with compressed files.
    • Not sure what exactly...
    • But I had to turn off file compression (in project settings) in order to be able to run the game from a static server either on my local machine or in GitHub Pages.
    • But, somehow, Unity’s local server for demoing the freshly built WebGL export was able to handle the compressed file.... Oh well. I don’t care about compression for this.
  • Finished demo.
A screen recording of my animated baby model walking around a meadow collecting dandelions.
The finished product!
Just a baby collecting dandelions in a meadow.

What's next?

  • Resume work on my Surfacer framework!
    • Fix some current bugs and quick improvements.
    • Bypass run-time physics, and just force positions to match those expected from the platform graph.
    • Show the current expected computer players' future positions with phantom indicators when the user is dragging and previewing their navigation trajectory.

🎉 Cheers!

This is a simple icon representing my sabbatical.