GSoC: Weeks 2, 3, 4

Marble has got something called “Tours”. It can be used to take a virtual tour of the world by visiting different places according to a defined playlist. These tours, when they are played from the playlist that is contained in the kml file containing the tour, they follow an order shown as given below. That is, there are basically two types of items that are being played here, just like a “track” is played:

  • Serial Tracks: These consist of the FlyTo items, the TourControl Items, and the Wait items. These play serially one after the other according to the order in which they are present in the playlist, and run for its respective duration. No two of items can run parallely.
  • Parallel Tracks: These consist of the SoundCue items, and the AnimatedUpdate items. That is, as you can see below, these items can run parallely, which means, if a sound cue starts at some point, it can keep playing in the background at the same time when the camera hovers on to some location’s coordinates there in the map. In fact, more than one parallel tracks can also play at the same time.



So, we needed to refactor our existing code keeping in mind the above design of kml as our goal, so that any type of kml files could be played without any type exceptions. So, I created two new classes, SerialTrack, and ParallelTrack, and further created separate classes for each of the 5 types of items I mentioned above. And then, handled these accordingly in the *Track classes. So, the code looks much cleaner, and clearer (easier to understand) now.

As far as the user-interface is concerned, we made some changes in that as well. So, apart from the previously existing Tour Widget showing the details of the items in the playlist, with an Edit button against each, and a Play, a Pause and a Stop button below it, we added to it a horizontal progress bar as well, so that the user is able to understand how much of the tour has finished and how much remaining. Also, the Play and Pause buttons, instead of making them separate buttons, we fused them into one togglable button that will act as both Play and Pause. Not to mention, the progress bar has also been made seekable, so that, now you can actually drag the slider as desired, and be able to enjoy it from any point of the tour as you want. Here is how the slider looks like now, with the togglable Play/Pause button:


Also, in the tour playback, previously when the map’s focus shifted from one coordinate to another coordinate in the map (when proceeding from one FlyTo item to another in the playlist), the camera didn’t actually move along the path joining those two points. So this also had to be implemented. Also, not only should the camera just move, it should move in a way that is not a straight line, so that turnings are smooth. That is, there should not be any pointy edges in the virtual path that the camera should take. So, thanks to my mentor Dennis, with whose help we could be able to implement squad interpolation for smooth playback of tours in Marble, by using some sort of Spline interpolation of three or more points. You are free to go through my code here in case you want 🙂

I have embedded a very short video below, of how it looks like when the tour is played now. I just added a few cities in its playlist and tried to take them from as much around the globe as possible. There are 10 cities in it, each with a duration of 5 seconds, and a Wait element each of one second in between each of those ten FlyTo’s (to keep the tour uniform and unbiased):
(my embedded video is not showing up in Planet KDE, so if you’re reading this post from there, then please open this post separately instead, by clicking on its title, in order to be able to watch the embedded video (which is the main thing in this post really). Thank you!)

Thanks to Dennis Nienhüser, my mentor, without whose help, none of this would have been possible! Thanks again! 🙂

8 thoughts on “GSoC: Weeks 2, 3, 4

  1. It’s quite exciting to read about all these cool GSoC projects going on, but one thing I’m really missing in almost all of those blog entries: A sentence describing what the project is about. Usually, you get a ton of details, but it’s hard to find out what the developer in question is working on. Please keep those not tightly in the loop in mind when blogging, it will extend your reach a lot.

    • It’s a general remark. In short: prefixing any post with just one senescence of context makes a huge difference. Surely, I can find out by doing a little bit of research, bit only a very small percentage of your readers will do that, the rest just skips over. Attention spans are short.

      • I get your point, introductions are indeed important. So I updated my post just now with a brief description of what Marble tours are. And I will surely keep that in mind from the next time. Thanks! 🙂

  2. Pingback: Links 19/6/2014: New Mir, Dalvik Changes, Turns 30 | Techrights

  3. Nice stuff, really looking forward to use this!

    However, currently I’m kind of missing the “fly” here, this is more like panning the view. Also in G* earth, when you search for (and found) an location, it flies / zooms in on that location. To have this in marble would also be nice. 🙂

    The video is really laggy, whats the reason for this?

    • Hi Richard, yeah actually it does have only “panning” for now (we have just started). Ideally it should “bounce” from one location to the other like you said, which we will surely try to do later. Along with the zooming in on search as well.

      Sorry, the video is a bit laggy, maybe because of the low frame-rate of 50 fps. Please watch the video in 720p to have the “least bad” experience for now! 🙂

  4. Pingback: GSoC ends – Project summary | sanjibandotme

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s