Garry's Mod

Garry's Mod

48 ratings
VisTrace - Raytracing Library
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: ServerContent
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
90 items
TAS Build Server
68 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
125 Comments
Derpius  [author] 27 Feb @ 11:35am 
This is the finished* product. It's a library for writing high fidelity ray tracers in Lua.

*There are features that were never added and an unfixed bug, but the current set of features far exceeds the original scope for the project
Akimato 27 Feb @ 4:22am 
i have came back and im raging over code and i really want the finished product
wildwyatt87 11 Feb @ 2:06pm 
is this like blender but its code was now inside source engine?
Derpius  [author] 2 Feb @ 11:29am 
@alastis https://derpius.github.io/VisTrace/vistracing-in-one-weekend
This is a library for writing ray tracers in Lua
alastis 1 Feb @ 12:48am 
how to use it?
i did it all what it says in INSTALL text but nothing
็็็็็็็็็็ 23 Dec, 2023 @ 2:20am 
this is a good rtx mode !
:steamthumbsup:
jona8hernandez 19 Nov, 2023 @ 9:28pm 
A
Derpius  [author] 30 Aug, 2023 @ 11:02am 
> is this just like softlamps to create imaging and crap

I have no idea what "softlamps" is. I think the description covers what the addon is (although it's a bit verbose)

> is there a wiki?

StarfallEx API is fully documented (open the SFHelper in-game) and the GLua API mirrors is. There's also https://derpius.github.io/VisTrace/vistracing-in-one-weekend which uses the GLua API
Akimato 30 Aug, 2023 @ 5:10am 
is this just like softlamps to create imaging and crap
ByakuyaKuchiki 30 Aug, 2023 @ 5:01am 
is there a wiki?