| 1 |
.. _sec:360: |
| 2 |
|
| 3 |
Making 360 videos for YouTube |
| 4 |
------------------------------ |
| 5 |
|
| 6 |
Thanks to input from Chris Russell, splash has the ability to output images and videos |
| 7 |
that can be played as '360' videos in YouTube, where the user can move around in 3D. |
| 8 |
Try moving around in the video below (made with splash!). Here the viewer is at the |
| 9 |
Galactic Centre while the simulation models the surrounding stars and their winds. |
| 10 |
|
| 11 |
.. raw:: html |
| 12 |
|
| 13 |
<div style="position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; max-width: 100%; height: auto;"> |
| 14 |
<iframe src="https://www.youtube.com/embed/Q6a9WyN_fbM" frameborder="0" allowfullscreen style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;"></iframe> |
| 15 |
</div> |
| 16 |
<br/> |
| 17 |
|
| 18 |
|
| 19 |
Quickstart on 360 videos |
| 20 |
~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 21 |
|
| 22 |
You can create a 360 video in splash as follows:: |
| 23 |
|
| 24 |
splash disc_0* -360 --movie |
| 25 |
|
| 26 |
Or with more control by first making an interactive plot and editing settings:: |
| 27 |
|
| 28 |
splash disc_0* -360 |
| 29 |
|
| 30 |
For example, you can delete the colour bar by hovering over it and pressing backspace. |
| 31 |
Once happy, press 's' from the window followed by 's' from the text menu to save settings. |
| 32 |
Then save as an mpeg video by answering "movie.mp4" at the device prompt. |
| 33 |
|
| 34 |
You might also get pleasing results by moving the viewer using the --origin flag, e.g.:: |
| 35 |
|
| 36 |
splash disc_0* -360 --movie --origin=100,100,100 |
| 37 |
|
| 38 |
Finally upload your mp4 to YouTube and tick the box indicating that it is a 360 video. |
| 39 |
|
| 40 |
Longer explanation on 360 videos |
| 41 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 42 |
The basic functionality of the -360 flag is to change the coordinate system to spherical |
| 43 |
coordinates centred on the origin, and then render column density in a theta-phi view, i.e. |
| 44 |
showing the column density along radial lines of sight projected to the origin. SPLASH |
| 45 |
also sets the aspect ratio correctly as required for the YouTube 360 format. |
| 46 |
|
| 47 |
Yes we know 360 degrees is not the right term for an all sky view |
| 48 |
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ |
| 49 |
Pedantically, it should be "4 pi steradians", especially if you ask the astronomers. |
| 50 |
Hence, to keep the astronomers happy, "-fourpi" or "-4pi" is also accepted |
| 51 |
as a flag instead of "-360" |