Ru/Demo Recording Tools: Difference between revisions

From Valve Developer Community
< Ru
Jump to navigation Jump to search
mNo edit summary
m (Multipage removal)
 
(30 intermediate revisions by 15 users not shown)
Line 1: Line 1:
{{totranslate:ru}}
{{LanguageBar}}
{{cleanup}}
{{todo|A better translation than a babelfish translation, and a translation of the WHOLE page.}}
=Введение=
ПРИМЕЧАНИЕ: Большая часть статьи переведена с использованием автоматического переводчика и содержит эта статья грубые языковые ошибки.


{{translate}}
== Введение ==
Source Engine содержит комплект инструментов для записи игры в демо файлы, их воспроизведения и редактирования. Эти инструменты доступны через команды консоли или утилиты с графическим интерфейсом.
Source Engine содержит комплект инструментов для записи игры в демо файлы, их воспроизведения и редактирования. Эти инструменты доступны через команды консоли или утилиты с графическим интерфейсом.


=Основны записи и воспроизведения=
== Основны записи и воспроизведения ==
Для того чтобы записать игру, необходимо написать в консоли <code>record "name"</code>, причем имя архива не должно содержать специальных символов и пробелов. Архив demo (с расширением .dem) сохраняется в директории игры, например <code>\hl2\name.dem</code>. Вы можете начать запись игры в любое время, а также остановить ее с помощью команды <code>stop</code>. Если во время записи происходит смена уровня, то запись текущего файла прекратится и начнется запись следующего с именем name_2 (name_3, name_4, и т.д.). Для просмотра ранее записанных игр, то необходимо написать в консоли <code>playdemo "name"</code>. Если вы хотите использовать демо-запись как бенчмарк, то используйте команду <code>timedemo "name"</code>. Timedemo воспроизводит запись как можно быстрее и показывает по ее завершению статистику ( количество отображенных кадров, время, затраченное на воспроизведение,среднее число кадров в секунду и его изменение).
Для того чтобы записать игру, необходимо написать в консоли <code>record "name"</code>, причем имя файла не должно содержать специальных символов и пробелов. Файл demo (с расширением .dem) сохраняется в директории игры, например <code>\hl2\name.dem</code>. Вы можете начать запись игры в любое время, а также остановить ее с помощью команды <code>stop</code>. Если во время записи происходит смена уровня, то запись текущего файла прекратится и начнется запись следующего с именем name_2 (name_3, name_4, и т.д.). Для просмотра ранее записанных игр, то необходимо написать в консоли <code>playdemo "name"</code>. Если вы хотите использовать демо-запись как бенчмарк, то используйте команду <code>timedemo "name"</code>. Timedemo воспроизводит запись как можно быстрее и показывает по ее завершению статистику ( количество отображенных кадров, время, затраченное на воспроизведение,среднее число кадров в секунду и его изменение).


=Demo Player=
== Demo player ==
[[Image:demoplayback.jpg]]
[[File:demoplayback.jpg]]


В любое время, пока воспроизводится демо файл, окно проигрывателя может быть выведено на экран нажатием '''Shift-F2''' или команды консоли <code>demoui</code>. Окно проигрывателя позволяет делать паузу и продолжить воспроизведение, изменить скорость воспроизведения или изменить положение камеры.
В любое время, пока воспроизводится демо файл, окно проигрывателя может быть выведено на экран нажатием '''Shift-F2''' или команды консоли <code>demoui</code>. Окно проигрывателя позволяет делать паузу и продолжить воспроизведение, изменить скорость воспроизведения или изменить положение камеры.
Line 17: Line 15:
Для загрузки демо файла нужно нажать кнопку '''Load...''' и выбрать файл на диске. Имя загружаемого файла будет показано справа от кнопки '''Load...'''. Текущее и полное время воспроизведения показано под кнопкой. Используя слайдер справа можно регулировать скорость воспроизведения от 0% до 600% от обычной скорости. Ниже расположена строка прогресса, под которой находятся кнопки '''Play''', '''Pause''', '''Resume''', кадр вперед '''>''', к началу '''|<''', к концу '''>|''' (некоторые функции пока не работают, например кадр назад '''<''', быстро назад '''<<''')
Для загрузки демо файла нужно нажать кнопку '''Load...''' и выбрать файл на диске. Имя загружаемого файла будет показано справа от кнопки '''Load...'''. Текущее и полное время воспроизведения показано под кнопкой. Используя слайдер справа можно регулировать скорость воспроизведения от 0% до 600% от обычной скорости. Ниже расположена строка прогресса, под которой находятся кнопки '''Play''', '''Pause''', '''Resume''', кадр вперед '''>''', к началу '''|<''', к концу '''>|''' (некоторые функции пока не работают, например кадр назад '''<''', быстро назад '''<<''')


Для маркировки одиночных кадров в пределах воспроизведения время внутри демо файла разделено на так называемые тики(ticks). Текущее и полное количество тиков показано слева от кнопки '''Goto:'''. Можно перейти к произвольному тику в пределах демо файла путем ввода его номера в текстовое поле и нажатия кнопки '''Goto:'''.
Демо файлы используют тики(ticks) для определения отдельных кадров. Текущее и полное количество тиков показано слева от кнопки '''Goto:'''. Можно перейти к произвольному тику в пределах демо файла путем ввода его номера в текстовое поле и нажатия кнопки '''Goto:'''.


