So i have my own server on gmod, i have my 3d2d picture on the wall, i have resources etc.
i did everything right resources are in server side and the code for 3d3d is right. materials are right too. But when i join my server i see error texture instead of the real one, what should i do?
GMOD has a limit on file size for materials, yes. And it really isnt much..what size does your material file has?
6000x4000
WHAT?!?!? WHY?! Like, what??? for what? What material needs a resolution of 6k by 4k??? That is way too much jesus christ. That number literally just shocked me omg..
Sweet jesus
Yeah reduce it and try making it a power of 2 instead, also what format are you using for the image? PNG, VTF, something else?
Can it make the picture purple nd black?
when a file is too huge it will be a missing texture, yes. make it 1920x1080...most common resolution, fits all other resolution as long as its in 16:9 ratio which is the usual screen, WAY less file size...whats the file size with that resolution even? must be enormous
and the file size is 719.28 KBs
....ok thats less than i expected. but 6000x4000. just...why? For who? People with a 6 or 4k screen? These huge materials are not gonna work. textures in gmod are usually really tiny
Thanks, seems like you are angry xdxdx
if the material is purple & black it means you don't have the material on your client, make sure you've downloaded it.
no im not angry. the huuuuge resolution just shocked me. literally
so i guess my players do not download the file, should i post it in the workshop, or is there any solution?
Plz help me
Holy fuck.
Make a workshop addon with the materials/resources of your addon. Just call it {addon} content or something. To let the material show the Client needs it downloaded.
what are you doing to make players download it?
just making resources lua
they give addons out for free that the real developers put on gmodstore. for money..dont think that this side is ledgit
your path to the material is wrong...you just have to start from the main material file, DONT include the material folder. if theres a file inside the material folder directly, just name the file.
Actually, resource.AddFile starts from the garrysmod/ directory so you should include the materials folder..
resource.AddFile("materials/my_mat_folder/icon.png")
thx
Test it in singleplayer if the material is loading properly, and also you should cache the material into a variable instead of calling Material every frame
In
it works in singleplayer.
You don't need to include materials in your path for the Material function.
Everything I've told you to do is also said on the wiki..
Material
resource.AddFile
Please read both of them
I guess i did how u told me to do, but it is still error.
my resources lua
resource.AddFile("materials/collusionswrp/neo_pidrila.png")
clientside
local wave = Material('collusionswrp/neo_pidrila.png')
hook.Add('PostDrawOpaqueRenderables', '3d2d', function ( )
cam.Start3D2D( Vector( -7800, -11778.1875, 500 ), Angle( 0, -0, 90), 0.1 )
surface.SetDrawColor(255,255,255,255)
surface.SetMaterial( wave )
surface.DrawTexturedRect( 0,0,500,500 )
cam.End3D2D()
end )
Any help?
Sorry, you need to Log In to post a reply to this thread.