Particular & DOF - eirisocherry/csgo-editing GitHub Wiki
Extract CSGO sprites (particle images)
- Download GCFScape (csgo assets extractor): https://gamebanana.com/tools/26
- Import
..\Counter-Strike Global Offensive\csgo\pak01_dir.vpkto GCFScape - Extract
materials\particlefolder - Install VTF Reader: https://gamebanana.com/tools/5537
- View <particle_name>.vtf files via VTF Reader
- Save particles you like as .tga

Split sprite sheets to image sequence
- Install Sprite-O-Matic (AE script that splits sprite sheets): https://aescripts.com/sprite-o-matic/
Direct link: https://drive.google.com/file/d/1u77DEeKRT-obfFF7FNRRPKxp6NqiSx8d/view?usp=drive_link - [Optional] Sprite sheet viewer: https://jangafx.com/software/gametextureviewer
Particular
>>> Custom sprites
Particle > Particle Type: [Textured Polygon] [Source] (Source because Effects and Masks will be used for z-depth generation later)
Particle > Texture > Layer: [Sprite Texture]
1. 'Sprite comp' must have 'Rasterize' disabled (every time you specify the texture, particular enables rasterize, but you must keep it disabled)
2. Inside the 'sprite comp' all layers must be precomposed (must have default transform)
Particle > Texture > Time Sampling: [<unique> or <particle_animation_start> - <particle_type>]
<unique>
Current Time: particle is animated, its appearance depends on what sprite comp shows right now in the main composition, once sprite comp is over particle disappears
Current Time - Freeze: particle is a static image, its appearance depends on what sprite comp shows right now in the main composition, once sprite comp is over particles stop being emitted
<particle_animation_start>
Start at Birth: particle animation will start from the beginning in the sprite comp
Random: particle animation will start from a random frame in the sprite comp
Split Clip: particle is a random clip in the sprite comp (`Numbers of Clips` splits the sprite comp into selected uniform pieces)
<particle_type>
Still frame: particle is a static image
Play once: particle is animated, when animation reaches the end of a `sprite comp / clip` particle disappears
Loop: particle is animated, when animation reaches the end of a `sprite comp / clip` it plays again from the beginning of the `sprite comp / clip`
Stretch: particle is animated, animation length will be stretched to match the particle life span (`Subframe Sampling` if checked generates subframes to smooth the animation if it lacks of frames)
Freeze: particle is a static image
>>> Perfect mask with z-depth
To perfectly mask the particles: set z-buffer and its farthest point distance
The farthest depth point value (Z at Black or Z at White, depends on your depth):
CSGO (if you use my cfgs): 4096
CS2 (if you use my cfgs): not gonna work properly, because cs2 depth is logarithmic (particular wants linear depth)
COD4: 4080
EXR Depth: set the same value you set in EXtractoR

>>> Generate z-depth for particles
- Duplicate particles layer and rename it to
<name> depthfor convenience - Particle > Particle Type: [Textured Polygon] [Effects & Masks]
Apply whitefilleffect to the sprite comp, then addlevelsand adjust alpha channel so there is no semi-transparent pixels - Particle > Blend Mode: [Lighten]
Add blackSolid Compositeeffect to the particular layer, so there is no transparency, only black and white depth - Mask the particles with a game z-depth (view "Perfect mask with z-depth" category)
Then setFar Vanishto the game z-depth farthest point
Far Start Fade: 0
Near Start Fade: 1
Near Vanish: 0
Near and Far curves: Linear

Congrats, particles depth is finished
Depth of Field
Frischluft (fl depth of field, best dof plugin): https://www.frischluft.com/order/index.php
DOF Pro (looks a bit better than fl dof, but super slow): https://richardrosenman.com/shop/dof-pro-ae/
Bokeh (the most beautiful, but z-depth mask is ugly): https://aescripts.com/crossphere-bokeh/
>>> FL Depth of Field
- Duplicate the depth and name it something like
dof depth - Add
levelseffect and normalize the depth, so it looks super contrast - On the latest
levelseffect switchClip To Output BlackandClip To Output WhitetoOnto clip all depth brightness values outside 0-1 range
3.1. If near color on the z-depth is black, then addinverteffect, becausefl depth of fieldexpects the depth with near white color, otherwise you will get ugly edges around blur
Before normalizing:

After normalizing:

- Make an adjustment layer, apply
fl depth of fieldSetdepth dofas depth layer input Switch [Source] to [Effects & Masks]
Select a focal point with a cursor
Once you've selected the focal point, never drag this white circle, otherwise your ae may crash
