External Visibility Check for CS2 via .vpk Map Parsing (Python + C++ Module)
A tool to check visibility between points in CS2 without memory hacking, using .vpk/.vphys map parsing and optimized BVH raycasting.
- Pure external approach: No injection or
m_bSpottedByMaskdependency. - Map file parsing: Converts
.vphys→.optfor fast visibility checks. - Python module:
vischeck.pyd(C++ + pybind11) for easy integration. - Performance: ~1ms per ray (CPU-dependent).
-
VPhysToOpt/.vphys→.optconverter (C++20).- Strips junk data, keeping only triangles and vertices.
-
VisCheck/- Python module (
vischeck_module.cpp+ pybind11). - Möller–Trumbore ray-triangle intersection.
- Python module (
- Open
VPhysToOpt.slnin Visual Studio (2022 recommended). - Build as Release x64 (ISO C++20).
- Open
vischeck_module.cppin Visual Studio. - Configure project properties:
- C/C++ → General → Additional Include Directories:
C:\Users\USERNAME\AppData\Local\Programs\Python\PythonXX\include; C:\Users\USERNAME\AppData\Local\Programs\Python\PythonXX\Lib\site-packages\pybind11\include - Linker → General → Additional Library Directories:
C:\Users\USERNAME\AppData\Local\Programs\Python\PythonXX\libs
- C/C++ → General → Additional Include Directories:
- Build as Release x64.
import vischeck
checker = vischeck.VisCheck("de_mirage.opt") # Load map
is_visible = checker.is_visible((x1, y1, z1), (x2, y2, z2)) # Returns bool- No pre-built binaries provided (compile manually).
- VAC-safe if used without memory hacking.
- Map files (
.vphys) must be extracted via Source 2 Viewer.
