mirv_campath
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
Demo type specific requirements
GOTV
None, switching to free camera mode is recommended.
POV (in-eye) demos
For POV demos you should switch to thirdperson mode and enable mode as described here:
[[mirv_input - Third person camera|Source:mirv_input#third-person-camera]]
Add camera keyframes to the path
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.
Enable the current path
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.
Draw the current path on screen
If you enter the path will be drawn on screen, assuming that your modification is supported.
Change the visualization of the campath keyframes
(default 0)
(default 1)
mirv_campath draw keyIndex <value>
// draws the id of each keyframe, a higher value will increase the size. 0 to disable it.
Supported modifications for mirv_campath draw
- Counter-Strike: Global Offensive
- Modifications similar to the Source SDK 2013, e.g. Counter-Strike: Source
System requirements for drawing the path
- PixelShader version 2.0 must be supported
- VertexShader version 2.0 must be supported
Printing info about the path
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.
Removing keyframes
Removes the keyframe with the number <id>, which you can get from
// removes all keyframes, unless you have selected a keyframe(s)
Saving a path to a local file
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.
Loading a path from a local file
Loads a campath from file <filename> which was saved from (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:
Path editing tools
Setting the path to start at a new time
Offsets the whole current path to start at the current time.
Scaling the duration of the path
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).
Further editing tools
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 into the console.
Keyframe selection tools
Keyframes can be selected with
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 and 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 is enabled.
Workflow examples
With what we have learned from the commands above, listed below are some example workflows using the campath feature.
#1: Adding keyframes in slowed demo time
- 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 keyframesmirv_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
#2: Using mirv_input camera in a paused demo
- 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
#3: Campath with only 2 keyframes (requires linear interpolation)
- 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 keyframesmirv_campath edit interp position linear
mirv_campath edit interp rotation sLinear
mirv_campath edit interp fov linear
// these commands change the interpolation to linearmirv_campath enabled 1
- Go back in time before the first keyframe and play the demo
#4: Saving, editing and loading a campath from a file
- 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 folderAlt
+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
Related wiki pages
- [[Source:mirv_input]]
- [[Source:Order of camera overrides]]