Thursday, November 17, 2022

VR Animation Progress - State Machines and Character Animations!

 Hello everybody in the world!

It's me and I'm BACK with another weekly progress update for my VR Project. This week, I've been busy creating some fun animations and implementing them in the engine! It has been a lot of fun getting my animations in engine, while also working closely with my team and adjusting some animations based on feedback and the overall VR experience. 

So, this week was my first time EVER using VR at all. It really felt nauseating but it was also a lot of fun. It also showed me first-hand some of the pitfalls associated with my VR animations, so I'm back to the drawing board with a few of the tentacle and claw animations. 

One thing I noticed is that the remotes and props kind of "phase" through my arms due to the fact that I didn't animate them to scale with the remote. So, something I will be trying to do this week is animate them with my props directly in Maya, so I can make sure stuff isn't clipping through the hands. 

Thanks to wonderful collaboration between me, Zach, Aimee, and Bailee, I have been able to really get a feel for animating with VR in mind. My stuff is far from perfect, but the more I iterate on it, the more comfortable I get.

So, before I really get down to the brass tacks, let's check out a quick reel of everything I did this week! 


So, we have our first proxy model of Dr. Frankenstein in engine! I was having issues with some deformation due to issues with geometry, but it's a proxy model, so that is to be expected. For a proxy, Aimee really did an excellent job and I had a lot of fun doing wacky things to Dr. Frankenstein! 

So, I mentioned that things were put into engine. The question is HOW? Well, I uploaded all of my animation states for Dr. Frankenstein and then popped them into an Animation Blueprint. Then, the real magic started to happen, as I brought an animation state machine to life! 


Above, you can see the animation state machine pumping life into Dr. Frankenstein! In the video below, he's actually moving and breathing in Unreal! I've recorded all the work I did with the Animation Blueprint and Character Blueprint as well. I'll go into further detail about those in just a little bit. Here's that video first! 


So one of the coolest things about this whole process is I got to watch my animation come to life before my eyes through the power of Booleans and animation states. It was cool to watch Dr. Frankenstein go from static to moving with just a few clicks of the mouse! 

What's even better is that he moves in the simulation of our game. Wanna see? Come check out THIS video! 


For further reference, here are those animations in engine. As you can see, each of them is in a unique pose, which corresponds to the animation I created in Maya. 



And here is where the magic is located! I made an Actor Blueprint Class and Animation Blueprint. Bailee set up the Skeleton and Physics Asset, while I stuck to making my animations work both in and outside of engine. 


For further clarification, here is that State Machine again. I have the Idle, Action, and two hit poses. I've also added some "fun" poses to the mix, which I commented out separately. These poses include a crotch hit and a ragdoll animation. I want to work to make them work succinctly in engine, but I am happy with the result I've gotten this week. That just means I'll need to iterate for next week! 


Here is that Event Graph for you as well. This is part of the Character Blueprint and essentially lets the engine know whether or not to start a particular action. As you can see, I have assigned some Booleans on the bottom left--  IsMonsterNear, IsGettingSlapped, and IsIdle. These names are subject to change, as I would like to discuss them with the group after this week's workshop. 


Here's another look at my Character Blueprint! One pitfall I had was I was having issues with getting the white sphere out of the picture. I couldn't select or move it, but other than that, I had no issues assigning collision and a capsule to my model. Now, he's got some collision for our monster to interact with! I do want to speak with the group regarding the size of the collision, but I think this is a good start for a character proxy! 


And here is that moment you've all been waiting for-- PERFORCE! Here is a screenshot of me adding about half of my files to the project. I took this after I'd added my animations, which I will show you below this image.


And here is the VR Depot folder, where all of my animations and .uassets live! This is where I uploaded all my Doctor, Remote, Claw, and Tentacle animations in the past. We also have an Art Depot, which I will show below all this. But yeah, it's a lot of files and I think my group has done a great job of creating helpful directories for everyone to follow. It definitely made doing the state machine much easier. 

Speaking of directories, here's that directory structure! I tried to include my FBX, MA, and MB files to make everything easy for my team to find. And don't worry, I'm also importing the files in engine correctly too, so I can get the .uasset files! I just like keeping this structure so my team can find stuff no matter where it is. It's like a failsafe inside of a failsafe.

Since the structures are the same, I've decided to open up the Art Depot file structures, so you can see what I've submitted over the past few weeks. These are all the FBX, MA, and MB files. To clarify where there are so many types of files- FBX is what Unreal needs, MA is what my team prefers, and MB is what I prefer, so I figured a happy medium would be to save them all in the Depots! 

This is the spot I put all of the Dr. Frank raw files, so no .uasset files here like above! These are all my new animations. All six of them have been saved in the appropriate 3 formats.


Since you just saw the Dr. Frank file structure, it should not surprise you to see that the Remote file structure is largely the same. Three file types, multiple animations. That way, the object has plenty of states. Pressed, unpressed, and being pressed! 


Now here's where the real fun starts... the TENTACLE! You can tell I've iterated on this a lot because there are a ton of individual animations. I added a new Slap animation this week, which is in this picture. 

I called it TentacleSlapBigger because it is a bigger slap than the previous one. I wanted to add it to the tentacle state machine, but wanted to get feedback from my group before doing anything too dire. So, we will see if they like it tomorrow. I just didn't want any surprises to hit anyone over our workshop in Common Art. 




And here is the same thing I did as above, but for the claw this time! I have been working hard on this too, which is why I added a couple of new animations to the reel at the top of my post. I'm still trying to make the crab claw more dynamic, but since crabs largely use door-hinge physics on their claw, there is not a lot of exaggeration I can do without the animations looking uncanny.

But, huge props to Bailee for keepin' it real and helping me with all of the feedback! She was an MVP when it came to helping me with my art process and animations. She was great with giving me helpful advice on how to make my VR animations look better and interact with the environment more.



Alright, so yeah. That's my file structure and that was how I spent a lot of my week. I will continue meeting with my group to get the animations right for workshop! 

See you all next week or during the workshop! 

No comments:

Post a Comment