Left 4 Dead 2

Left 4 Dead 2

183 ratings
Smoothing Tools
   
Award
Favorite
Favorited
Unfavorite
Game Content: Scripts, UI
File Size
Posted
Updated
93.162 KB
6 May, 2021 @ 9:21am
17 Jun, 2022 @ 12:23am
4 Change Notes ( view )

Subscribe to download
Smoothing Tools

Description
READ THE DESCRIPTION

Tools for creating smoothes in real-time
Based on Valve's Demo Smoother but better

Client Menu
Use these binds and commands, they're important!
bind i "show_menu menu" // I use key 'i' for client menu bind 0 "slot10" cl_menuduration -1

Names of sub-menus (you can bind them to use with command show_menu, for example: bind o "show_menu selected")
edit select selected options process add_key add_before add_after add_tick sub_tick interp_type kb_params process_origin process_angles

Description of Client Menu functions
  • Sub-menu Edit keys -> Add to end: add a key to end of keys list, you need to choose the tick for your key

  • Edit keys -> Remove from end: remove a key from end of keys list

  • Edit keys -> Remove all: removes all keys

  • Edit keys -> Manage selected -> Add key before: add a key before selected key (need to choose ticks too)

  • Edit keys -> Manage selected -> Add key after: add a key after selected key

  • Edit keys -> Manage selected -> Replace: replace selected key with your current origin and angles

  • Edit keys -> Manage selected -> Add ticks: add ticks to selected key

  • Edit keys -> Manage selected -> Subtract ticks: subtract ticks from selected key

  • Edit keys -> Manage selected -> Interpolation type: set interpolation type for selected key

  • Edit keys -> Manage selected -> Get ticks: get count of ticks of selected key

  • Edit keys -> Manage selected -> Make static: make selected key static, key won't be interpolated and its
    position will remain in defined parameters (origin, angles)

  • Edit keys -> Manage selected -> Make non-static: make selected key non-static

  • Edit keys -> Manage selected -> Kochanek-Bartels params: set Kochanek-Bartels params, see Kochanek-Bartels Parameters

  • Select keys -> Select previous: selects previous key

  • Select keys -> Select next: selects next key

  • Process -> Origin: process origin of all keys with choosed type of interpolation

  • Process -> Angles: process angles of all keys with choosed type of interpolation

  • Process -> Spline both: process origin with Catmull-Rom Spline and angles with simple spline (default, also it used in Valve's Demo Smoother)

  • Play smooth: play processed smooth

  • Stop smooth: stop playing smooth

  • Draw preview: draw preview of (non)processed smooth

  • Options -> Toggle preview: toggle drawing preview (on/off)

  • Options -> Toggle auto-process: toggle auto-processing for every created/removed/changed key

  • Options -> Uniform allocation: keys will be added evenly relative to the distance

Chat Commands
!s_load ARG1 - load a smooth from the file [ ARG1 - name of file ] !s_save ARG1 - save a smooth in the file [ ARG1 - name of file ] !s_add ARG1 - add a key to the end [ ARG1 - count of ticks ] !s_add_before ARG1 - add a key before selected key [ ARG1 - count of ticks ] !s_add_after ARG1 - add a key after selected key [ ARG1 - count of ticks ] !s_add_tick ARG1 - change count of ticks of selected key [ ARG1 - count of ticks (can be negative to subtract) ] !s_process_origin ARG1 - process origin [ ARG1 - interpolation type, see *Origin Interpolation Types* ] !s_process_angles ARG1 - process angles [ ARG1 - interpolation type, see *Angles Interpolation Types* ] !s_set_interp ARG1 - set interpolation type for selected key [ ARG1 - interpolation type, see *Origin Interpolation Types* ] !s_kb_params ARG1 ARG2 ARG3 - set Kochanek-Bartels spline parameters (if you don't want affect one or more parameters, pass n as parameter. Example: !s_kb_params n -0.66) [ ARG1 - tension, ARG2 - bias, ARG3 - continuity; see *Kochanek-Bartels Parameters* ] !s_play - play smooth !s_stop - stop playing smooth !s_remove - add a key from the end !s_remove_all - remove all keys !s_sremove - remove selected key !s_replace - replace selected key with your current origin and angles !s_tick - prints count of ticks of selected key !s_static - make selected key static !s_nonstatic - make selected key non-static !s_next - select next key !s_prev - select previous key !s_toggle_unialloc - toggle uniform allocation !s_toggle_process - toggle auto-processing !s_toggle_preview - toggle drawing preview !s_preview - draw preview

Origin Interpolation Types
Use values below when use the chat/console command
  • Linear = 0
  • Catmull-Rom Spline (just Spline, used as default) = 1
  • Kochanek-Bartels Spline = 2
  • Kochanek-Bartels Spline Normalize = 3
  • Hermite Spline = 4
  • Cubic Spline = 5
  • Cubic Spline Normalize = 6
  • BSpline = 7
  • Parabolic Spline = 8

Angles Interpolation Types
Use values below when use the chat/console command
  • Linear (Spherical Linear) = 0
  • Spline (Spherical Linear + Simple Spline) = 1

Kochanek-Bartels Parameters
There're 3 parameters: tension, bias and continuity
When a new key was created all parameters will be zero, each parameter from -1.0 to 1.0 inclusive

Wiki for more information[en.wikipedia.org]
Tension +1→ Tight −1→ Round Bias +1→ Post Shoot −1→ Pre shoot Continuity +1→ Inverted corners −1→ Box corners

Important Notes
  • 30 ticks = 1 second
  • Don't take into account amount of ticks when you add the first key, it doesn't matter
  • When you add/remove/change keys, you need to process the whole smooth again! You can use auto-process to facilitate work
  • You can use Cinematic Camera with Smoothing Tools (if you don't use noclip for some reason)
  • When you select keys you will be teleported to selected key if you have enabled noclip or Cinematic Camera
  • There're console commands (which are used by Client Menu). The syntax is: scripted_user_func COMMAND. COMMAND - is the name of command, chat commands can be used as console commands but no need to write an exclamation mark at the beginning and you need to write arguments separated by commas. Example: scripted_user_func s_add,101
  • You can see legenda of preview in screenshots

Full Compatibility
14 Comments
AUF 15 Sep, 2024 @ 12:47pm 
hlae with autism
manfried 20 Jul, 2024 @ 12:48am 
is it possible to make it playable in recorded demos?
pick mirage pls 30 Mar, 2024 @ 8:43am 
yo, bro this is rly cool. ty
bohdi 6 Sep, 2021 @ 8:39am 
Question: does it work on captured demos, or just "in real time" on a created solo/server?
Јамеѕ 17 Jun, 2021 @ 8:25pm 
So basically, this is how you can make your own cinematic camera movements!
Aurelie 6 Jun, 2021 @ 3:46am 
addon is not working, instruction is not clear enough, my iq is only 10, please delete
Blair 20 May, 2021 @ 8:23pm 
what does this do ?
Yoimiya 11 May, 2021 @ 9:29am 
Great work!
Sw1ft  [author] 11 May, 2021 @ 7:01am 
Description and attached video
Cc24Games 11 May, 2021 @ 6:58am 
Where's the instructions for dumbs?