Difference between revisions of "CameraFlight"

From Immersive Visualization Lab Wiki
Jump to: navigation, search
(Milestones)
(Implemented)
Line 5: Line 5:
 
[[Image:CameraFlightSample1Crop.png]] [[Image:CameraFlightSample2Crop.png]] [[Image:CameraFlightSample3Crop.png]]
 
[[Image:CameraFlightSample1Crop.png]] [[Image:CameraFlightSample2Crop.png]] [[Image:CameraFlightSample3Crop.png]]
 
===Implemented===
 
===Implemented===
* Created menu for plugin with algorithm submenu entries: instant, satellite.  
+
* Created menu for plugin with algorithm submenu entries: instant, satellite, airplane.  
 
* Created checkbox menu with list of predefined destinations. There are 6 predefined location; UCSD, Tokyo, South Pole, Sydney, Rome, Fullerton.
 
* Created checkbox menu with list of predefined destinations. There are 6 predefined location; UCSD, Tokyo, South Pole, Sydney, Rome, Fullerton.
 
* Created custom destination submenu entries, which user can personally input latitude and longitude of destination and navigate. (works for both instant and satellite algorithm)
 
* Created custom destination submenu entries, which user can personally input latitude and longitude of destination and navigate. (works for both instant and satellite algorithm)

Revision as of 12:31, 29 May 2012

Contents

Project Overview

CameraFlight is a plugin for OsgEarth that helps users to navigate OsgEarth. Although the the project is named CameraFlight, the algorithm involves rotating earth and moving earth closer to Camera. There are two types of Navigation; Instant and Satellite. User can choose which algorithm to navigate osgEarth from algorithm sub-menu. Then user can choose one of the predefined destination or go to custom navigation menu and select latitude and longitude of the location and navigate. These navigations are time dependent.

Status

CameraFlightSample1Crop.png CameraFlightSample2Crop.png CameraFlightSample3Crop.png

Implemented

  • Created menu for plugin with algorithm submenu entries: instant, satellite, airplane.
  • Created checkbox menu with list of predefined destinations. There are 6 predefined location; UCSD, Tokyo, South Pole, Sydney, Rome, Fullerton.
  • Created custom destination submenu entries, which user can personally input latitude and longitude of destination and navigate. (works for both instant and satellite algorithm)
  • Acquires the variables required to navigate; vectors of destination and current position, angle between the two vectors, and maximum and minimum height.
    • Current and destination vectors are calculated by converting latitude and longitude of the location and making height to 0 and normalizing them.
    • Using the cross product of the vectors will give us the rotation vector to rotate around.
    • Angle between the vectors are calculated by acos((a*b)/(|a|*|b|)).
  • Implemented instant navigation: switch to destination position immediately without transition
    • Rotate from current vector to destination vector by angle between them once and set the height to the minimum.
  • Implemented satellite mode: like Google Earth's transition mode, ~10 seconds for transition, time value is configurable in CalVR's configuration file
    • This algorithm is time dependent and time is calculated every frame (maximum 10 seconds).
    • Both zooming and rotation shares same base function of pow(t-5,2).
    • For zooming, find a ratio using maxHeight and current height and apply the equation shown below:
  For first 5 seconds:
    a = (maxHeight - currentHeight)/25.0;
    currentHeight = (-a * pow((t-5),2)) + maxHeight;
  For Last 5 seconds:
    a = (maxHeight - minHeight)/25.0;
    currentHeight = (-a * pow((t-5),2)) + maxHeight;
    • For Rotation, find angle rotating per each time interval using equation shown below:
  rotationAngle = (original Angle + (-(original Angle / 25) * pow((t-5),2)))/360;
  • Implemented custom destination menu using MenuRangeValue.
    • User can set desired latitude and longitude of the planet and click navigate button to desired location.
    • Converts inputted latitude and longitude into vectors and navigate with them.

Milestones

  • Implement airplane mode
    • Airplane mode will change the view of Camera position so that it will be in first person view.
    • Implement GUI to save way points between starting points and destination. These points will help you create bezier curves of flight path.
      • Define the transition time between each way points and maintain constant speed.
      • Saving orientation of each way point is recommended.
    • Implement prototype for transition method resembling flight in an aircraft.
    • Will not zoom out in airplane mode. Also, implement the path so that it will avoid any terrain crash.
  • Implement camera path

Participants

Software Developers:

  • William Seo

Project Advisors:

Development Assistance:

  • Philip Weber
  • Andrew Prudhomme

Initial Concept Base:

  • Google Earth