Post by ent on Dec 27, 2021 9:34:19 GMT 1
Sup.
Download: github.com/entdark/q3mme/releases/tag/1.9
I've released q3mme 1.9 with some kill features:
- added VR capture: stereo 3D VR180, VR360 (cubemap capture)
- added multispec feature
- enabled bloom effect
- added missing maps autodownload
- added CPMA MVD support
- fixed CPMA colours in nicknames and models
- added DeFRaG timer
- pipe program (ffmpeg) could be set as a %PATH% variable
Changelog: github.com/entdark/q3mme/blob/master/changelog.txt
Cvars: github.com/entdark/q3mme/blob/master/cvars.txt
Cmds: github.com/entdark/q3mme/blob/master/cmds.txt
Virtual Reality (VR) capture
To stay up to date with modern technologies I decided to implement a possibility to capture VR videos.
Here are some examples (watch in your VR headset):
VR180 stereo 3D video:
VR360 monoscopic video:
VR360 monoscopic free camera video:
Cubemap screenshot:
Cubemap stereo 3D screenshot:
VR180 stereo 3D screenshot:
VR360 monoscopic screenshot:
Long story short: this is achieved by capturing cubemaps in the game and then passing them to ffmpeg (pipe) with v360 filter.
To capture a VR video yourself set mme_saveCubemap to 1 and mme_pipeCommand to auto.
Long story long: scroll to the bottom to read about all the details of VR capture.
Multispec feature
Multispec feature lets you see multiple POVs simultaneously.
Using the feature is pretty simple. Hit = (command: multispec add) to add a new multispec window. It will appear in the centre of the screen with a cursor that you can move and edit multispec windows.
Put the cursor inside the window and click MOUSE1 or MOUSE2 to cycle through next or previous POV. Camera and Chase POVs are also options.
Holding MOUSE1 and moving mouse will move the window. Scrolling mouse wheel will change window scale. Hitting DEL will delete the window. Hitting ESC or ENTER will finish editing.
That's all, you got your multispec window. You can add as many windows as you want. More information and examples in the documentation.
Bloom effect
That feature existed for a while but was disabled for some reason. I basically just enabled it and fixed a few bugs. The feature was implemented by CaNaBiS back in time.
Here is the comparison for 3 states (r_bloom 0, 1, 2):
v
Play around with r_bloom_* cvars to find the best visuals.
More information and examples in the documentation.
Known bug: the feature doesn't work with r_fboMultiSample > 0.
Maps autodownload
Sometimes you get a demo that was recorded on some rare map and it's always very uncomfortable to close the game and seek for that missing map.
So there it is: missing maps get automatically downloaded if they are missing.
To control the source URL change cl_dlURL. Or to disable the feature completely set cl_mapAutoDownload to 0.
CPMA MVD support
Followed by multispec feature I added support for CPMA MVD (MultiView Demo). Such demos get automatically detected and multispec is applied to them. That could be disabled with mov_cpmaAutoMultiview set to 0.
Such demos contain extra data for all POVs like: health, armor, ammo, score, damage.
DeFRaG timer
DeFRaG is a competition about time. So here is the timer. Unfortunately it does not work correctly for encrypted demos but it does work fine for the rest.
Corresponding cvars: mov_defragTimer*.
There are more new features, fixes and changes. Just check changelog.txt, cmds.txt, cvars.txt in mme folder.
Full changelog
Additions:
- added an option to rotate camera, chase or effect view in 6DoF instead of Euler angles (mov_view6DoFRotation)
- added maps autodownload support (credits: ioq3, q3e) (cl_dlURL, cl_mapAutoDownload)
- added support for CPMA multiview (credits: wolfcamql) (mov_cpmaAutoMultiview)
- added multispec feature (multispec command)
- added a possibility to use either numbers or cursor controls on numpad by depending on the state of Num Lock
- added a possibility to capture cubemaps for VR (mme_saveCubemap, mme_combineStereoShots)
- added DeFRaG timer (mov_defragTimer*)
- added a minor optimization for SSE blurring functions (mme_cpuSSE2)
- added displaying CPU features on startup
- added a possibility to offset view horizontally and vertcially in third person POV (cg_thirdPersonHorzOffset and cg_thirdPersonVertOffset)
- added a possibility to align speedometer to the left, right, or center (cg_drawSpeedometerAlignment)
Changes:
- holding mouse2 in chase view now lets roll the view
- set new default value for com_affinity "0": pipe capture is considered default and it works faster with all cores
- set new default value for mme_cpuSSE2 "1"
- set default value for mme_pipeCommand "auto": automatically chooses the command by depending on cubemap and/or stereo or their missing
- increased amount of patch planes from 2048 to 8192
- increased amount of shader files from 4096 to 8192
- set new default values for cg_drawSpeedometerPos and cg_drawMovementKeysPos
- made stepped rewinding align to the closest time when paused
- made shaders in 2D (HUD/console) depend on the game time instead of real time
Fixes:
- fixed never working bloom (r_bloom)
- added ratio fix for drawing a rectangle
- added ratio fix to ammo warning position
- fixed drawing speedometer and chatbox twice
- fixed setting incorrect CPMA colours for nicknames and models
- added ratio fix to the loading screen
- fixed never resetting underwater effect when going back to main menu
- fixed requiring admin rights to open demos that are associated with q3mme
- fixed having no hit sounds in CPMA demos when CPMA assets were not loaded
- fixed jittering map objects that has to move by sine trajectory
- fixed sometimes silent or moved stereo sounds in main menu after closing a demo
- fixed incorrectly moving shaders in 1st person and also adjusted precision of shaders time calculations
Some screenshots from q3mme 1.9: imgur.com/a/FLjPuAc
Good luck with new movies.
P.S.: the VR longread
The idea:
Q3MME is a pretty complete tool and making new releases requires some big features. Also staying up to date to modern technologies is a good reason for a new release as well.
The idea visited me a year ago when I got my VR set. So here we are: I decided to add the VR capture into Q3MME.
The solution:
After googling a lot I found many solutions but all of them could not be simply applied to the game.
Eventually I got the main idea: I need to capture the whole world around and the simplest way to do so it to capture cubemaps.
And then I accidentally found out that ffmpeg can convert from and to any kind of spherical projection and that I could just use cubemaps.
A year later all stars got aligned.
VR video types:
1) 180 degrees stereoscopic 3D (VR180)
2) 360 degrees monoscopic (VR360)
To capture for VR:
1) highly recommended but still optional: install ffmpeg and either put ffmpeg.exe next to quake3mme.exe or add it to %PATH% variable
2) set resolution to at least 720 pixels height (for example: set r_customwidth 1280; set r_customheight 720; r_mode -1)
3) set cg_draw2D 0; set con_notifytime -1; mme_saveCubemap 1
4) VR180:
set r_stereoSeparation -0.5; set r_zproj 25
set mme_pipeCommand "ffmpeg -f avi -i - -threads 0 -vf v360=c1x6:he:in_forder=frblud:in_stereo=tb:out_stereo=sbs -c:a aac -c:v libx264 -preset ultrafast -pix_fmt yuv420p -crf 19 -y -metadata:s:v stereo_mode=left_right %o.mkv 2> ffmpeglog.txt"
eyes are separated by 0.5 game units from the centre (-0.5 is the same, just for the left eye) and the focus point is 25 units forward, values can be changed
using filter v360 we set input projection as cubemap 1x6 with faces order 'forward right back left up down', output projection as half equirectangular and input stereo top-down, output stereo side-by-side
VR360:
set r_stereoSeparation 0
set mme_pipeCommand "ffmpeg -f avi -i - -threads 0 -vf v360=c1x6:e:in_forder=frblud -c:a aac -c:v libx264 -preset ultrafast -pix_fmt yuv420p -crf 19 -y %o.mkv 2> ffmpeglog.txt"
using filter v360 we set input projection as cubemap 1x6 with faces order 'forward right back left up down', output projection as equirectangular
to capture for YouTube container should be mp4, in other case set it to mkv
more info: ffmpeg.org/ffmpeg-filters.html#v360
5) capture pipe 60 name
That's all, the video is captured.
Editing:
You can edit your VR video in Adobe Premiere Pro: helpx.adobe.com/premiere-pro/using/VRSupport.html
And publish from there as well so the Publication block could be skipped.
Publication:
To make video players understand that the video is VR (uploading to YouTube requires that too) it has to have the corresponding metadata.
Unfortunately by the date of 2021.11.24 ffmpeg cannot add such kind of metadata so you have to use other tools.
You can inject additional metadata by using mkvmerge tool:
VR180 for manual sharing and YouTube:
mkvmerge --output out.mkv --projection-type 0:1 --projection-private 0:0x000000000x000000000x000000000x3fffffff0x3fffffff --stereo-mode 0:side_by_side_left_first in.mkv
VR360 for manual sharing:
mkvmerge --output out.mkv --projection-type 0:1 --projection-private 0:0x000000000x000000000x000000000x3fffffff0x3fffffff in.mkv
Or you can use Header editor from MKVToolNix GUI to add projection type, projection type private data (or leave it untouched) and stereo mode in case of VR180. Setting stereo mode is not needed if it was set though ffmpeg.
more info: mkvtoolnix.download/doc/mkvmerge.html
github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md#webm-matroska
VR360 for YouTube:
You can inject additional metadata by using Spatial Media Metadata Injector:
0) convert to mp4 if previously captured in mkv:
ffmpeg -i in.mkv -c copy out.mp4
1) download: github.com/google/spatial-media/releases/tag/v2.1
2) run the tool and check "My video is spherical (360)"
3) click "Inject metadata" and wait a bit
The video is ready for YouTube.
Video resolution:
The least recommended resolution of the game should be WIDTHx720, so it could capture cubemaps with 6 faces of 720x720 and final video resolution will be 2880x1440.
2880x1440 is one of the most popular resolution for many VR sets.
Extra:
Technically VR360 could be stereoscopic 3D but looking behind will swap eyes position so the depth will be ******ed up. Though you can look up and down by way higher angles.
So VR180 could be monoscopic as well but it has no sense since VR360 monoscopic covers everything.
You can capture for VR without pipe, just save cubemaps directly into screenshots or AVI. But then you will need to convert the cubemaps into any spherical projection anyways. Pipe is the default way now so better use it.
YouTube compresses much so it's better to capture at high resolution like WIDTHx1080.
Download: github.com/entdark/q3mme/releases/tag/1.9
I've released q3mme 1.9 with some kill features:
- added VR capture: stereo 3D VR180, VR360 (cubemap capture)
- added multispec feature
- enabled bloom effect
- added missing maps autodownload
- added CPMA MVD support
- fixed CPMA colours in nicknames and models
- added DeFRaG timer
- pipe program (ffmpeg) could be set as a %PATH% variable
Changelog: github.com/entdark/q3mme/blob/master/changelog.txt
Cvars: github.com/entdark/q3mme/blob/master/cvars.txt
Cmds: github.com/entdark/q3mme/blob/master/cmds.txt
Virtual Reality (VR) capture
To stay up to date with modern technologies I decided to implement a possibility to capture VR videos.
Here are some examples (watch in your VR headset):
VR180 stereo 3D video:
VR360 monoscopic video:
VR360 monoscopic free camera video:
Cubemap screenshot:
Cubemap stereo 3D screenshot:
VR180 stereo 3D screenshot:
VR360 monoscopic screenshot:
Long story short: this is achieved by capturing cubemaps in the game and then passing them to ffmpeg (pipe) with v360 filter.
To capture a VR video yourself set mme_saveCubemap to 1 and mme_pipeCommand to auto.
Long story long: scroll to the bottom to read about all the details of VR capture.
Multispec feature
Multispec feature lets you see multiple POVs simultaneously.
Using the feature is pretty simple. Hit = (command: multispec add) to add a new multispec window. It will appear in the centre of the screen with a cursor that you can move and edit multispec windows.
Put the cursor inside the window and click MOUSE1 or MOUSE2 to cycle through next or previous POV. Camera and Chase POVs are also options.
Holding MOUSE1 and moving mouse will move the window. Scrolling mouse wheel will change window scale. Hitting DEL will delete the window. Hitting ESC or ENTER will finish editing.
That's all, you got your multispec window. You can add as many windows as you want. More information and examples in the documentation.
Bloom effect
That feature existed for a while but was disabled for some reason. I basically just enabled it and fixed a few bugs. The feature was implemented by CaNaBiS back in time.
Here is the comparison for 3 states (r_bloom 0, 1, 2):
v
Play around with r_bloom_* cvars to find the best visuals.
More information and examples in the documentation.
Known bug: the feature doesn't work with r_fboMultiSample > 0.
Maps autodownload
Sometimes you get a demo that was recorded on some rare map and it's always very uncomfortable to close the game and seek for that missing map.
So there it is: missing maps get automatically downloaded if they are missing.
To control the source URL change cl_dlURL. Or to disable the feature completely set cl_mapAutoDownload to 0.
CPMA MVD support
Followed by multispec feature I added support for CPMA MVD (MultiView Demo). Such demos get automatically detected and multispec is applied to them. That could be disabled with mov_cpmaAutoMultiview set to 0.
Such demos contain extra data for all POVs like: health, armor, ammo, score, damage.
DeFRaG timer
DeFRaG is a competition about time. So here is the timer. Unfortunately it does not work correctly for encrypted demos but it does work fine for the rest.
Corresponding cvars: mov_defragTimer*.
There are more new features, fixes and changes. Just check changelog.txt, cmds.txt, cvars.txt in mme folder.
Full changelog
Additions:
- added an option to rotate camera, chase or effect view in 6DoF instead of Euler angles (mov_view6DoFRotation)
- added maps autodownload support (credits: ioq3, q3e) (cl_dlURL, cl_mapAutoDownload)
- added support for CPMA multiview (credits: wolfcamql) (mov_cpmaAutoMultiview)
- added multispec feature (multispec command)
- added a possibility to use either numbers or cursor controls on numpad by depending on the state of Num Lock
- added a possibility to capture cubemaps for VR (mme_saveCubemap, mme_combineStereoShots)
- added DeFRaG timer (mov_defragTimer*)
- added a minor optimization for SSE blurring functions (mme_cpuSSE2)
- added displaying CPU features on startup
- added a possibility to offset view horizontally and vertcially in third person POV (cg_thirdPersonHorzOffset and cg_thirdPersonVertOffset)
- added a possibility to align speedometer to the left, right, or center (cg_drawSpeedometerAlignment)
Changes:
- holding mouse2 in chase view now lets roll the view
- set new default value for com_affinity "0": pipe capture is considered default and it works faster with all cores
- set new default value for mme_cpuSSE2 "1"
- set default value for mme_pipeCommand "auto": automatically chooses the command by depending on cubemap and/or stereo or their missing
- increased amount of patch planes from 2048 to 8192
- increased amount of shader files from 4096 to 8192
- set new default values for cg_drawSpeedometerPos and cg_drawMovementKeysPos
- made stepped rewinding align to the closest time when paused
- made shaders in 2D (HUD/console) depend on the game time instead of real time
Fixes:
- fixed never working bloom (r_bloom)
- added ratio fix for drawing a rectangle
- added ratio fix to ammo warning position
- fixed drawing speedometer and chatbox twice
- fixed setting incorrect CPMA colours for nicknames and models
- added ratio fix to the loading screen
- fixed never resetting underwater effect when going back to main menu
- fixed requiring admin rights to open demos that are associated with q3mme
- fixed having no hit sounds in CPMA demos when CPMA assets were not loaded
- fixed jittering map objects that has to move by sine trajectory
- fixed sometimes silent or moved stereo sounds in main menu after closing a demo
- fixed incorrectly moving shaders in 1st person and also adjusted precision of shaders time calculations
Some screenshots from q3mme 1.9: imgur.com/a/FLjPuAc
Good luck with new movies.
P.S.: the VR longread
The idea:
Q3MME is a pretty complete tool and making new releases requires some big features. Also staying up to date to modern technologies is a good reason for a new release as well.
The idea visited me a year ago when I got my VR set. So here we are: I decided to add the VR capture into Q3MME.
The solution:
After googling a lot I found many solutions but all of them could not be simply applied to the game.
Eventually I got the main idea: I need to capture the whole world around and the simplest way to do so it to capture cubemaps.
And then I accidentally found out that ffmpeg can convert from and to any kind of spherical projection and that I could just use cubemaps.
A year later all stars got aligned.
VR video types:
1) 180 degrees stereoscopic 3D (VR180)
2) 360 degrees monoscopic (VR360)
To capture for VR:
1) highly recommended but still optional: install ffmpeg and either put ffmpeg.exe next to quake3mme.exe or add it to %PATH% variable
2) set resolution to at least 720 pixels height (for example: set r_customwidth 1280; set r_customheight 720; r_mode -1)
3) set cg_draw2D 0; set con_notifytime -1; mme_saveCubemap 1
4) VR180:
set r_stereoSeparation -0.5; set r_zproj 25
set mme_pipeCommand "ffmpeg -f avi -i - -threads 0 -vf v360=c1x6:he:in_forder=frblud:in_stereo=tb:out_stereo=sbs -c:a aac -c:v libx264 -preset ultrafast -pix_fmt yuv420p -crf 19 -y -metadata:s:v stereo_mode=left_right %o.mkv 2> ffmpeglog.txt"
eyes are separated by 0.5 game units from the centre (-0.5 is the same, just for the left eye) and the focus point is 25 units forward, values can be changed
using filter v360 we set input projection as cubemap 1x6 with faces order 'forward right back left up down', output projection as half equirectangular and input stereo top-down, output stereo side-by-side
VR360:
set r_stereoSeparation 0
set mme_pipeCommand "ffmpeg -f avi -i - -threads 0 -vf v360=c1x6:e:in_forder=frblud -c:a aac -c:v libx264 -preset ultrafast -pix_fmt yuv420p -crf 19 -y %o.mkv 2> ffmpeglog.txt"
using filter v360 we set input projection as cubemap 1x6 with faces order 'forward right back left up down', output projection as equirectangular
to capture for YouTube container should be mp4, in other case set it to mkv
more info: ffmpeg.org/ffmpeg-filters.html#v360
5) capture pipe 60 name
That's all, the video is captured.
Editing:
You can edit your VR video in Adobe Premiere Pro: helpx.adobe.com/premiere-pro/using/VRSupport.html
And publish from there as well so the Publication block could be skipped.
Publication:
To make video players understand that the video is VR (uploading to YouTube requires that too) it has to have the corresponding metadata.
Unfortunately by the date of 2021.11.24 ffmpeg cannot add such kind of metadata so you have to use other tools.
You can inject additional metadata by using mkvmerge tool:
VR180 for manual sharing and YouTube:
mkvmerge --output out.mkv --projection-type 0:1 --projection-private 0:0x000000000x000000000x000000000x3fffffff0x3fffffff --stereo-mode 0:side_by_side_left_first in.mkv
VR360 for manual sharing:
mkvmerge --output out.mkv --projection-type 0:1 --projection-private 0:0x000000000x000000000x000000000x3fffffff0x3fffffff in.mkv
Or you can use Header editor from MKVToolNix GUI to add projection type, projection type private data (or leave it untouched) and stereo mode in case of VR180. Setting stereo mode is not needed if it was set though ffmpeg.
more info: mkvtoolnix.download/doc/mkvmerge.html
github.com/google/spatial-media/blob/master/docs/spherical-video-v2-rfc.md#webm-matroska
VR360 for YouTube:
You can inject additional metadata by using Spatial Media Metadata Injector:
0) convert to mp4 if previously captured in mkv:
ffmpeg -i in.mkv -c copy out.mp4
1) download: github.com/google/spatial-media/releases/tag/v2.1
2) run the tool and check "My video is spherical (360)"
3) click "Inject metadata" and wait a bit
The video is ready for YouTube.
Video resolution:
The least recommended resolution of the game should be WIDTHx720, so it could capture cubemaps with 6 faces of 720x720 and final video resolution will be 2880x1440.
2880x1440 is one of the most popular resolution for many VR sets.
Extra:
Technically VR360 could be stereoscopic 3D but looking behind will swap eyes position so the depth will be ******ed up. Though you can look up and down by way higher angles.
So VR180 could be monoscopic as well but it has no sense since VR360 monoscopic covers everything.
You can capture for VR without pipe, just save cubemaps directly into screenshots or AVI. But then you will need to convert the cubemaps into any spherical projection anyways. Pipe is the default way now so better use it.
YouTube compresses much so it's better to capture at high resolution like WIDTHx1080.