Tuesday, March 6, 2012

Trials of Music and Motion



One of you recently discovered a bug in the current version of the simulation.  If you use the skip function in the ride, the music gets very out of sync shortly after.  Thanks for letting me know, Catherine.  It will be fixed in the next version.


Anyway, this got me thinking that I'd like to write a little bit about how the music timing works in this simulation.  It involves a bit of background into the soundtrack and an explanation of how the simulated ride system works compared to the original real thing.  


In other words, this is an excuse for me to geek out.  This may be boring.  You've been warned.


I'll start with the soundtrack.  In the original ride, the music consisted of a series of synchronized loops that played endlessly and simultaneously.  As you moved from room to room, the loops naturally cross-faded smoothly by way of distance from the speakers.  There was no specific beginning or end of a loop as a rider but you would likely hear most of a loop as you passed through depending on the size of the room.


This is not how it works in the simulation.  I do not have the ability (currently) to run a bunch of simultaneous loops like this.  I have a single track that represents a ride through the attraction.  However, it is not an actual recording of the ride through.  Someone took all of the separate loops and mixed them (very well) to basically represent the overall experience of the ride in the correct order.  In order to make the audio experience better, the cross-fades between scenes are deliberately set at the beginning and end of the loops.  This sounds great and lets you hear the soundtrack in its entirety, but it does not accurately represent the length of time you would spend in the scenes if you were on the ride.  For example, the Literature scene (scary part) is very short on this track and the Science scene is very long.  More on this in a minute...


The original ride system was unique in that it had several speed changes and synchronizations that made it spectacularly complicated.  There was a slow speed for the Omnimover-like load and unload areas, another speed to lock up to the turntable movement, and another speed for the train-style movement through the rest of the ride.  This system had a lot of technical problems that contributed to it opening later than the rest of EPCOT and eventually being changed to its current layout.  Trying to recreate this has given me more than an appreciation for how troublesome this ride system was.


The recreation uses a Unity 3D plug-in called Splines.  I used it to create a looped track of 200 points.  You can see some of these in the picture above shown as white boxes.  Each point represents a new turn, incline or decline, speed change, and horizontal rotation.  These points are invisible but they are aligned to the fake track visible in the ride.  In the lobby, there is a completely separate 20 point track guiding the empty vehicles in a small loop just for the visual effect.


So, here we have 200 points and a fixed length piece of music.  To make this appear to work correctly, I have added about 10 different speed changes.  I initially tried to do the math to work out the timing.  Bust.  In the end, I simply picked a speed, started the ride, watched how far off the end of the scene was from the music, made a guess at an adjustment and then did it all again.  To ensure consistency, all subsequent scenes were timed after waiting to get through the earlier scenes.  I got pretty tired of the repetition after a while and do most of the testing of other things with the sound muted now.


At the very end (when I thought I had everything right), I added the ability to jump over the turntable scene.  I actually managed to get the music jump and the track jump right on the first try.  I was very happy with myself.  So much so that I overlooked something that seems obvious in retrospect.  The turntable skip also skips a very important speed change point (by only 2 points).  Because of this, the vehicle is moving way too fast through the Dreamport and Arts scenes.  I didn't see this because I didn't ride the rest of the ride after I tested the jump.  Oops.


The good news is that after more testing and adjustment, I have fixed this in the next version (6.0).  I hate to leave the error out there for all to see but 6.0 is still under construction for several other things and will have to wait a little while longer.  In fact, I'm getting back to work on that very thing right now.

No comments:

Post a Comment