Garry's Mod

Garry's Mod

Map Retexturizer
942 Comments
Gnilomord Nov 10 @ 9:00pm 
It's a pity, this way some maps could be slightly edited.
Xalalau  [author] Nov 10 @ 5:42pm 
No, they share the same RAM address.
Gnilomord Nov 10 @ 8:26am 
I haven't mastered the tool very well, but... Is it possible to change the materials of individual objects on a map? For example, there are two buildings on the map with identical textures. Is it possible to change the texture of just one building without affecting the other? I tried, and usually both ended up being edited.
Xalalau  [author] Nov 1 @ 4:32pm 
Nice
MrNiceGuy518 Nov 1 @ 1:05pm 
Brilliant, thanks! I'm revamping an old version of Spacebuild to allow people to terraform planets on spacebuild maps - I wanted a way to turn barren moons into lush green landscapes once they get far enough in the tech tree. Yours is the only tool I've ever seen that can actually retexture displacements. If it turns into something cool I might release it!
Xalalau  [author] Nov 1 @ 12:47pm 
Hey, ty.

Sure, just take a look at lua/mr/materials/map/displacements/**_displacements.lua

There are apply/restore functions you can easily call with data structures defined in

lua/mr/general/data/sh_data.lua

You'll be able to get the detected materials with MR.Displacements:GetDetected() and build my data format with MR.Data:CreateFromMaterial().

Just so you know, I actually scan the bsps to get these names, because traces can't retrieve all displacement material info.

The whole code is open to external addons and licensed under MIT, so feel free to use it as you wish and to call me back to take a look at your project hehe. :claugh:
MrNiceGuy518 Oct 30 @ 10:29pm 
Hey, I've got a quick question I was hoping you could answer - I'm working on a script for a personal project of mine, and I'd like to find a way to trigger a displacement material swap via LUA alone, are there any functions in your project I can call or data structures I can interface with to get that done without having to dissect the whole code base? Really impressive work, by the way.
Xalalau  [author] Oct 24 @ 11:56am 
Yep, but it's mainly the material swap issue as far as I know. Do you know other bugs? Disclaimer: models are not well supported because the addon is only meant to change map materials.
arlazian Oct 19 @ 12:15pm 
lil buggy
Leo Oct 8 @ 7:47pm 
MY WHOLE MAP TURNED INTO PURPLE AND BLACK 😭
Yuri Katrovich Aug 7 @ 1:32pm 
[Map Retexturizer] lua/mr/materials/cl_material.lua:149: bad argument #1 to 'Material' (string expected, got nil)
1. Material - [C]:-1
2. Apply - lua/mr/materials/cl_material.lua:149
3. func - lua/mr/materials/cl_material.lua:21
4. unknown - lua/includes/extensions/net.lua:34
Biovox Jul 27 @ 3:53pm 
this addon makes some textures wireframe,
Клоп Сергей Jun 23 @ 10:51am 
Decals not working, gray background all of them
Xalalau  [author] Jun 17 @ 9:00pm 
Yeah, this bug is related to swapping materials in a very specific way, and I was never able to fully figure it out.
pearple Jun 17 @ 1:15pm 
sometimes when i change a texture it gets stuck as that texture and i cant remove it
and the only thing
i have found that works is restarting my game : (
MR. MAYHAM Jun 8 @ 10:08am 
half life 3 here i come!
Xalalau  [author] Jun 3 @ 2:51pm 
I'd use the submaterial tool to copy and apply the skin on another model, then mapret would be able to also use it. I never fully implemented models suppport because it's not the real focus.
Kenshinius_YT Jun 2 @ 9:46am 
is there a way to copy a texture of a skin or scroll through the textures for them?
Wolfboy1020 May 7 @ 6:42pm 
how do I make certain map textures invisible?
Xalalau  [author] Apr 15 @ 12:18pm 
Oh, I see. It's ok, ty 4 letting me know.
Space Shuttle Scam Apr 14 @ 8:29pm 
also hey, I'm dumb as hell. it was a spawn menu addon. I fixed it by uninstalling it lol. I think it was one of those derma skins.
Xalalau  [author] Mar 28 @ 2:45pm 
Hello. Name of the map, please. Were you playing singleplayer or multiplayer?
Space Shuttle Scam Mar 27 @ 5:30pm 
for some reason the UI doesnt come up in the options menu when i click it. just gives me this error

[Map Retexturizer] lua/mr/materials/detail/sh_detail.lua:61: attempt to index a nil value
1. Get - lua/mr/materials/detail/sh_detail.lua:61
2. CreateFromMaterial - lua/mr/general/data/sh_data.lua:173
3. SetPreview - lua/mr/materials/cl_material_preview.lua:38
4. Create - lua/mr/gui/mpanel/cl_mpanel.lua:187
5. ControlPanelBuildFunction - lua/weapons/gmod_tool/stools/mr.lua:399
6. FillViaTable - gamemodes/sandbox/gamemode/spawnmenu/controlpanel.lua:126
7. ActivateTool - lua/includes/modules/spawnmenu.lua:116
8. DoClick - gamemodes/sandbox/gamemode/spawnmenu/toolpanel.lua:202
9. unknown - lua/vgui/dlabel.lua:254
Xalalau  [author] Mar 9 @ 9:18pm 
Lmao tell me more. Which map and material is causing you trouble? Do you think you have a bug? Why do you hate my dear mr missing? I barely see them tbh
I HATE MR MISSING
Xalalau  [author] Mar 5 @ 6:10pm 
You don't.
taco Mar 5 @ 5:10am 
where do i find the Materials! folder in file explorer :(
Xalalau  [author] Mar 4 @ 1:33pm 
I fixed the tool failing to warn users about how to change displacements.
Xalalau  [author] Mar 4 @ 1:08pm 
@khronos_inadvert
On which map? I can change gm_construct skybox with no issues.

@dell spencer TF2 (dispenser)
Nice

@Artanimatorman
Which materials?

You need to use the "Displacements" section to change gm_construct grass, but I noticed the tool is buggy - trying to apply the material on the displacement instead of giving the expected warning.

@Azure
Change the alpha channel. It's a bar near the material preview.
Azure Feb 28 @ 10:18pm 
If there's a way to make map textures render transparent / invisible it would be very appreciated to know about
Mephiles Dark Feb 17 @ 3:30pm 
also it doesnt let me change the grass and sand textures in construct
Mephiles Dark Feb 17 @ 3:28pm 
how do i use materials from the material tool? so its not just the map materials
crazy dave Feb 17 @ 12:13pm 
my brain is burning
thegreaterhan Jan 15 @ 8:03pm 
it just keeps telling me to change the skybox in the tool menu no matter what i do
Xalalau  [author] Dec 16, 2024 @ 8:32pm 
@rinasinaga Even after rewriting this tool I left the models support on a very basic state because it's supposed to only change map materials. Try the submaterial tool for this purpose.
Xalalau  [author] Dec 16, 2024 @ 8:28pm 
If I recall correctly it's a checkbox in the save dialog. Just click on the save button.
Felix_816YT Dec 16, 2024 @ 9:50am 
Does anyone know how to disable auto saving?? (at least the text that appears in the game chat)
Printer Dude Oct 13, 2024 @ 7:22am 
When You Duplicate a Retexturized Object Then For Some Reason Everything ut That Reverts To Its Normal Texutre. Why Does This Happen?
EtriusSierra Sep 4, 2024 @ 2:34am 
Been experimenting with recreating locations from games; don't know how well it'll work for my purposes. Nevertheless, this is a fantastic mod. :)
Serial Designation N Aug 17, 2024 @ 9:23am 
yay now i can make gm_flatsand grass instead
LilMissKurisu Aug 4, 2024 @ 12:48pm 
How do I make the textures stop glowing?
Pun bro Jul 29, 2024 @ 1:47pm 
cool
Xalalau  [author] Jul 28, 2024 @ 1:51pm 
Ok, I'll look into it. :steamthumbsup:
Pun bro Jul 27, 2024 @ 4:53pm 
I have the certain deathrun maps that appear to not allow those materials to appear in the list in Gm construct or anywhere else
Pun bro Jul 27, 2024 @ 4:44pm 
well there happens to be like this one https://steamcommunity.yuanyoumao.com/sharedfiles/filedetails/?id=2780906821&searchtext=ancient+memes ancient memes, It doesn't list those memes
Xalalau  [author] Jul 27, 2024 @ 8:17am 
Uhmm, I can consider it a bug. Can you give me the name of one of these maps?
Pun bro Jul 27, 2024 @ 5:02am 
okay, I was just sad that some materials from certain maps aren't in the list and I wanted to go crazy with certain images that happen to be meme stuff and stuff that i just want to keep and save and put all over different maps and not say " material unknown"
Pun bro Jul 27, 2024 @ 5:00am 
oh, okay, new features won't be done?
Xalalau  [author] Jul 26, 2024 @ 6:07pm 
Hi. I stopped adding new features a while ago, I just want this addon working as it should.
Pun bro Jul 26, 2024 @ 9:40am 
could you make a feature in this addon where you can save packs of files of materials from Different maps?