Wednesday, 9 November 2016
Proof of tech.
Proof of tech Goal:
Importing animation to Unreal and blending animations.
So, for starters...
Before, I was to actually start acting, I wanted to get some background information about how unreal works with animation and what the best way was to go about doing so.
Unreal 4 has a new animation system known as "Persona". It's a system which allows for editing of skeletons, meshes, animation blueprints, and more. It improves from the previous system by adding a blend animation component which allows for more fluid motion for character animation cycles.
Now that I knew what it was, I could get started
The first thing I could do before I do anything here is to figure out how exactly I was going to get the animation out of Maya and into Unreal. Do I export the animation itself? Or maybe the keyframes, then the skeleton and the mesh? I had no Idea. A quick google search led me to this page here:
https://docs.unrealengine.com/latest/INT/Engine/Content/FBX/Animations/
The next thing I had to do was to import my FBX into unreal, which ended up being less finicky than I initially thought. It worked and I was able to view the animation in unreal's persona editor. This would essentially complete my first step, which was importing into unreal.
Now that it's in there, how can I blend with another one?
Well, for starters, I had to create another cycle. I ended up making a quick one with the character moving his arm behind him to look around and imported that into unreal. By some random chance, I felt the need to go take a look at the box next to skeleton in my import window. When i selected it, I noticed that there was an option for me to choose this time around. I selected it for the import, and will explain why in a bit. When i did so I now had both animations imported to unreal. neat, but how am I going to actually BLEND the two together? Well, spent some time reading over: https://docs.unrealengine.com/latest/INT/Engine/Animation/Blendspaces/index.html
Which was another tutorial that ran through how to blend animations. This is where I had encountered my first problem. For some reason, my animations came in rotated 90 degrees down. Which was odd to say the least. I wasn't sure on how to fix this, as none of the things in the side window were fixing it.
I then googled the issue and found this solution.
Now, after seeing this, I immediately went back into unreal and re-imported the animations hoping that this would solve the problem.
It didn't.
I eventually out of pure desperation began clicking everything to see what would work, and notice the window, which outlined all the parts. I then clicked on my main controller and rotated the character back into place and saved. I felt pretty dumb for not seeing it before but was glad that it was in there and working nonetheless.
Now that I had figured that out, another problem arose. My animation wasn't blending.
Essentially what had happened was when I had dropped my animations into the blending option in persona, Neither of the nodes were creating strings that would attach. If I imported many of them it would work, but at the same time, not really. It merged the two into a slightly weird version of both rather than playing one, then the other.
This is what stumped me the most.
I tried messing with the nodes and nothing seemed to work. I found a video Here:
https://www.youtube.com/watch?v=pfKdr0FRC5g&index=65&list=PLZlv_N0_O1gaCL2XjKluO7N2Pmmw9pvhE
I noticed that in the video, the nodes were put in a different location than mine, and had the blend node put inside the three. I tried this but it did not seem to fix my problem.
I then went online and looked over the various tutorials for persona and blending animations, but nothing seemed to fix my predicament.
After re-watching for the second time, I realized the video had three animations to input rather than the two.
So I decided to switch things up a bit.
On the spot, I animated a quick (and lil' sloppy but that's not the point) walk and run cycle for the character and imported them into unreal.
Okay, so remember how earlier I was talking about I clicked that skeleton thing when importing to unreal? Well i neglected to do that here and as a result, when I went to create a blend space for the animations, they wouldn't appear in the menu. This didn't stump me as I kind-of knew that not selecting the rig was the issue. A quick re-import later and the now three animations, were not lining up.
I got really confused here.
So, the only thing I could think to do was to watch the video again. Third time WAS the charm apparently as I noticed something that gave me a real eureka moment.
I noticed he had made a 1D blend space instead of the regular one.
And as the tune from Curb Your Enthusiasm played in my head I ran back into unreal to re-create the blend space. It worked like a charm and with that I had gotten the grasp on how this whole thing worked.
So... What did we learn?
Simply researching something unrelated for the sake of an assignment would have been pointless, which is why I chose to do something I had already been thinking of doing for a while. I feel like i know a little bit more about unreal, than I did before and will probably explore further on my own time. It also gave me an idea of what I DO and DON'T want to do in correlation with my capstone. I could have gone further and explored how to apply different animations to a character with game pad input and blending more that two or three animations, however, it takes much more work to complete and is more in line with someone who is developing their own game and is creating movement with their world from the ground up. This is a valuable skill, however I am aiming the animate a pre-visualized scene rather than having a player take control of my character.
My plan overall is to import my overall animation into unreal 4, so I can render and light it much better than I could in Maya alone, however this will only be if time permits and if the are no bugs along the way to take up even more time.
Importing animation to Unreal and blending animations.
So, for starters...
Before, I was to actually start acting, I wanted to get some background information about how unreal works with animation and what the best way was to go about doing so.
Unreal 4 has a new animation system known as "Persona". It's a system which allows for editing of skeletons, meshes, animation blueprints, and more. It improves from the previous system by adding a blend animation component which allows for more fluid motion for character animation cycles.
Now that I knew what it was, I could get started
The first thing I could do before I do anything here is to figure out how exactly I was going to get the animation out of Maya and into Unreal. Do I export the animation itself? Or maybe the keyframes, then the skeleton and the mesh? I had no Idea. A quick google search led me to this page here:https://docs.unrealengine.com/latest/INT/Engine/Content/FBX/Animations/
This essentially showed me how simple it actually is. Unreal is pretty relaxed in that you don't have to have a certain naming convention for the export (You should for the sake of organisation though) and you can simply select all if you are importing only one character. I quickly, threw together an idle cycle on a rig I own and began to import under the recommended settings.
Now that it's in there, how can I blend with another one?
![]() |
| The idle I used |
Well, for starters, I had to create another cycle. I ended up making a quick one with the character moving his arm behind him to look around and imported that into unreal. By some random chance, I felt the need to go take a look at the box next to skeleton in my import window. When i selected it, I noticed that there was an option for me to choose this time around. I selected it for the import, and will explain why in a bit. When i did so I now had both animations imported to unreal. neat, but how am I going to actually BLEND the two together? Well, spent some time reading over: https://docs.unrealengine.com/latest/INT/Engine/Animation/Blendspaces/index.html
Which was another tutorial that ran through how to blend animations. This is where I had encountered my first problem. For some reason, my animations came in rotated 90 degrees down. Which was odd to say the least. I wasn't sure on how to fix this, as none of the things in the side window were fixing it.
I then googled the issue and found this solution.
Now, after seeing this, I immediately went back into unreal and re-imported the animations hoping that this would solve the problem.
It didn't.
I eventually out of pure desperation began clicking everything to see what would work, and notice the window, which outlined all the parts. I then clicked on my main controller and rotated the character back into place and saved. I felt pretty dumb for not seeing it before but was glad that it was in there and working nonetheless. Now that I had figured that out, another problem arose. My animation wasn't blending.
Essentially what had happened was when I had dropped my animations into the blending option in persona, Neither of the nodes were creating strings that would attach. If I imported many of them it would work, but at the same time, not really. It merged the two into a slightly weird version of both rather than playing one, then the other.
This is what stumped me the most.
I tried messing with the nodes and nothing seemed to work. I found a video Here:
| ??? |
I noticed that in the video, the nodes were put in a different location than mine, and had the blend node put inside the three. I tried this but it did not seem to fix my problem.
I then went online and looked over the various tutorials for persona and blending animations, but nothing seemed to fix my predicament.
After re-watching for the second time, I realized the video had three animations to input rather than the two.
So I decided to switch things up a bit.
On the spot, I animated a quick (and lil' sloppy but that's not the point) walk and run cycle for the character and imported them into unreal.
Okay, so remember how earlier I was talking about I clicked that skeleton thing when importing to unreal? Well i neglected to do that here and as a result, when I went to create a blend space for the animations, they wouldn't appear in the menu. This didn't stump me as I kind-of knew that not selecting the rig was the issue. A quick re-import later and the now three animations, were not lining up.
I got really confused here.
So, the only thing I could think to do was to watch the video again. Third time WAS the charm apparently as I noticed something that gave me a real eureka moment.
I noticed he had made a 1D blend space instead of the regular one.
And as the tune from Curb Your Enthusiasm played in my head I ran back into unreal to re-create the blend space. It worked like a charm and with that I had gotten the grasp on how this whole thing worked.
So... What did we learn?
Simply researching something unrelated for the sake of an assignment would have been pointless, which is why I chose to do something I had already been thinking of doing for a while. I feel like i know a little bit more about unreal, than I did before and will probably explore further on my own time. It also gave me an idea of what I DO and DON'T want to do in correlation with my capstone. I could have gone further and explored how to apply different animations to a character with game pad input and blending more that two or three animations, however, it takes much more work to complete and is more in line with someone who is developing their own game and is creating movement with their world from the ground up. This is a valuable skill, however I am aiming the animate a pre-visualized scene rather than having a player take control of my character.
My plan overall is to import my overall animation into unreal 4, so I can render and light it much better than I could in Maya alone, however this will only be if time permits and if the are no bugs along the way to take up even more time.
Subscribe to:
Posts (Atom)
