Source:mirv_campath - advancedfx/advancedfx GitHub Wiki
This command allows to make campaths easily.
Table of Contents
- Demo type specific requirements
- Adding camera keyframes
- Enabling the campath
- Draw the campath on screen
- Printing info about the campath
- Removing keyframes
- Saving a campath to a local file
- Loading a campath from a local file
- Path editing tools
- Selecting keyframes
- Workflow examples
- Related wiki pages
None, switching to free camera mode is recommended.
For POV demos you should switch to thirdperson mode and enable mirv_input camera mode as described here:
mirv_input - Third person camera
mirv_campath add
Adds the current time and view to the path. If you happen to exactly hit a time already set in the path, then it will be overwritten.
Currently you need to add at least 4 keyframes before you can enable the camera path.
mirv_campath enabled 0|1
If you enter 1 the path is enabled (or enter 0 to disable).
Currently you need to add at least 4 keyframes before you can enable the camera path.
mirv_campath draw enabled 0|1
If you enter mirv_campath draw enabled 1 the path will be drawn on screen, assuming that your modification is supported.
mirv_campath draw keyAxis 0|1 (default 0)
mirv_campath draw keyCam 0|1 (default 1)
mirv_campath draw keyIndex <value>
// draws the id of each keyframe, a higher value will increase the size. 0 to disable it.
- Counter-Strike: Global Offensive
- Modifications similar to the Source SDK 2013, e.g. Counter-Strike: Source
- PixelShader version 2.0 must be supported
- VertexShader version 2.0 must be supported
mirv_campath print
Prints all information you need to know about the campath keyframes (such as; keyframe id, time, position, rotation, fov etc) and the current demo time you are at.
mirv_campath remove <id>
Removes the keyframe with the number <id>, which you can get from mirv_campath print
mirv_campath clear // removes all keyframes, unless you have selected a keyframe(s)
mirv_campath save <filename>
Saves the campath to file <filename> in XML format, if specified. The information in this file will basically be the same info as mirv_campath print
and you should be able to open it with Notepad or similar software.
If no file path is specified, the file will be saved to where the game .exe file is located.
mirv_campath load <filename>
Loads a campath from file <filename> which was saved from mirv_campath save (see above).
If no file path is specified, the file will be loaded from where the game .exe file is located.
Currently the path needs to be enabled again after loading it:
mirv_campath enabled 1
mirv_campath edit start
Offsets the whole current path to start at the current time.
mirv_campath edit duration <dValue>
Sets a new duration for the path in seconds using the floating point value <dValue>. In the unlikely event that due to rescaling several keyframes land on the same time, the value of the last keyframe will be used (no interpolation is done).
There are further editing tools available (edit position / fov / angles of all or selected keyframes etc).
To get a list and help for those enter mirv_campath edit into the console.
Keyframes can be selected with mirv_campath select
Please enter it without further options in the console to list all available sub-commands and a few handy examples in the console.
When keyframes are selected, then the mirv_campath clear and mirv_campath edit functions will only be applied to the selected keyframes. If none are selected they are applied to all keyframes. (So after clearing the selected keyframes, no keyframes will be selected and thus you probably don't want to clear them again, since that would clear the whole path then).
Selected keyframes / path parts will be shown in inverted colour if mirv_campath draw is enabled.
With what we have learned from the commands above, listed below are some example workflows using the campath feature.
- Fly to a location (and time) where you want the campath to start
- Set the demo speed to 1/4x (25%) (to follow the action more easily)
-
mirv_campath add
(or use a key bind for that command) - As the demo plays slowly, fly the camera to another nearby location and do
mirv_campath add
- Repeat the previous step (4) until you have added at least 4 campath keyframes
- Pause the demo (bind a key to
demo_togglepause
if you don't want to use the demo player) -
mirv_campath print
to make sure that you have added >=4 keyframes -
mirv_campath enabled 1
// to activate the campath - Now you need to go back in time, which there are several ways to do:
a.demo_gototick <tick>
// enter a tick that takes place before the first keyframe
b.mirv_skip time -x
// x is how many seconds to go back in time - Once you have gone back far enough in time, the campath will start when you play the demo and it reaches the tick/time of the first campath keyframe
- Go into the free camera mode if you haven't already
- Go to a time where you want the campath to start
- Pause the demo
-
mirv_input camera
// to be able to fly around while the demo is paused
Note that some of your binds may not work while in this mode
and you can only move around while the console is closed - Fly to a location where you want the campath to start and do
mirv_campath add
-
mirv_skip time 1.5
// to go forwards in time by 1.5 seconds - Fly to another nearby location and do
mirv_campath add
- Repeat steps 6 + 7 until you have added at least 4 keyframes
-
mirv_campath print
to make sure you have added >=4 keyframes - Exit the camera mode by either pressing
ESC
or typingmirv_input end
-
mirv_campath enabled 1
// to activate the campath - Now you need to go back in time, use one of these commands:
a.demo_gototick <tick>
// enter a tick that takes place before the campath
b.mirv_skip time -x
// x is how many seconds to go back in time - The campath will start once you play the demo and it reaches the tick/time of the first campath keyframe
- Fly to a location (and time) where you want the campath to start
mirv_campath add
- Fly to another location (and different time) where you want the campath to end
mirv_campath add
-
mirv_campath print
to make sure you added both keyframes -
mirv_campath edit interp position linear
mirv_campath edit interp rotation sLinear
mirv_campath edit interp fov linear
// these commands change the interpolation to linear mirv_campath enabled 1
- Go back in time before the first keyframe and play the demo
- Create a campath, either with your own method or using one of the examples above
-
mirv_campath save name.xml
// the file will be created in the game .exe folder -
Alt
+Tab
from the game and open the file with Notepad++ (recommended) or similar software
The information inside the file will be similar tomirv_campath print
and you can make changes directly to the file, rather than editing the campath in-game with commands - Save the file when you have made changes to it
- Go in-game and load the file:
mirv_campath load name.xml
-
mirv_campath enabled 1
// only needs to be typed once if you stay in-game - Go to a time just before the first keyframe and play the demo
- (Optional) Repeat the process starting from step 3 to make further changes