Для изменения положения камеры нужно переключится путем нажатия кнопки '''Drive...''' в "режим управления камерой". Кнопка останется нажатой пока режим управления камерой будет активен. Для навигации камеры нужно нажать левую кнопку мыши и передвинуть курсор в желаемом направлении. Также можно передвигать камеру в горизонтальном положении нажимая на клавиатуре клавиши '''W''','''A''','''S''','''D''', а для перемещения по-вертикали клавиши '''Z''' и '''X'''. Скорость перемещения можно увеличить, если нажимать дополнительно клавишу '''Shift'''. Когда воспроизведение приостановлено это становится весьма полезно для получения скриншотов (используя <code>r_drawviewmodel 0</code> и <code>cl_drawhud 0</code> для очистки экрана). Снова нажмите кнопку '''Drive...''' для того чтобы вернутся к нормальному положения камеры.
Для изменения положения камеры можно переключится в режим управления камерой, нажав на кнопку '''Drive...'''. Кнопка останется нажатой, пока режим управления камерой будет активен. Для навигации камеры нужно нажать левую кнопку мыши и передвинуть курсор в желаемом направлении. Также можно передвигать камеру в горизонтальном положении нажимая на клавиатуре клавиши '''W''','''A''','''S''','''D''', а для перемещения по-вертикали клавиши '''Z''' и '''X'''. Скорость перемещения можно увеличить, если нажимать дополнительно клавишу '''Shift'''. Когда воспроизведение приостановлено это становится весьма полезно для получения скриншотов (используя <code>r_drawviewmodel 0</code> и <code>cl_drawhud 0</code> для очистки экрана). Снова нажмите кнопку '''Drive...''' для того чтобы вернутся к нормальному положению камеры.


=Demo Editor=
== Demo editor ==
[[Image:demoeditor.jpg]]
[[File:demoeditor.jpg]]


Для того, чтобы открыть редактор демо файлов? нужно нажать кнопку '''Edit...''' в окне воспроизведения. Демо редактор позволяет добавлять и выполнять набор команд в ходе воспроизведения. Эти команды могут отображать текст, плавно приближать/удалять, изменять угол отображения и запускать любые другие команды консоли. В демо редакторе нельзя изменить положение камеры, для этого предназначен Demo Smoother. Команды демо сохраняются не в демо файле, а в дополнительном текстовом файле под именем '''demoname.vdm'''. Этот VDM файл загружается и исполняется каждый раз при воспроизведении демо файла.
Для того, чтобы открыть редактор демо файлов, нужно нажать кнопку '''Edit...''' в окне воспроизведения. Демо редактор позволяет добавлять и выполнять набор команд в ходе воспроизведения. Эти команды могут отображать текст, делать fade in/out, изменять Field-of-view и запускать любые другие команды консоли. В демо редакторе нельзя изменить положение камеры, для этого предназначен Demo Smoother. Команды демо сохраняются не в демо файле, а в дополнительном текстовом файле под именем '''demoname.vdm'''. Этот VDM файл загружается и исполняется каждый раз при воспроизведении демо файла с соответствующим именем.


