Wednesday, 5 December 2012

Piecing Everything Together in Unity

As we neared the end of our project, there were additional scenes that had been animated that were not storyboarded. To help us when composing the shots in the Unity engine, I produced a revised storyboard covering the new animations that Dan and Joel had produced. I left some frames blank as Joel felt he wanted to show his Ninja character and how he would be represented by the shot choices. Another idea of this storyboard was to give Joel the tools to produce an animatic to help with the timings of our Unity project. Bellow is the appended storyboard:

As I had familiarised myself with most of the tools required in Unity, I took on the task of brining everything together and compiling the machinima. We initially worked together bringing in the animations, cameras and additional lighting for each scene. Some scenes were more awkward than others. Personally I think if we were to repeat the task, it would have been more efficient to model the characters in the same space (where interacting) freeze the transformations in maya and simply drop them into the scenes. Instead we had to tweak two separately imported characters to interact at the right time. This was awkward primarily in the scene where then Ninja assassinates a generic guard in the scanner corridor. We had initially wanted the Ninja to run around the corner, but found that because of a freeze transformation glitch with the Ninja's root controller, we couldn't make this happen as the animation could not be rotated on to the correct path. Luckily, we managed to bring in a straight run animation and pull him out of the shot, gradually tweaking the Ninja's position until he entered the frame at the right moment. Similarly, we had to keep adjusting the positions of both characters in the scene where the Ninja makes a charge past the guard for the exit, until the guard was knocked down at the right time. Although we managed to solve this issue, it would be interesting to try and take a more efficient approach in the future.

One of my biggest roles in the final stage of the project was applying the scene change scripts to make the project move between shots, and to bring in the sound. One error I made in this process was when dragging the scenes into the build settings window, I didn't put the first scene as scene '0'. This meant that when I eventually built the scene, it began halfway through. Not only did I have to rearrange the order of the scenes menu, but I had to go back through all of the scripts and change them to the correct scene change. One useful tool was adding in the animation event on the animation timelines to change the scenes. This meant I was able control when the scene switches happened, something I was eager about prior to the scripting process.

One problem I did face was trying to delay the sounds as oppose to them playing on awake. I did a google search to try and find a useful script, but none of them seemed to work. As a quick solution, I opened the required sound file in Audacity. I then grabbed a tiny bit of noise before the clip began and slowed it down with the 'change speed' function in the effects menu. From this stage it was trial and error, moving between audacity and unity re-exporting the sound clip until the delay was timed right with the animation. The audacity projects looked something like this:

I used the animatic produced by Joel as reference when bringing the sounds into the unity scenes.

On one final note, there was mention of putting shadows into the scene, which unfortunately due the submission deadline pending, didn't happen. This is perhaps something which could be appended before our end of year show. I also planned on adding 3D sounds into my environment, which again there wasn't time for when all our focus was on getting the scenes put together in Unity. Reflecting on this, it would have been nice to have been more organised on the deadline date to go over everything and fine tune our own contributions for submission. Finishing on a positive note, we did manage to get our machinima running realtime in Unity complete with sound, an outcome I was a little apprehensive about when it came to the morning of the hand in date.

No comments:

Post a Comment