Next Broadcast

Sculpt and animate Main Character of Stealth Game (UE4)

CmdrCookie GameDev DK30 Quarantine 2020 4 5

Description

An ongoing project I have is a stealth action game in UE4. I’m creating the main character, using this as an opportunity to properly learn sculpting a base mesh and work with clothing and then animate all of that.

Recent Updates

CmdrCookie 5 years ago

I was trying to wrap up the DK30 by getting in a stopping animation and a turn animation but only managed the former. That said, I consider this dk30 completed and then some even with a week headstart! With the quarantine going on I spent way more time than I initially expected and crushed my goal of 2 hours a day.

As a final thing I got some simple little dust clouds when running and stop animations.

I wanted to have a single capture containing the end result of everything so here’s a 30 second clip of the character with all of the animations.

https://i.imgur.com/1c1qlb6.mp4

CmdrCookie 5 years ago

More traversal stuff! It was another good practice opportunity for root motion with the climb up animation. Previously I just had the forward roll which was my first attempt at it. Also figured out a good structure for getting lerping and timelines working inside functions, which was something I didn’t really know how to handle in UE4 before. That’ll let me smooth out some of the more stuttery stuff.

That said, the climbing turned out alright for a first shot animating it. Seeing it in action now it looks a bit janky but shouldn’t be too bad to iterate on now that its actually working in action.

CmdrCookie 5 years ago

This project is teaching me that I think I just really like animating! The past few days i’ve been working on additional animations for climbing, strafing, and weapon related animations like sheathing/unsheathing and stances.

The latest implemented in the game are the animations for sheathing and unsheathing a weapon. It was a solid test of implementing layered animations in UE4. What that results in is the upper torso can play the sheathing animation while the lower body can continue with whatever animation was playing, like so.

And then I spun up a blendspace for strafing around. It was the first one from scratch that wasn’t just one dimensional and I realized some of the diagonals don’t blend well so I might have to make dedicated animations for those. I’m that much closer to getting some combat in place though!

CmdrCookie 5 years ago

The past few days have been a lot of heads down time. Crushing the “at least 2 hours a day” goal that I’d set out. I started out creating a lot of new animations to work with. Things like look aim offsets, jumping, wall running, falling, landing and then some.

After that I started on some wall running! I quickly found myself overcomplicating things in a load of vector math that I didn’t really need to be doing but in the end I came out pretty happy with the gif below! As expected, now that it’s implemented, i’d like to do another pass on the wall running and the jumping animation, as well as tweak the feel of it all.

Next up though I’m going to keep working through the other animations I have created, so getting the landing animations hooked up, connecting the look aim-offsets, and getting a 180 turn in place when doing a quick turn while sprinting.

CmdrCookie 5 years ago

Managed to clean up the IK a bit today. A few miscellaneous things like disabling IK when jumping, adding some interpolating, and just cleaning up some of the blueprint logic.

Most importantly though, the feet match the surface normal that they’re on, meaning the feet won’t float when on an angled surface!

Now that the IK is ok and the animation controller is in place, I want to read up a little bit on Aim Offsets and some animation blending, and then get cracking at a whole lot of animating over the next couple days. I want to make some generic stuff like throwing and attacking that’ll let me key off of that and start working on actual gameplay mechanics.

CmdrCookie 5 years ago

With this update, I’ve officially accomplished everything I set out to do with this dk30!

I buckled down on figuring out IK. I struggle with this a lot, running through various implementations and documentations on how to get IK working for foot placements. There’s so many ways to implement it and so many puzzle pieces that need to line up before it works, and with me doing this for the first time, it was pretty difficult to know what the problems were when they happened.

That said it was a big moment when it finally worked! My plan on future projects is to use feet IK as my litmus test to ensure my mesh, rig, and animations, are all built out correctly as I quickly realized many of small issues across the board. Things like improper vertex weights, poorly imported bones, bad blueprint logic, etc. But now that’s the IK is working, I’m more confident that the underlying pieces are rock solid (outside of just some additional clean up I can do on the IK like you’ll see at the end of the gif)

Now i’m on the victory lap of hitting some of the stretch goals.

  1. Flesh out the Foot IK to handle foot rotation to align with non-perpendicular surfaces.
  2. Create hand IK for touching a wall when standing/crouching next to it.
  3. Create Animations for strafing when locked on to a target.
  4. Create more animations for crouching/siddling up against a wall
  5. Make more stretch goals

CmdrCookie 5 years ago

Now i’m on the fun parts so i’m making consistent progress. Working in the crouching movement as well as the roll into the animation controller. Also managed to figure out the way I was doing “cloth” physics for the hair/ears/scarf was entirely wrong and now I have it hooked up the right way (with some tweaking still tbd).

