One aspect I had not originally planned on taking advantage of was to use real time physics for some of my characters, namely for use with their hair. The idea was brought up by Javier Altman, who was incredible in helping me get the basics of how to manipulate colliders and physics with a rig in Unreal. Once I understood better what I wanted the physics to do, I decided to do a test to see how far I could push physics for Echo's hair.
Because of the fact physics was not a planned idea when I was first building Echo's rig, there are a LOT more joints in Echo's hair than is really necessary for this process. Therefore, something I plan on doing is updating Echo's rig to take out some of the less needed bones. At present, there are over 300 bones, about 150 of which are in the hair alone. But, for this test, I used the rig as I had it.
Importing the rig into Unreal went by with very little issues, though I did realize that I had to take the rig out of my group hierarchy in Maya in order to not have the entire hierarchy import into the skeletal mesh and convert to bones. It is a weird issue that I am not quite sure how to completely eliminate, but that was the workaround I had. Doing this eliminated my rig being scalable, but I do not plan on scaling my characters anyway so it was not a terrible compromise.
Depending on your import settings, Unreal can generate a physics asset for you with colliders and constraints based on it's best guess. I chose to create the physics asset separate from the import so that Unreal didn't create all of those constraints that I was going to delete anyway.
I started building outside in--that is to say, I started with overall ponytail colliders that would collide with the head and worked my way down each individual ponytail chain. I decided to stick more with cylinder colliders and play more with the Linear and Angular Limits so that, whenever Echo's head moved, there would be a limit point and the hair would return back to where it originally started once her head rested at any point in the film. I did use a sphere for Echo's head due to it fitting better as a form.
As you can see from the above screenshot, I worked my way down afterwords with smaller and smaller colliders. This is where I really knew I needed to readdress the hair in the rig later due to the number of bones that currently exist. Setting up a collider for each one was fairly time consuming. All the while I was doing this, I was constantly simulating and testing with the settings I had liked to see how the hair moved and reacted to itself and each other. Having inner penetration of the hair became pretty common at this stage.
The bangs were more difficult, as they truly needed to stay in their respective places while also giving the "bouncy" impression that I was going for. While doing test animations with physics, I realized the main bang would best function if animated independently in Maya, as all of my test thus far had only resulted in the hair falling out of place and giving Echo an "emo" look.
Not exactly the look I'm going for, haha...
When I had the system set up to the point where I liked the overall result, I decided to do a full test run of animation, having animated a bob cycle in Maya and imported it into Unreal as well. I created a new level in Unreal that existed just to test out characters, set up a sequencer with a camera and some lighting, and recorded the output. This is the same workflow I would be doing in my final film, therefore it also gave me a test run in seeing how much time that would take and what obstacles I would hit. The only major one that I hit pretty consistently was the camera import from Maya into Unreal. Sometimes it worked... and sometimes it 1000% did not. I've yet to figure out why it only works some of the time with the same assets, but maybe others have run into that problem as well. Another issue I found was that physics was more unpredictable in the editor than it was in the Physics Asset when testing. You will notice in the final video that one of the hair pieces jitters pretty violently as a result. Given how far I took this test and knowing I was going to be going back to make alterations to the rig itself, I was okay with that artifact for now with plans to address it in the future.
All in all, it was a great exercise to play with physics and learn more about the possibilities of using it for the short film. Setting up this test exercise and going through the pipeline really helped me target some obstacles that can be corrected now, and it proved for some valuable knowledge moving forward.
Net week's blog post will likely be postponed so I can have some more to show soon! See you in 2 weeks time.