Difference between revisions of "360 Content"

From QWiki
(Creating 360° screenshots/videos for social media)
 
Line 2: Line 2:
  
 
== Common ==
 
== Common ==
 
+
First some cleanups. HUD, weapon, console messages does not make sense in 360° images and videos.
HUD, weapon, console messages does not make sense in 360° images and videos.
 
 
* <code>show_fps 0</code>
 
* <code>show_fps 0</code>
 
* <code>r_drawviewmodel 0</code>
 
* <code>r_drawviewmodel 0</code>
Line 27: Line 26:
  
  
If the image that comes out looks glitched, make sure <code>r_hdr_framebuffer</code> is not enabled.
+
If the image that comes out looks glitched, make sure that <code>r_hdr_framebuffer</code> is not enabled.
  
The result in a equirectangular screenshot that can be rendered as a 360° sphere. Unfortunately FTE and Facebook are not in agreement as to what metadata should be in the image, so before attaching to a post, update it with for example:
+
This results in an equirectangular screenshot that can be rendered as a 360° sphere. Unfortunately FTE and Facebook are not in agreement as to what metadata should be in the image, so before attaching to a post, update it with for example:
  
 
* <code>exiftool -ProjectionType="equirectangular" test.jpg</code>
 
* <code>exiftool -ProjectionType="equirectangular" test.jpg</code>
  
  
Once the image has been attached, the preview should pop straight into 360° mode if everything works as correctly.
+
Once the image has been attached, the preview should pop straight into 360° mode.
  
 
== Videos ==
 
== Videos ==
There is no built-in mode for videos similar to the <code>screenshot_360</code> command for images. Instead the projection used to draw the game is changed to equirectangular. This means that walking around will be fairly hard to do in a coherent manner so this works best with demos, stationary position, or poor man's camera dolly (<code>cl_forwardspeed 30</code> or so).
+
There is no built-in mode for videos similar to the <code>screenshot_360</code> command for images. Instead the projection used to draw the game is changed to equirectangular. This means that walking around will be fairly hard to do in a coherent manner so this works best with demos, stationary position, or poor man's camera dolly (moving forward in a straight line with <code>cl_forwardspeed 30</code> or so).
 +
 
 +
 
 +
=== Optional step if not using OBS Studio or similar ===
  
 
First make sure that <code>fteplug_ffmpeg.dll</code> is available. It can be downloaded via the ''Updates+Packages'' in the main menu. If manually built and dynamically linked, the relevant FFMPEG libraries must also be in path (an error message is shown if this is needed). When everything is setup correctly <code>plug_load ffmpeg</code> should load the plugin without warnings, which can be verified via <code>plug_list</code>.
 
First make sure that <code>fteplug_ffmpeg.dll</code> is available. It can be downloaded via the ''Updates+Packages'' in the main menu. If manually built and dynamically linked, the relevant FFMPEG libraries must also be in path (an error message is shown if this is needed). When everything is setup correctly <code>plug_load ffmpeg</code> should load the plugin without warnings, which can be verified via <code>plug_list</code>.
Line 48: Line 50:
 
* <code>ffmpeg_nvidia</code> (if available configures hardware accelerated encoding)
 
* <code>ffmpeg_nvidia</code> (if available configures hardware accelerated encoding)
  
 +
=== Recording ===
  
Navigate to a good place, <code>noclip</code> if needed, set <code>r_projection 5</code> for equirectangular projection, and make use of some keys bound to:
+
Navigate to a good place, <code>noclip</code> if needed, set <code>r_projection 5</code> for equirectangular projection, and if using built-in recording, make use of some keys bound to:
  
 
* <code>capture foo.mp4</code>
 