That leaves me at the last goal for this project which is to figure out how to implement ik for the feet when movement to ground the movement a bit better. Since I’m ahead of schedule though I think i’m going to take a detour to clean up the animations with the following:

  1. Make the running faster and cleaner - he looks like he’s running into the wind or through molasses right now
  2. Lengthen the distance of the roll to give it more speed and clean up the ending to flow into movement better
  3. Sharpen up the crouch walking to just not look so goofy.

CmdrCookie 5 years ago

So of course every time I go back to import things into UE4, I feel like I encounter a new problem or an old one comes back. This time I had animations rotated off 90 degrees but the base models are fine. Unreal has plenty of options when importing, one of which being able to set a desired transform and rotation, which is how I’m currently solving it. I much prefer to get things “right” from the start in blender to avoid bandaid after bandaid but for now i’m just going to cross my fingers that this doesn’t cause issues down the road, and if so we’ll fix em when we see them.

All that said, today was huge as I finally got the animations in and hooked up to an animation controller for the character blueprint I already had in place for the original guy way back at the start. So that’s it! Of course I still have more for this project and more that I want to do but this was the end to end process of creating a character and every step between (maybe not everything, theres still texturing I’d like to dive into further, more complex rigging, etc).

Next up is to further flesh out the animation controller for crouching/sneaking, and then rolling.

CmdrCookie 5 years ago

Ok lots of animating over the past two days!

  1. Blocked out a roll animation that’s such a mess I didn’t bother gif’ing it. What it allowed me to do though was test out root motion animation once I import it into Unreal and everything was looking good with my process. No incorrect directions or wonky scaling. The last step is to actually connect it to an animation controller but everything up to now looks good so I’ll solve that later.

  2. I redid the Run animation. All of these are just a quick block out but it was really bugging me so I cleaned things up.

  3. Did a walking/sneaking animation. I did both a standing and a crouching version, but in hindsight that probably could be solved in Unreal with some blending. They’re separate now though so maybe that’ll help later.

I started this DK30 a bit early so I’m still right on schedule. I think once I do a clean up on the roll tomorrow, I’ll move away from the animating and work more in UE4 and build out the animation controller.

CmdrCookie 5 years ago

Yesterday I cleaned up most of the weights that were causing issues with some of the meshes connecting and cleaned up various issues with the rig. Its still not perfect but its passable for now.

Today I’ve done a first pass on a standing idle, a crouching idle, and a running animation. Next up I want to animate something that I can test root animation as that was something that gave me a ton of difficulties in the past. I’m thinking I’ll animate a forward roll and then work on importing that fresh into UE4 to check everythings working as intended.

CmdrCookie 5 years ago

Today I spent some time figuring out wiggle physics for the hair and ears and things. I also wrapped my head around how to make modular characters out of separate meshes rather than one monolithic mesh for the whole character. I don’t plan on putting that specifically to use, but going forward i’m thinking it’ll be good to keep things modular if only for the practice.

Next up I wanted to start animating but I think I really just need to clean up the sloppy weight painting as it was mostly auto generated through blender. I’m expecting that to be the midpoint-slog of this project so I might pivot to something else for a little bit if I start losing motivation.

CmdrCookie 5 years ago

Struggled a bit today with some weight painting issues. I’ve learned the “blender-recommended” way for mirroring weight painting now, so I have a standard process for that going forward once I go back to clean up the weight painting.

For now though, moving forward, I’ve imported the character into UE4 and it wasn’t looking to bad to boot! I also noticed in the next version of UE4, they have some really interesting Control Rig plugin that looks to allow for rigging/animating right within UE4 which seems pretty incredible. That’s resulted in me working on getting an install of that version up and running and I’m hoping to play with that a bit tomorrow.

Next up, it looks like I have some issues with the empty bones I was planning to use for the hair and scarf physics, so I expect most of my weekend to be spending time troubleshooting that stuff and working with the new rigging plugin stuff.

CmdrCookie 5 years ago

Worked on the hand rig and added jiggle-bones for the hair and ears. For the hand rig, I don’t quite have a full controller for it but I like the current balance in the gif below where it helps with finger curls and everything else I can just pose manually. For now I’m hoping thats a good enough balance without me over engineering this.

As for the wiggly hair, ears, and scarf, I have no idea how to realistically accomplish that. I have the bones that I think i’ll need in place for now. So I think my next step is going to be to quickly pose an idle animation, and then get this guy into UE4 sooner rather than later. I already quickly dropped him into UE4 as is, to ensure the scale and rotation of things are looking good so far but I think just getting into UE4 and testing some of this stuff is going to help before going to far down a wrong path.