To open the Demo Editor GUI, press the "Edit..." button in the Demo Playback window. The Demo Editor allows you to add and execute a set of commands during demo playback. These demo commands can display text, fade in/out, change the FOV or run any other console command. The Demo Editor can not change the camera view, use the Demo Smoother to do that. The demo commands are not saved within the demo file itself, but in a extra text file named demoname.vdm. These .VDM text files are loaded and executed each time a demo file with the same name is played.
Для добавления новых команд нажмите кнопку '''New->''' и выберите команду, которую хотите добавить, например '''PlayCommands''' для выполнения консольных команд. Каждая пользовательская демо-команда имеет имя и время (тик), когда она будет выполняться. Если вы добавляете новую команду, дайте ей имя (напирмер "My command), установите параметр "Start on" на "TimeUseTick", введите допустимый тик и консольную команду, например "''echo This is my command''". После нажатия '''OK''' новая демо-команда будет добавлена в список команд. Ранее введенные команды можно изменить нажатием на кнопку '''Edit...''' или удалить нажатием кнопки '''Delete'''. После завершения работы со списком демо-команд вы можете сохранить его в файл ''demoname.vdm'' нажав кнопку '''Save'''.


To add a new command, hit the "New->" button and choose a demo command you want to add, for example '''PlayCommands''' to execute a console command. Each demo command has a user given name and point of time (clock or tick) to be executed. If you added a new PlayCommands entry, choose a new name ("My command"), set "Start on" to "TimeUseTick", enter a valid tick and enter the console command to be executed, e.g. "echo This is my command". Then hit "OK" and a new demo command will be added to the command list. Existing commands can be changed by pressing "Edit..." or removed with "Delete". Once the demo command list is complete, you can save it to the demoname.vdm file by hitting "Save".
Ниже приведен список доступных команд:


The following list gives an overview about the available demo commands:
{| class=standard-table
 
| SkipAhead              || Остановка воспроизведения демо-записи и переход с установленному тику с продолжением воспроизедения.
{|
| SkipAhead              || Skips demo playback ahead to a specified tick and resumes playback.
|-
|-
| StopPlayback            || Stops demo playback immediately.
| StopPlayback            || Немедленная остановка воспроизведения демо-записи.
|-
|-
| PlayCommands            || Executes a console command.
| PlayCommands            || Выполнение команды консоли.
|-
|-
| ScreenFadeStart        || Fade screen in/out.
| ScreenFadeStart        || Плавный fade in/out.
|-
|-
| TextMessageStart        || Shows a simple text message.
| TextMessageStart        || Показывает простой текст.
|-
|-
| PlayCDTrackStart        || Starts playing a CD track.
| PlayCDTrackStart        || Запускает воспроизведение CD-трека.
|-
|-
| PlaySoundStart          || Plays a .WAV or .MP3 sound file.
| PlaySoundStart          || Воспроизведение звукового файла .WAV или .MP3.
|-
|-
| Pause                  || Pauses playback for given seconds.
| Pause                  || Приостановка воспроизведения на несколько секунд.
|-
|-
| ChangePlaybackRate      || Changes the playback speed.
| ChangePlaybackRate      || CИзменение скорости воспроизведения.
|-
|-
| ZoomFov                || Adds a zoom in/out effect.
| ZoomFov                || Добавляет эффект зума.
|}
|}


=Demo Smoother=
== Demo smoother ==
[[Image:demo_smoother.jpg]]
[[File:demo_smoother.jpg]]


The Demo Smoother is the most complex of all demo tools and allows to override the camera view in demo files. This can be used to smooth out the recorded view or create completely new camera paths. To open the Demo Smoother, hit the "Smooth..." button in the Demo Playback window.
The Demo Smoother - самый сложный из всех инструментов для работы с демками, он позволяет изменить положение камеры в демках. Это можно использовать для того, чтобы изменить записанный вид или создать совершенно новые пути камеры. Чтобы открыть Demo Smoother, нажмите на кнопку "Smooth..." в окне Demo Playback.


The first thing to do is to pause the playback and load the existing view data from the current demo file by hitting "Reload". Check the "Show All" checkbox to see the complete camera path in your demo file (drawn white). All the time when working with the Demo Smoother, you can still go into "Camera drive mode" and move around the map. If you're not in "Camera Drive mode", you can check the "Back off" checkbox to move the camera backward a bit so you can see some of the path of the camera.
Для начала нужно остановить воспроизведение и загрузить уже существующие данные о положении камеры из демо файла, нажав на кпонку "Reload". Поставьте галочку около "Show All", чтобы увидеть полный путь камеры в демо файле (белая линия). При работе с Demo Smoother Вы можете в любой момент переключиться на режим управления камерой и перемещаться по карте. Также можно поставить галочку около "Back off", чтобы отдалить камеру немного назад и увидеть ее путь.


To work with the smoother, you need to have an active selection. To select an part of the current camera track for modification, fill in the "Start Tick" and "End Tick" fields and press "Select". This tick range is now your active selection and the selected samples are now shown in yellow. Click the Show Original button and the camera will follow the path of the selected samples. Notice that we are "backed off" due to the back off button being checked, that's just for the preview. Unclick the back off button for now. Click the lock camera check box and then hold the mouse down on the "Drive Camera" button and you use the WASD keys and mouselook movement to move the camera around. Hit "S" and move back from the current viewpoint.
Для работы необходимо иметь выделенный фрагмент. Для его выделения, введите "Start Tick" и "End Tick" и нажите "Select". Эта часть тиков теперь является текущим фрагментом и будет рисоваться желтым. Нажмите на кнопку Show Original и камера пройдет по текущему выделению. Если поставлена галочка "Back off", то камера будет немного удалена назад.
Ставим галочку на "Lock camera", удерживая нажатой клавишей мышки "Drive", с помощью клавиш WASD и самой мышки перемещаем камеру так, как хотелось бы видеть ее полет.
[[File:demo_smoother2.jpg]]


[[Image:demo_smoother2.jpg]]
На этом изображении камера - синий куб с красной линией. Если у вас стоит галочка на "lock camera", то с помощью кнопок "<<" и ">>" вы можете изменять ее месторасполажение. Если же галочка не стоит, то с помощью этих кнопок вы будете перемещать свой "взгляд", в принципе тоже самое, только с видом от первого лица.. Щелчок на кнопке "Process ->" покажет поддерживаемых типов обработки движения камеры.


From this view, the blue box with the red direction line is the current preview position. If you have lock camera clicked and you press the "<<" or ">>" buttons you will move this marker one frame forward or backward. If you don't have the lock camera button checked, then when you press the "<<" or ">>" buttons your view will snap to the new camera position. The white samples at the start and end show you the next few samples just outside your selection range. Clicking the "Process->" button will bring up the menu of currently supported processing types.
== Smooth selection angles ==
 
=Smooth selection angles=
Clicking this averages the view angles over a window of about 10 samples, thereby removing some of the high frequency noise from the camera. The smoothed camera directions are shown as purple samples near each yellow sample line. You can preview the processed positions by clicking the "Show processed" button (make sure you turn off "lock camera" if you want to actually see from the camera position, otherwise you'll just see the blue box/red line move across your selection).
Clicking this averages the view angles over a window of about 10 samples, thereby removing some of the high frequency noise from the camera. The smoothed camera directions are shown as purple samples near each yellow sample line. You can preview the processed positions by clicking the "Show processed" button (make sure you turn off "lock camera" if you want to actually see from the camera position, otherwise you'll just see the blue box/red line move across your selection).


Note that the speed scale slider from the "Demo Playback" UI will influence the Show Original/Show Processed (and Drive Camera) speed in the Demo Smoother UI. Okay, that's pure angle smoothing by just averaging the angles over a small window. To undo this change you can just click the "Undo" button.
Note that the speed scale slider from the "Demo Playback" UI will influence the Show Original/Show Processed (and Drive Camera) speed in the Demo Smoother UI. Okay, that's pure angle smoothing by just averaging the angles over a small window. To undo this change you can just click the "Undo" button.


=Smooth selection origin=
== Smooth selection origin ==
This is similar to the above, except the window is applied to the origin samples. Clicking this button can be used to remove a bit of high frequency positional jitter. The smoothed camera path is colored yellowish, which deviates from the gray original path. This is the new smoothed path on which the camera will track. Of course, you can apply both angle and origin smoothing to the selection, etc.
This is similar to the above, except the window is applied to the origin samples. Clicking this button can be used to remove a bit of high frequency positional jitter. The smoothed camera path is colored yellowish, which deviates from the gray original path. This is the new smoothed path on which the camera will track. Of course, you can apply both angle and origin smoothing to the selection, etc.


=Linear Interp Angles=
== Linear Interp Angles ==
What this tool does it take only the very first sample in the selection range and the very last sample in the range, and then linearly interpolates the view direction smoothly across the entire range.
What this tool does it take only the very first sample in the selection range and the very last sample in the range, and then linearly interpolates the view direction smoothly across the entire range.


=Linear Interp Origin=
== Linear Interp Origin ==
Similar to the above, you can linearly interpolate the origin from the start to end sample. As you will see, the camera position follows a direct path from the start to end position, but the original view pitch/roll/yaw data is preserved. You can choose "Linear Interp Angles" if you want to smooth out the angles over this selection as well.
Similar to the above, you can linearly interpolate the origin from the start to end sample. As you will see, the camera position follows a direct path from the start to end position, but the original view pitch/roll/yaw data is preserved. You can choose "Linear Interp Angles" if you want to smooth out the angles over this selection as well.


=Spline Angles and Spline Origin=
== Spline Angles and Spline Origin ==
[[Image:demo_smoother3.jpg]]
[[File:demo_smoother3.jpg]]


The spline functionality, in general, requires you to mark certain samples as "Key Frames" for creating the spline. By default, the first and last samples are automatically included as "anchor" key frames, but you'll want to add at least one if not multiple additional key frames.
The spline functionality, in general, requires you to mark certain samples as "Key Frames" for creating the spline. By default, the first and last samples are automatically included as "anchor" key frames, but you'll want to add at least one if not multiple additional key frames.
Line 94: Line 90:




=Demo Console Commands=
== Demo {{L|ConCommand|console command}}s ==
{|
{| class=standard-table
| demo_debug <0/1> || Shows additional demo debug info
| demo_debug <0/1> || Показывает дополнительные отладочные данные
|-
|-
|demo_fastforwardstartspeed <factor> || Go this fast when starting to hold FF button.
|demo_fastforwardstartspeed <factor> || Начальная скорость при быстрой перемотке.
|-
|-
| demo_fastforwardramptime <seconds> || How many seconds it takes to get to full FF speed.
| demo_fastforwardramptime <seconds> || Сколько секунд требуется для полного ускорения.
|-
|-
| demo_fastforwardfinalspeed <factor> || Final playback speed when holding the FF button.
| demo_fastforwardfinalspeed <factor> || Максимальная скорость быстрой перемотки.
|-
|-
| demo_interpolateview <0/1> || Enables/disabled view interpolation between demo ticks
| demo_interpolateview <0/1> || Enables/disabled view interpolation between demo ticks
|-
|-
| demo_quitafterplayback <0/1> || Quits game after demo playback
| demo_quitafterplayback <0/1> || Выход из игры после завершения воспроизведения
|-
|-
| demo_recordcommands <0/1> || Record commands typed at console into .dem files
| demo_recordcommands <0/1> || Записывать ли консольные команды во время записи в .dem файл
|-
|-
| demo_pause [seconds] || Pauses demo playback, seconds optional
| demo_pause [seconds] || Пауза на несколько секунд
|-
|-
| demo_resume || Resumes demo playback
| demo_resume || Продолжение воспроизведения
|-
|-
| demo_togglepause || Toggles demo pause/playback
| demo_togglepause || Пауза/воспроизведение
|-
|-
| demo_gototick <tick> [relative] [pause] || Skips to a tick in demo. If the relative parameter is 1 the tick is an offset to the current tick. If the pause parameter is 1, playback while be paused when tick is reached
| demo_gototick <tick> [relative] [pause] || Переход к определённому тику в демке. Если второй параметр равен 1, то финальный тик будет равен сумме текущего и введенного. Если третий параметр равен 1, воспроизведение остановится после перехода.
|-
|-
| demo_timescale <scale> || Set the demo playback speed as a factor, 1.0 is normal playback
| demo_timescale <scale> || Скорость воспроизведения, 1.0 - это норма.
|}
|}


=Video Tutorial=
== Примечания ==
[http://files.filefront.com/Demo_Smoother_Video_Tutorial/;3850024;;/fileinfo.html Demo Smoother Video Tutorial]
 
* Вы не можете видеть себя в демках от первого лица (POV) при использовании Demo Smoother. Вы являетесь КАМЕРОЙ.


Requires Xvid codec
* При нажатой кнопке Drive используйте правую кнопку мыши для изменения скорости демки.


by Fragalishus
* Если ваше SourceTV-демо замирает на свободном положении, попробуйте использовать '''sv_client_predict 0''' и '''tv_transmitall 1'''.




=Bugs=
{| class=standard-table
! Другие полезные консольные команды
|-
| {{L|sv_cheats}} <0/1> || Требуется для следующих команд.
|-
| r_drawviewmodel <0/1> || Скрыть модель оружия.
|-
| cl_drawhud <0/1> || Скрыть интерфейс.
|-
| hud_saytext_time 0 || Скрыть текст чата, по умолчанию = 12.
|-
| hideradar || Hides radar location text.
|-
| cl_radaralpha 0 || Hides new radar overviews (def. = 200).
|-
| drawradar || Активировать радар.
|-
| thirdperson  ||  Активировать вид от третьего лица (firstperson вид от первого лица).
|-
| cam_command <0/1>  ||  Enables camera mode. (*Use this instead of "thirdperson")
|-
| cam_idealyaw <число>  ||  Поворот камеры вокруг модели по горизонтали. (0-360)
|-
| cam_idealpitch <число> || Поворот камеры вокруг модели по вертикали (0-360)
|-
| cam_idealdist <число>  ||  Указать дистанцию от игрока до камеры (по умолчанию = 64)
|-
! Используйта команду "find",чтобы найти другие опции
камеры (+camyawleft, и т.д.) Пример:  find cam
|}
 
== Bugs ==
''This bug list was compiled by Lunchtimemama on January 24, 2005 and is potentially out of date. Bugs listed here may be fixed and other bugs may exist.''
''This bug list was compiled by Lunchtimemama on January 24, 2005 and is potentially out of date. Bugs listed here may be fixed and other bugs may exist.''


'''Unfinished Features:'''
'''Unfinished Features:'''
*The step-back and rewind buttons are disabled.
* The step-back and rewind buttons are disabled.
*The fast-forward, go-to-beginning, and go-to-end buttons do not work.
* The fast-forward, go-to-beginning, and go-to-end buttons do not work.
*Half of the "Edit" effects are disabled.
* Half of the "Edit" effects are disabled.


'''Major Bugs'''
'''Major Bugs'''
*The "Edit" effect configuration windows are immobile and have broken minimize and close buttons.
# The "Edit" effect configuration windows are immobile and have broken minimize and close buttons.
*With "lock camera" engaged in the Smoother window and "Drive" engaged in the Playback window, the "Make Key" command will incorrectly use the "driven" camera's position instead of the "locked" camera's.
# With "lock camera" engaged in the Smoother window and "Drive" engaged in the Playback window, the "Make Key" command will incorrectly use the "driven" camera's position instead of the "locked" camera's.
*With "lock camera" and "Drive" engaged, the "Show Original" and "Show Processed" commands will not animate the "locked" camera (though the "step-forward" and "step-back" commands (in the Smoother) will).
# With "lock camera" and "Drive" engaged, the "Show Original" and "Show Processed" commands will not animate the "locked" camera (though the "step-forward" and "step-back" commands (in the Smoother) will).
*With "lock camera" disengaged and "Drive" engaged, the blue-box camera indicator does not update position when the camera is "driven" around.
# With "lock camera" disengaged and "Drive" engaged, the blue-box camera indicator does not update position when the camera is "driven" around.
*Some demos suffer jumpiness similar to network lag, even those exported from the Smoother.
# Some demos suffer jumpiness similar to network lag, even those exported from the Smoother.
*"Jump to" in the Smoother does not seem to work properly.
# "Jump to" in the Smoother does not seem to work properly.
# Some demos will not allow you to make a selection, so smoothing is not possible.
# <s>Smoother does not work on srctv demos, cannot make a selection.</s> - Fixed in srctv updates, smoother should work now.  (#7 still applies, however.  Random bug, can't make a selection)
# When you die, the camera locks to your corpse in "view attacker" mode.


'''Minor Bugs'''
'''Minor Bugs'''
*The "New ->" list in the "Edit" window always opens upward, usually extending off-screen.
* The "New ->" list in the "Edit" window always opens upward, usually extending off-screen.
*"Goto" is very slow when going to a tick in the past.
* "Goto" is very slow when going to a tick in the past.
*If the blue-box camera indicator suffers movement lag during playback, it does not "catch up" when the demo is paused.
* If the blue-box camera indicator suffers movement lag during playback, it does not "catch up" when the demo is paused.
*When "Drive" is engaged, clicking and dragging in VGUI windows will move the camera (making it difficult to highlight text in a textfield).
* When "Drive" is engaged, clicking and dragging in VGUI windows will move the camera, making it difficult to highlight text in a textfield(this can be overcome by using SHIFT+left/rightarrow).
 
== Wish list ==
# '''dem_forcesrctv <0/1>'''
#* Requested functionality that dem_forcehltv 0/1 had.
#* Remove recoil.  (true free look)  Priority 1!
#* Ability to spectate 1st and 3rd person all other players. (wallhack block notwithstanding of course)
#* Remove muzzle flash and brass ejection. (not a huge deal, we can use sprites, but would be nice)
#'''Proper thirdperson mode.'''
#* Re-orient muzzle flash sprite to world model instead of first person view model.
#'''CVAR to override deathcam view.'''
#* When a player dies, any recammed smoother paths will snap back to the player when the ragdoll spawns and lock on viewing the attacker.  A cvar to override that, without overriding the smoother path, would be handy.
#'''Timestamps on srctv demos.'''
#* Same as hltv had.  Would be nice on POV demos, too, allowing for start/stop script recording.
#'''CVAR to disable flash bang effect on text/death notices.'''
#*  Considering +/-90% of all demos are recorded for frag movie purposes, there needs to be a cvar so death notices are not affected by flash bangs.  Even if it's a cheat cvar, available only during demo playback or something.
#'''OpenDML compliant avi files'''
#*  Currently, Source's avi utility does not create open-dml 2.0 compliant files, meaning files over 2 gb are corrupt, and has a 4 gb cap.
 
== See also ==
* {{L|Demo Video Creation}}
 
== External links ==
* [https://forums.steampowered.com/forums/showthread.php?s=&threadid=365785 Converting demos to avi - video tutorial] by Fragalishus
<!-- [http://files.filefront.com/DOD_S_movie_Tutzip/;4339094;;/fileinfo.html Direct link] this link doesn't work! -->
* [https://files.filefront.com/Demo_Smoother_Video_Tutorial/;3850024;;/fileinfo.html Demo Smoother Video Tutorial] (requires Xvid codec)


{{otherlang:ru}}
=Как записывать демо и превращать его в видео=
{{otherlang:ru:en|Demo Recording Tools}}
[https://www.youtube.com/watch?v=N6ZYSuC9s-Y&t=12s Source SDK - Как записать демо или Мувик 30-60 фпс]
{{ACategory|Tutorials}}


[[Category:Russian]]
{{ACategory|Source}}
[[Category:Technical:ru]]

Latest revision as of 06:09, 12 July 2024

English (en)Русский (ru)中文(臺灣) (zh-tw)Translate (Translate)
Info content.png
This page needs to be translated.
This page either contains information that is only partially or incorrectly translated, or there isn't a translation yet.
If this page cannot be translated for some reason, or is left untranslated for an extended period of time after this notice is posted, the page should be requested to be deleted.
Also, please make sure the article complies with the alternate languages guide.(en)

Введение

Source Engine содержит комплект инструментов для записи игры в демо файлы, их воспроизведения и редактирования. Эти инструменты доступны через команды консоли или утилиты с графическим интерфейсом.

Основны записи и воспроизведения

Для того чтобы записать игру, необходимо написать в консоли record "name", причем имя файла не должно содержать специальных символов и пробелов. Файл demo (с расширением .dem) сохраняется в директории игры, например \hl2\name.dem. Вы можете начать запись игры в любое время, а также остановить ее с помощью команды stop. Если во время записи происходит смена уровня, то запись текущего файла прекратится и начнется запись следующего с именем name_2 (name_3, name_4, и т.д.). Для просмотра ранее записанных игр, то необходимо написать в консоли playdemo "name". Если вы хотите использовать демо-запись как бенчмарк, то используйте команду timedemo "name". Timedemo воспроизводит запись как можно быстрее и показывает по ее завершению статистику ( количество отображенных кадров, время, затраченное на воспроизведение,среднее число кадров в секунду и его изменение).

Demo player

Demoplayback.jpg

В любое время, пока воспроизводится демо файл, окно проигрывателя может быть выведено на экран нажатием Shift-F2 или команды консоли demoui. Окно проигрывателя позволяет делать паузу и продолжить воспроизведение, изменить скорость воспроизведения или изменить положение камеры.

Для загрузки демо файла нужно нажать кнопку Load... и выбрать файл на диске. Имя загружаемого файла будет показано справа от кнопки Load.... Текущее и полное время воспроизведения показано под кнопкой. Используя слайдер справа можно регулировать скорость воспроизведения от 0% до 600% от обычной скорости. Ниже расположена строка прогресса, под которой находятся кнопки Play, Pause, Resume, кадр вперед >, к началу |<, к концу >| (некоторые функции пока не работают, например кадр назад <, быстро назад <<)

Демо файлы используют тики(ticks) для определения отдельных кадров. Текущее и полное количество тиков показано слева от кнопки Goto:. Можно перейти к произвольному тику в пределах демо файла путем ввода его номера в текстовое поле и нажатия кнопки Goto:.

Для изменения положения камеры можно переключится в режим управления камерой, нажав на кнопку Drive.... Кнопка останется нажатой, пока режим управления камерой будет активен. Для навигации камеры нужно нажать левую кнопку мыши и передвинуть курсор в желаемом направлении. Также можно передвигать камеру в горизонтальном положении нажимая на клавиатуре клавиши W,A,S,D, а для перемещения по-вертикали клавиши Z и X. Скорость перемещения можно увеличить, если нажимать дополнительно клавишу Shift. Когда воспроизведение приостановлено это становится весьма полезно для получения скриншотов (используя r_drawviewmodel 0 и cl_drawhud 0 для очистки экрана). Снова нажмите кнопку Drive... для того чтобы вернутся к нормальному положению камеры.

Demo editor

Demoeditor.jpg

Для того, чтобы открыть редактор демо файлов, нужно нажать кнопку Edit... в окне воспроизведения. Демо редактор позволяет добавлять и выполнять набор команд в ходе воспроизведения. Эти команды могут отображать текст, делать fade in/out, изменять Field-of-view и запускать любые другие команды консоли. В демо редакторе нельзя изменить положение камеры, для этого предназначен Demo Smoother. Команды демо сохраняются не в демо файле, а в дополнительном текстовом файле под именем demoname.vdm. Этот VDM файл загружается и исполняется каждый раз при воспроизведении демо файла с соответствующим именем.

Для добавления новых команд нажмите кнопку New-> и выберите команду, которую хотите добавить, например PlayCommands для выполнения консольных команд. Каждая пользовательская демо-команда имеет имя и время (тик), когда она будет выполняться. Если вы добавляете новую команду, дайте ей имя (напирмер "My command), установите параметр "Start on" на "TimeUseTick", введите допустимый тик и консольную команду, например "echo This is my command". После нажатия OK новая демо-команда будет добавлена в список команд. Ранее введенные команды можно изменить нажатием на кнопку Edit... или удалить нажатием кнопки Delete. После завершения работы со списком демо-команд вы можете сохранить его в файл demoname.vdm нажав кнопку Save.

Ниже приведен список доступных команд:

SkipAhead Остановка воспроизведения демо-записи и переход с установленному тику с продолжением воспроизедения.
StopPlayback Немедленная остановка воспроизведения демо-записи.
PlayCommands Выполнение команды консоли.
ScreenFadeStart Плавный fade in/out.
TextMessageStart Показывает простой текст.
PlayCDTrackStart Запускает воспроизведение CD-трека.
PlaySoundStart Воспроизведение звукового файла .WAV или .MP3.
Pause Приостановка воспроизведения на несколько секунд.
ChangePlaybackRate CИзменение скорости воспроизведения.
ZoomFov Добавляет эффект зума.

Demo smoother

Demo smoother.jpg

The Demo Smoother - самый сложный из всех инструментов для работы с демками, он позволяет изменить положение камеры в демках. Это можно использовать для того, чтобы изменить записанный вид или создать совершенно новые пути камеры. Чтобы открыть Demo Smoother, нажмите на кнопку "Smooth..." в окне Demo Playback.

Для начала нужно остановить воспроизведение и загрузить уже существующие данные о положении камеры из демо файла, нажав на кпонку "Reload". Поставьте галочку около "Show All", чтобы увидеть полный путь камеры в демо файле (белая линия). При работе с Demo Smoother Вы можете в любой момент переключиться на режим управления камерой и перемещаться по карте. Также можно поставить галочку около "Back off", чтобы отдалить камеру немного назад и увидеть ее путь.

Для работы необходимо иметь выделенный фрагмент. Для его выделения, введите "Start Tick" и "End Tick" и нажите "Select". Эта часть тиков теперь является текущим фрагментом и будет рисоваться желтым. Нажмите на кнопку Show Original и камера пройдет по текущему выделению. Если поставлена галочка "Back off", то камера будет немного удалена назад. Ставим галочку на "Lock camera", удерживая нажатой клавишей мышки "Drive", с помощью клавиш WASD и самой мышки перемещаем камеру так, как хотелось бы видеть ее полет. Demo smoother2.jpg

На этом изображении камера - синий куб с красной линией. Если у вас стоит галочка на "lock camera", то с помощью кнопок "<<" и ">>" вы можете изменять ее месторасполажение. Если же галочка не стоит, то с помощью этих кнопок вы будете перемещать свой "взгляд", в принципе тоже самое, только с видом от первого лица.. Щелчок на кнопке "Process ->" покажет поддерживаемых типов обработки движения камеры.

Smooth selection angles

Clicking this averages the view angles over a window of about 10 samples, thereby removing some of the high frequency noise from the camera. The smoothed camera directions are shown as purple samples near each yellow sample line. You can preview the processed positions by clicking the "Show processed" button (make sure you turn off "lock camera" if you want to actually see from the camera position, otherwise you'll just see the blue box/red line move across your selection).

Note that the speed scale slider from the "Demo Playback" UI will influence the Show Original/Show Processed (and Drive Camera) speed in the Demo Smoother UI. Okay, that's pure angle smoothing by just averaging the angles over a small window. To undo this change you can just click the "Undo" button.

Smooth selection origin

This is similar to the above, except the window is applied to the origin samples. Clicking this button can be used to remove a bit of high frequency positional jitter. The smoothed camera path is colored yellowish, which deviates from the gray original path. This is the new smoothed path on which the camera will track. Of course, you can apply both angle and origin smoothing to the selection, etc.

Linear Interp Angles

What this tool does it take only the very first sample in the selection range and the very last sample in the range, and then linearly interpolates the view direction smoothly across the entire range.

Linear Interp Origin

Similar to the above, you can linearly interpolate the origin from the start to end sample. As you will see, the camera position follows a direct path from the start to end position, but the original view pitch/roll/yaw data is preserved. You can choose "Linear Interp Angles" if you want to smooth out the angles over this selection as well.

Spline Angles and Spline Origin

Demo smoother3.jpg

The spline functionality, in general, requires you to mark certain samples as "Key Frames" for creating the spline. By default, the first and last samples are automatically included as "anchor" key frames, but you'll want to add at least one if not multiple additional key frames.

The best way to do this is to think of the original samples as a time reference and use the << and >> buttons to move the blue cursor to the sample at the time you want to mark as a key frame. Once you've done that, you need to unlock the camera if it's locked and then press "Set View" to put your eyes into the current sample point.

You can now move that sample point by clicking "Drive Camera" and moving with the keyboard and mouse, etc. Once you have the sample positioned and oriented (just using the camera) as you like, press the "Make Key" button. If you now back the camera up a bit more you'll see a green box which shows the current point as a key. Smoothing out the Edges

The final component of the smoother is useful for dealing with the edges left after post processing a .dem file selection. For instance, chose the last 5 frames to smooth out the right edge at the end of a sample ( type 5 in the Edge Frames box and selected Smooth Right from the Edge-> menu). As you can see in the inset, the processed/purple line is more smoothly integrated with the first non-selected white direction line. You need to use at least 3 edge frames and then select which edges(s) to smooth from the Edge-> menu.


Demo console command(en)s

demo_debug <0/1> Показывает дополнительные отладочные данные
demo_fastforwardstartspeed <factor> Начальная скорость при быстрой перемотке.
demo_fastforwardramptime <seconds> Сколько секунд требуется для полного ускорения.
demo_fastforwardfinalspeed <factor> Максимальная скорость быстрой перемотки.
demo_interpolateview <0/1> Enables/disabled view interpolation between demo ticks
demo_quitafterplayback <0/1> Выход из игры после завершения воспроизведения
demo_recordcommands <0/1> Записывать ли консольные команды во время записи в .dem файл
demo_pause [seconds] Пауза на несколько секунд
demo_resume Продолжение воспроизведения
demo_togglepause Пауза/воспроизведение
demo_gototick <tick> [relative] [pause] Переход к определённому тику в демке. Если второй параметр равен 1, то финальный тик будет равен сумме текущего и введенного. Если третий параметр равен 1, воспроизведение остановится после перехода.
demo_timescale <scale> Скорость воспроизведения, 1.0 - это норма.

Примечания

  • Вы не можете видеть себя в демках от первого лица (POV) при использовании Demo Smoother. Вы являетесь КАМЕРОЙ.
  • При нажатой кнопке Drive используйте правую кнопку мыши для изменения скорости демки.
  • Если ваше SourceTV-демо замирает на свободном положении, попробуйте использовать sv_client_predict 0 и tv_transmitall 1.


Другие полезные консольные команды
sv_cheats(en) <0/1> Требуется для следующих команд.
r_drawviewmodel <0/1> Скрыть модель оружия.
cl_drawhud <0/1> Скрыть интерфейс.
hud_saytext_time 0 Скрыть текст чата, по умолчанию = 12.
hideradar Hides radar location text.
cl_radaralpha 0 Hides new radar overviews (def. = 200).
drawradar Активировать радар.
thirdperson Активировать вид от третьего лица (firstperson вид от первого лица).
cam_command <0/1> Enables camera mode. (*Use this instead of "thirdperson")
cam_idealyaw <число> Поворот камеры вокруг модели по горизонтали. (0-360)
cam_idealpitch <число> Поворот камеры вокруг модели по вертикали (0-360)
cam_idealdist <число> Указать дистанцию от игрока до камеры (по умолчанию = 64)
Используйта команду "find",чтобы найти другие опции

камеры (+camyawleft, и т.д.) Пример: find cam

Bugs

This bug list was compiled by Lunchtimemama on January 24, 2005 and is potentially out of date. Bugs listed here may be fixed and other bugs may exist.

Unfinished Features:

  • The step-back and rewind buttons are disabled.
  • The fast-forward, go-to-beginning, and go-to-end buttons do not work.
  • Half of the "Edit" effects are disabled.

Major Bugs

  1. The "Edit" effect configuration windows are immobile and have broken minimize and close buttons.
  2. With "lock camera" engaged in the Smoother window and "Drive" engaged in the Playback window, the "Make Key" command will incorrectly use the "driven" camera's position instead of the "locked" camera's.
  3. With "lock camera" and "Drive" engaged, the "Show Original" and "Show Processed" commands will not animate the "locked" camera (though the "step-forward" and "step-back" commands (in the Smoother) will).
  4. With "lock camera" disengaged and "Drive" engaged, the blue-box camera indicator does not update position when the camera is "driven" around.
  5. Some demos suffer jumpiness similar to network lag, even those exported from the Smoother.
  6. "Jump to" in the Smoother does not seem to work properly.
  7. Some demos will not allow you to make a selection, so smoothing is not possible.
  8. Smoother does not work on srctv demos, cannot make a selection. - Fixed in srctv updates, smoother should work now. (#7 still applies, however. Random bug, can't make a selection)
  9. When you die, the camera locks to your corpse in "view attacker" mode.

Minor Bugs

  • The "New ->" list in the "Edit" window always opens upward, usually extending off-screen.
  • "Goto" is very slow when going to a tick in the past.
  • If the blue-box camera indicator suffers movement lag during playback, it does not "catch up" when the demo is paused.
  • When "Drive" is engaged, clicking and dragging in VGUI windows will move the camera, making it difficult to highlight text in a textfield(this can be overcome by using SHIFT+left/rightarrow).

Wish list

  1. dem_forcesrctv <0/1>
    • Requested functionality that dem_forcehltv 0/1 had.
    • Remove recoil. (true free look) Priority 1!
    • Ability to spectate 1st and 3rd person all other players. (wallhack block notwithstanding of course)
    • Remove muzzle flash and brass ejection. (not a huge deal, we can use sprites, but would be nice)
  2. Proper thirdperson mode.
    • Re-orient muzzle flash sprite to world model instead of first person view model.
  3. CVAR to override deathcam view.
    • When a player dies, any recammed smoother paths will snap back to the player when the ragdoll spawns and lock on viewing the attacker. A cvar to override that, without overriding the smoother path, would be handy.
  4. Timestamps on srctv demos.
    • Same as hltv had. Would be nice on POV demos, too, allowing for start/stop script recording.
  5. CVAR to disable flash bang effect on text/death notices.
    • Considering +/-90% of all demos are recorded for frag movie purposes, there needs to be a cvar so death notices are not affected by flash bangs. Even if it's a cheat cvar, available only during demo playback or something.
  6. OpenDML compliant avi files
    • Currently, Source's avi utility does not create open-dml 2.0 compliant files, meaning files over 2 gb are corrupt, and has a 4 gb cap.

See also

External links

Как записывать демо и превращать его в видео

Source SDK - Как записать демо или Мувик 30-60 фпс