* <code>capture foo.mp4</code>
Line 55: Line 58:
  
  
Final touch is to add the appropriate tags to mark it as a 360° video, and unfortunately while Exiftool can update metadata in MP4, it fails to do so correctly, and ffmpeg for the time being also unable to do so. However Google has created a tool called [https://github.com/google/spatial-media/releases Spatial Media Metadata Injector] to write the appropriate metadata. Once this tool has processed the file, the video is ready for Facebook.
+
Final touch is to add the appropriate tags to mark the file as a 360° video. Unfortunately, while Exiftool can update metadata in MP4, it fails to do so correctly, and ffmpeg is for the time being also unable to do so. However Google has created a tool called [https://github.com/google/spatial-media/releases Spatial Media Metadata Injector] that writes the appropriate metadata. Once this tool has processed the file, the video is ready for Facebook.
  
Contrary to uploading still images, there will be no indication at all that the video will be a 360° video when uploading. After submitting the new post it will however enter a processing mode, and once complete, if will show up as a 360° video.
+
Contrary to uploading still images, there will be no indication at all that the video will be a 360° video when uploading. After submitting the new post it will however enter a processing mode, and once complete, it will show up as a 360° video.

Revision as of 18:39, 23 March 2024

To create 360° screenshots or videos of memorable moments suitable for posts on for example Facebook and other venues with 360° support, grab a copy of FTE and follow the steps outlined here.

Common

First some cleanups. HUD, weapon, console messages does not make sense in 360° images and videos.

  • show_fps 0
  • r_drawviewmodel 0
  • viewsize 120
  • con_notifylines 0

Screenshots

There are a few mandatory parameters for Facebook to detect the image as a 360° image:

  • Aspect ration must be 2:1.
  • File format must be JPEG.
  • The "Projection Type" metadata field must be set to "equirectangular".


Configure the screenshot format and up the quality, Facebook will process the images into various resolutions anyways:

  • scr_sshot_type jpg
  • scr_sshot_compression 95


Navigate to a good place, noclip if needed, and bind something to:

  • screenshot_360 filename 8192 4096, as per above, let Facebook create resized smaller versions.


If the image that comes out looks glitched, make sure that r_hdr_framebuffer is not enabled.

This results in an equirectangular screenshot that can be rendered as a 360° sphere. Unfortunately FTE and Facebook are not in agreement as to what metadata should be in the image, so before attaching to a post, update it with for example:

  • exiftool -ProjectionType="equirectangular" test.jpg


Once the image has been attached, the preview should pop straight into 360° mode.

Videos

There is no built-in mode for videos similar to the screenshot_360 command for images. Instead the projection used to draw the game is changed to equirectangular. This means that walking around will be fairly hard to do in a coherent manner so this works best with demos, stationary position, or poor man's camera dolly (moving forward in a straight line with cl_forwardspeed 30 or so).


Optional step if not using OBS Studio or similar

First make sure that fteplug_ffmpeg.dll is available. It can be downloaded via the Updates+Packages in the main menu. If manually built and dynamically linked, the relevant FFMPEG libraries must also be in path (an error message is shown if this is needed). When everything is setup correctly plug_load ffmpeg should load the plugin without warnings, which can be verified via plug_list.

Example use:

  • vid_width 3840 and vid_height 1920, like images, videos also need to be 2:1.
  • ffmpeg_videopreset veryslow
  • ffmpeg_videobitrate 60000000 (60Mbps, let Facebook process for different usecases)
  • ffmpeg_nvidia (if available configures hardware accelerated encoding)

Recording

Navigate to a good place, noclip if needed, set r_projection 5 for equirectangular projection, and if using built-in recording, make use of some keys bound to:

  • capture foo.mp4
  • capturestop


Final touch is to add the appropriate tags to mark the file as a 360° video. Unfortunately, while Exiftool can update metadata in MP4, it fails to do so correctly, and ffmpeg is for the time being also unable to do so. However Google has created a tool called Spatial Media Metadata Injector that writes the appropriate metadata. Once this tool has processed the file, the video is ready for Facebook.

Contrary to uploading still images, there will be no indication at all that the video will be a 360° video when uploading. After submitting the new post it will however enter a processing mode, and once complete, it will show up as a 360° video.