Garry's Mod

Garry's Mod

105 ratings
SprayMesh Extended
   
Award
Favorite
Favorited
Unfavorite
Content Type: Addon
Addon Type: Effects
Addon Tags: Fun, Realism
File Size
Posted
Updated
92.735 KB
4 Nov, 2023 @ 1:26pm
19 Apr @ 10:38pm
8 Change Notes ( view )

Subscribe to download
SprayMesh Extended

Description
This is my modified version of the addon "SprayMesh" with various new features, bug fixes and optimizations.

If you are not familiar with SprayMesh: It is a replacement/improvement to the default Garry's Mod player sprays, allowing players to set image URLs as their spray. The sprays use map-conforming meshes to allow them to wrap around surfaces.

SprayMesh Extended is designed to be a replacement to SprayMesh--using both will cause issues!

The menu can be accessed either by typing /spraymesh, typing "spraymesh_settings" in console, or by using the Sandbox context (C) menu.

Improvements & changes:
  • A built-in menu for SprayMesh Extended:
    • Comes with a settings panel to adjust some SprayMesh Extended settings.
    • Comes with a spray manager to save, name & search sprays.
    • Has a pop-up menu to view all active sprays on the server.
    • Has a pop-up menu which contains a guide to using SprayMesh Extended, as well as viewing what spray types (like image & video extensions) are whitelisted.
  • Sprays can be rotated on floors and ceilings.
  • Sprays are now easier to see in dark areas.
  • Sprays render in the order they're sprayed (so that players can spray over each others' sprays).
  • Sprays will be kept when a player re-joins the server (however, sprays will still reset upon a server shutdown/restart).
  • A cleaner codebase, and optimized code a bit.
  • Config (and Lua hooks) for developers and server owners to customize SprayMesh Extended to their liking.
  • Support for CatBox & LitterBox natively included.
  • Removed YouTube video spray support.

The addon's source code can be found on GitHub: https://github.com/chev2/gmod-addons

For this addon to work, you most likely need to use the x86-64 beta branch of Garry's Mod, as the sprays internally use web rendering which usually work better (or possibly only work) on that beta branch.

Credits

Shoutout to SprayMesh's original author Bletotum for making such an awesome addon: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=394091909

Additionally, shoutout to Sony for making Spray Manager V2, which inspired SprayMesh Extended's own manager: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=1805554541

Configuration
For server owners & developers looking to change the configuration of SprayMesh Extended, such as the default fallback spray, spray sizes, whitelisted domains, etc. check out this Lua file:
lua/spraymesh/sh_config.lua
Ideally you shouldn't have to edit any other Lua file to edit SprayMesh's functionality--if there's something you'd like to be customizable, leave a suggestion.

Documentation
If you are a server owner/developer looking to extend SprayMesh's functionality, you can find some basic documentation on it here: https://github.com/chev2/gmod-addons/wiki/SprayMesh-Extended
Popular Discussions View All (2)
1
7 Jan @ 6:51am
Can you do please that you can place spray on props?
Foxxie
1
12 Jan, 2024 @ 11:14am
Files?
gopro
62 Comments
Chev  [author] 17 Jul @ 3:32pm 
I haven't tested that, but I don't think so.
birdLover8968 16 Jul @ 3:25pm 
Do they stay in saves?
Zepp Thunderbolt 26 Jun @ 11:40am 
I'm currently using my own domain name running a Spring boot webapp, I'm pretty much just testing images put into the static directory.

(this makes them accessible from the base path followed by the actual file, like a public folder of any real website)

It seems to do this for such cases.
Chev  [author] 25 Jun @ 7:46pm 
I've noticed in my testing that Discord in particular seems to handle image URLs in a peculiar way, and so they usually won't load. I've been meaning to get it to work, but it's been a low priority. Try using test images on some other websites and see if they work.
Zepp Thunderbolt 25 Jun @ 3:08pm 
I have a similar issue to the comments below.

I've customized a whitelist for spraymesh, the custom domain URL is registered as valid & debug seems to be successful. However seemingly it will not display. It pops up as "loading" for a second for me as well & then is invisible.
The_Music_Man 10 Jun @ 9:53pm 
discord doesn't work
frog 5 Jun @ 3:37am 
unfortunately, that did not help, I assume it's a network issue, since I am in Russia and we have a lot of sites blocked here :steamsad:
Chev  [author] 24 May @ 11:40pm 
Switch to the 64-bit beta branch of Garry's Mod if you aren't already on it
frog 23 May @ 10:15am 
for me when I spray it shows black square with "Loading spray" for a millisecond, but when it disappears there's no spray, just empty surface
in both multi and singleplayer :steamsad:
Chev  [author] 1 May @ 1:55pm 
If you're adding this addon to a server via the Steam workshop, then there won't be a config in the lua/ folder. It's part of the addon .gma. What I recommend doing in that case is creating your own custom Lua file (make sure it runs on both client AND server) and set the variables that way. The documentation there is admittedly a bit confusing since I have to account for both people who add this addon to their server via Steam workshop as well as those who install the addon manually and edit the config file directly.

In the future to make this process more simple, I'm thinking of adding an admin menu for Sandbox gamemodes so that server admins/owners can change the config without having to know Lua coding.

You can find the config on the GitHub repo: https://github.com/chev2/gmod-addons/blob/main/addons/spraymesh_extended/lua/spraymesh/sh_config.lua