CmdrCookie 5 years ago

Ok, I lied again! I ended up working on the textures a bit and quickly spun up materials on a first pass to help visualize things. I did actually start on the rig under the hood, using the rig I had from the last dk30 as a base. So far I’ve expanded upon the hands, because we have fingers now! Next is to build out some nicer hand/finger controls so I don’t need to be manually posing each finger joint when I keyframe the animations. I also want to have the hair, ears, and scarf react with some jiggle bones so that’s the next thing for me to learn the best way to implement.

CmdrCookie 5 years ago

Alright just a silly amount of time spent on hair but it’s done now at least. Thats pretty much it for the base mesh though! There’s proportions I’d like to fix, connections in the meshes that i’d like to clean up, etc. but in spirit of the dk30 and moving forward i’m going to move on. Next up, rigging! (If you think i’m ignoring texturing, you’d be right. I enjoy animating far more so I think i’ll build some momentum again doing that and hit the texturing later.)

CmdrCookie 5 years ago

Neck and forearms connected! I’m moving on to the hair which I’m guessing is going to take me most of the next day I spend this weekend as I don’t really know how I’m going to tackle that and it’s not quite as simple as sculpt > retopo, at least from what I’m thinking.

After that, I think I’m going to spend all my willpower to leave things as is, and really just connect the separate meshes together and keep it moving.

CmdrCookie 5 years ago

So like usual, I ignored the the idea I ended the last post on and went with an entirely different task - the face! I caught myself rethinking and redoing, so i’m trying to reel myself in and focus on making progress for now and not get stuck in tweaking-limbo.

So here we have generic-elf man. I completely underestimated how difficult the ears were going to be but for a my first retopo of a head/face, I’m pretty happy with where it’s at! Next up is to finish up the neck, the hair, and then connect the forearms to wrap things up for the model.

CmdrCookie 5 years ago

Today I got some inspiration for the style I want to go for. Originally I was going towards generic ninja gear but I think i’m pivoting towards more realistic/modern clothing like sneakers, hoodies, etc.

So the progress made today was reworking the ‘vest’ and feet into a proper shirt and shoes. Next, I want to rework the pants into baggy cargo pants of sorts and rework the glove/leg wraps.

CmdrCookie 5 years ago

Wrapped up the rest of the fingers on the gloves today. Also did a pass over on shoes/tabi. Spent some time to properly learn the polybuild tool in blender today as well which is making the process way faster and smoother.

Next up I think I’m going to work on re-topo’ing the chest and upper arms. I’m still feeling out the exact look I want, deciding if I want some upper armor or shoulder pads or something else.

CmdrCookie 5 years ago

Today’s progress was getting a scarf blocked out, the wristwrap/gauntlents blocked, and then started on the hands. The hands being the part that consumed most of the time. I’m finding myself spending/wasting more time than i’d like on the smaller details that likely won’t matter, so i’m trying to shake that off for now.

Either way, solid progress! I’m noticing this is half, blocking out the clothing, and half just retopo-ing the sculpt. Without having done this before or really knowing the “right” way, i’m sorta just feeling things out as we go.

CmdrCookie 5 years ago

Spent the past day reworking the hands and little bits of the rest of the sculpt. This morning I pivoted to blocking out some of the clothing/armor for now. My hope is getting some clothes in place will give me a better direction of the look before I go back and clean up the face/hair.

CmdrCookie 5 years ago

Here’s where I’m starting at on the dk30 with my first attempt at sculpting a character rather than just extruding cubes over and over. I have no goal in mind other than a stylized character with mostly realistic proportions.

For context, this is the current state of the game and the current model i’m using:

Estimated Timeframe

Apr 15th - May 23rd

Week 1 Goal

Spend at least 2 hours every day! TODOs: Work on the base sculpt and start blocking out clothing.

Week 2 Goal

Spend at least 2 hours every day!

TODOs:

  • continue to block out clothing and retopo the base mesh.
  • Start rigging the model.

Week 3 Goal

Spend at least 2 hours every day!

TODOs:

  • Finish the rig
  • Begin animating.
  • Animate Standing Idle, Crouching Idle, Walk, Crouch Walk, Sprint

Week 4 Goal

Spend at least 2 hours every day!

TODOs:

  • Import to UE4 and build out animation controller.
  • Implement some sort of IK for feet.

Stretch Goals:

  • Work on aim offsets
  • Additional IK for more physical movement and interaction with the environment.

Tags

  • UE4
  • Blender
  • Animation
  • Sculpt
  • GameDev