Garry's Mod

Garry's Mod

62 ratings
VisTrace - Raytracing Library
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Server content
Addon Tags: Build, Realism
File Size
Posted
Updated
6.581 MB
28 Jun, 2021 @ 8:03pm
16 Dec, 2022 @ 1:46pm
27 Change Notes ( view )

Subscribe to download
VisTrace - Raytracing Library

In 2 collections by Derpius
TAS Collection
92 items
TAS Build Server
69 items
Description



GitHub: https://github.com/Derpius/VisTrace
Discord: https://discord.gg/N4NxezCgFQ

Overview
VisTrace is a binary module that allows tracing entity visual meshes at speeds at or faster than traditional trace methods, which it achieves with bounding volume hierarchies[en.wikipedia.org] using the C++ BVH library[github.com] by madmann91 on GitHub.

What This Addon Does
While the binary module does most of the work, the addon handles versioning, provides integration with other addons like StarfallEx, and various quality of life features like the BSDF material toolgun.

The binary module allows high performance vismesh intersection with almost as much ease as using traditional trace functions, as well as providing texture and material information and various helper functions.

What This Addon Doesn't Do
This doesn't automatically give you a fully fledged ray/path tracer (although it makes it very easy), just offloads the performance intensive calculations to C++.

Who This Addon is For
If you've ever written a tracer in GMod, made a project requiring precise intersections with entity geometry (for instance a ranged weapon), or if you've wanted to get the UV coordinates at a hit point for whatever reason (for instance, a paintbrush, where you could set the material of an entity to a render target, and use the hit UVs to paint onto the texture at the position the player is looking), then this addon is for you.

Installation
Get the latest release build of the binary module from my GitHub repo[github.com], or clone and compile from source (if you don't know how to do this then you probably don't need to compile yourself), then place the dll in garrysmod/lua/bin.
As for the addon, you can either use the binary module by itself (no integration with other addons, and you'll need to use CS Lua to load and interface with the module), or you can subscribe to the addon here / download from the repo and mount, which handles versioning automatically, and adds compatibility with addons like StarfallEx.

Usage
Documentation for the GLua API doesn't currently exist but will be added to the repo's wiki (however the Starfall API mirrors it), as for the Starfall library, documentation is generated automatically and is available in the SF Helper.

tags: ray tracing, raytracing, path tracing, pathtracing, binary module, rtx, rendering
Popular Discussions View All (1)
2
18 May @ 8:46pm
For people who are looking for a easy real time ray trace solution for gmod
Akimato
141 Comments
HUSEINOO19 9 Jul @ 11:09am 
is there any guide on youtube how to put this addon in the game?????
Derpius  [author] 5 Jul @ 1:43am 
client side binary module
Nuka-Nuke Launcher 2 Jul @ 2:23pm 
is this client side or server side?
Derpius  [author] 28 May @ 1:07pm 
The shaders are still running on old DirectX without access to hardware RT cores
Your best bet for _reasonable_ quality real time GI would be RTX Remix

Ofc with real-time rendering you lose a lot of the visual quality, and with that solution no or limited control over the rendering pipeline. This library is for developers to write offline ray and path tracers in GMod for prototyping etc.
bluecoolman280 26 May @ 11:25am 
garry's mod now has custom shader support, so maybe just maybe fast GI would be possible now
Ktotoshniy 22 Jan @ 1:00pm 
Really cool but it can't parse quite a lot of maps specifically large ones and just returns the sky.
bluecoolman280 2 Dec, 2024 @ 10:01pm 
oh, nice. too bad i dont know how to code (the only kind of ""coding"" i know is scratch, but i dont think that one really counts as real coding.) so maybe sometime in the future someone could try making a post-processing GI addon for gmod
Derpius  [author] 2 Dec, 2024 @ 12:44pm 
> if there were some way to make something like fast GI in gmod, but as a post-processing effect that would be cool

Yes, you could implement one of the many forms of SSGI as a binary module or similar. That's well outside the scope of this addon though
bluecoolman280 1 Dec, 2024 @ 10:55pm 
(ik i can just use reshade, but that has problems with looking glitchy in a map like gm_construct despite enabling something in add-ons in reshade)
bluecoolman280 1 Dec, 2024 @ 10:52pm 
if there were some way to make something like fast GI in gmod, but as a post-processing effect that would be cool