{"id":28390980,"url":"https://github.com/derpius/vistrace","last_synced_at":"2025-10-24T11:55:34.429Z","repository":{"id":37486252,"uuid":"374252878","full_name":"Derpius/VisTrace","owner":"Derpius","description":"Garry's Mod binary module for tracing meshes at high speed on the CPU (and much more)","archived":false,"fork":false,"pushed_at":"2024-11-09T22:49:17.000Z","size":81132,"stargazers_count":27,"open_issues_count":9,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-31T17:55:20.525Z","etag":null,"topics":["binary-module","bvh","cpp","garrysmod","garrysmod-module","lua","raytracing","vistrace"],"latest_commit_sha":null,"homepage":"https://derpius.github.io/VisTrace","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Derpius.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-06-06T02:41:51.000Z","updated_at":"2025-01-26T11:25:06.000Z","dependencies_parsed_at":"2024-11-09T23:23:17.781Z","dependency_job_id":"5ee0782e-650a-46b9-ade0-8d80c51d2ba2","html_url":"https://github.com/Derpius/VisTrace","commit_stats":null,"previous_names":[],"tags_count":35,"template":false,"template_full_name":null,"purl":"pkg:github/Derpius/VisTrace","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Derpius%2FVisTrace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Derpius%2FVisTrace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Derpius%2FVisTrace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Derpius%2FVisTrace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Derpius","download_url":"https://codeload.github.com/Derpius/VisTrace/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Derpius%2FVisTrace/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261909146,"owners_count":23228753,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["binary-module","bvh","cpp","garrysmod","garrysmod-module","lua","raytracing","vistrace"],"created_at":"2025-05-31T07:30:35.274Z","updated_at":"2025-10-24T11:55:29.380Z","avatar_url":"https://github.com/Derpius.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\"\u003e\n\t\u003ca href=\"https://steamcommunity.com/sharedfiles/filedetails/?id=2531198548\" style=\"text-decoration: none;\"\u003e\n\t\t\u003cimg alt=\"Banner\" src=\"https://github.com/Derpius/VisTrace/blob/branding/banner.png?raw=true\" /\u003e\n\t\u003c/a\u003e\u003cbr\u003e\n\t\u003ca href=\"https://github.com/Derpius/VisTrace/actions/workflows/build.yml\" style=\"text-decoration: none;\"\u003e\n\t\t\u003cimg alt=\"GitHub Workflow Status\" src=\"https://img.shields.io/github/actions/workflow/status/Derpius/VisTrace/build.yml?branch=master\u0026logo=c%2B%2B\u0026style=for-the-badge\" /\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://github.com/Derpius/VisTrace/issues\" style=\"text-decoration: none;\"\u003e\n\t\t\u003cimg alt=\"GitHub Open Issues\" src=\"https://img.shields.io/github/issues/Derpius/VisTrace?logo=github\u0026style=for-the-badge\" /\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://discord.gg/N4NxezCgFQ\" style=\"text-decoration: none;\"\u003e\n\t\t\u003cimg alt=\"Discord\" src=\"https://img.shields.io/discord/1020968021289873418?color=%237289DA\u0026label=Discord\u0026logo=discord\u0026logoColor=white\u0026style=for-the-badge\" /\u003e\n\t\u003c/a\u003e\u003cbr\u003e\n\t\u003ca href=\"https://github.com/Derpius/VisTrace/releases/latest\" style=\"text-decoration: none;\"\u003e\n\t\t\u003cimg alt=\"GitHub Release Downloads\" src=\"https://img.shields.io/github/downloads/Derpius/VisTrace/total?logo=github\u0026style=for-the-badge\"\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://steamcommunity.com/sharedfiles/filedetails/?id=2531198548\" style=\"text-decoration: none;\"\u003e\n\t\t\u003cimg alt=\"Steam Workshop Subscribers\" src=\"https://img.shields.io/steam/subscriptions/2531198548?label=SUBSCRIBERS\u0026logo=steam\u0026style=for-the-badge\" /\u003e\n\t\u003c/a\u003e\n\u003c/p\u003e\n\n---\n\nVisTrace allows tracing visual meshes in Garry's Mod at high speeds on the CPU using https://github.com/madmann91/bvh, allowing for far higher fidelity scenes in Lua tracers without the massive performance cost of Lua mesh intersection.  \n\n## Installation\nSimply get the latest binary for your architecture from releases, and place it into `garrysmod/lua/bin`, then `require(\"VisTrace-vX.X\")` in GLua.  \nFor a more user friendly experience, get the [Steam Workshop addon](https://steamcommunity.com/sharedfiles/filedetails/?id=2531198548), which will automatically require the applicable version of the module, and provide integration with other addons (currently [StarfallEx](https://github.com/thegrb93/StarfallEx) ~~and [Expression 2](https://github.com/wiremod/wire)~~ https://github.com/Derpius/VisTrace/issues/22).  \n\n## Compiling\nWhile it's recommended to just download the latest release binary, if you want to test WIP features before a full release, or you want to help develop the module, then you'll need to set up your toolchain to compile VisTrace and its dependencies.  \n\n### Prerequesits\n* CMake 3.20 or newer\n* Ninja\n* clang - Clang with MSVC backend to use OpenMP while being ABI compatible with source\n\n### First time setup\n1. Clone the repository with the `--recursive` flag to init all submodules\n2. Open the cloned folder in your editor of choice\n3. Select a preset to compile (`relwithsymbols` for debugging as building with full debug mode breaks ABI compatibility with Source)\n4. Compile (compiled dll can be found in `out/build/{presetname}`)\n\n## Extensions\nVisTrace versions v0.10.0 and newer support user made extensions that can use and extend VisTrace's objects via interfaces in `include`.  \nA quick start repository template is available [here](https://github.com/Derpius/VisTraceExtension)\n\nAdditionally, an svg badge is provided to include in your readmes to show that your addon/binary module is VisTrace compatible:  \n| Markdown | Preview |\n|----------|---------|\n| `[![VisTrace EXTENSION](https://github.com/Derpius/VisTrace/blob/branding/extension.svg?raw=true)](https://github.com/Derpius/VisTrace)` | [![VisTrace EXTENSION](https://github.com/Derpius/VisTrace/blob/branding/extension.svg?raw=true)](https://github.com/Derpius/VisTrace) |\n\n## Showcase\nIf you'd like to submit any images/videos showcasing your use of VisTrace, please submit a PR/Issue on the [branding branch](https://github.com/Derpius/VisTrace/tree/branding).  \n\nPlease note that any content submitted may be used on VisTrace's GitHub, and Workshop pages, as well as the website.  \nSee the readme on the branding branch for the naming convention.  \n\n## Usage\nMOVING TO WIKI\n\n## Example Code\n~~For more detailed examples, see the [Examples](https://github.com/Derpius/VisTrace/tree/master/Examples) folder.~~  \nWill be moving to a dedicated branch\n\nThis will load the module, build the acceleration structure from all `prop_physics` entities (and the world), get an entity to use as a hit marker, and traverse the scene each frame placing the hit marker at the trace hit position if we hit:\n```lua\n-- Instead of manually checking realm/vistrace version, and requiring by hand\n-- You could use the VisTraceInit hook which will be called by the binary if\n-- everything loaded OK (this however needs the VisTrace addon to be installed)\nif SERVER then error(\"VisTrace can only be used on the client!\") end\nrequire(\"VisTrace-vX.X\") -- Put current version here\nlocal accel = vistrace.CreateAccel(ents.FindByClass(\"prop_physics\")--[[, false]]) -- Pass false here to disable tracing world (useful if you just want to interact with entities)\n\nlocal plr = LocalPlayer()\n\n-- Change the entity ID here to one you want to use as a hit marker\n-- hard coded here for simplicity of the example,\n-- and assuming no addons that change this are mounted,\n-- will be the first prop created on flatgrass in singleplayer\nlocal hitMarker = Entity(68) \n\n\nhook.Add(\"Think\", \"vistraceTest\", function()\n\tlocal hitData = accel:Traverse(plr:EyePos(), plr:GetAimVector())\n\tif hitData then\n\t\thitMarker:SetPos(hitData:Pos())\n\tend\nend)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderpius%2Fvistrace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fderpius%2Fvistrace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fderpius%2Fvistrace/lists"}