• Tiling textures on meshes / quads?
    4 replies, posted
brickdemo2_cl_init brickdemo2_init I'm trying to figure out how to make a texture tile on a mesh i've made so that I can do something like have a single stud from a lego brick repeat over the entire top. I've tried doing "noclamp" in the lua material line as well as in the VTF file but it doesn't seem to do anything with quads. Sidenote: Yeah I know there's a lot of unused and really shitty code in there. This is a proof of concept test.
Check out $basetexture and $basetexturetransform
All your UVs seem to be 1, 1 in that code (rather than each face going from 0 to 1), but you just need to use bigger numbers. This is the only example I know of but it's a bit harder to read than your code gmod_resizecube/mesh.lua at master · Jvs34/gmod_resizecube · Git..
Believe me when I say this I have no fucking clue what I'm doing when it comes to vertexes so anything you see that seems wonky as fuck is probably accidental. I was doing vertexes before then swapped to quads because they were marginally easier for me to wrap my borderline disabled brain around but I think i'm going to have to swap back over to them. Also thanks for the URL.
update: I ended up just rewriting the whole thing so that it was entirely done using proper quads and not easyquads. For the tiling I made a single mesh piece for each stud since I never found a good way around the whole single mesh piece tiling.
Sorry, you need to Log In to post a reply to this thread.