Hey all. Wondering if you guys could help answer a question about UV mapping / Texture tiling in maya.
Is it possible to tile a portion of a texture onto a UV map? Say I use an image that is 64x64, but that mage is comprised of 4 32x32 tiling textures (all together in the one 64x64 image)
Could I tell maya to only use one 32x32 section of the whole 64x64 image and TILE that section across an entire face?
Any help is much appreciated.
Thanks!
~aaron
Replies
tiling uvs (how often you want to tile that your texture onto the surface) > frac > multiply * 0,5/0,5 > add 0,5/0,5 (to start tiling at 0,5/0,5 > UVs of your Texture
Probably better to either do it as a strip (make the texture tile fully in one axis), then you don't have to tile the geometry.
The best way would be to have it as a separate texture. But then that's an extra batch/draw call. So it really depends on whether your engine can happily push lots of polys or whether it doesn't mind lots of individual textures.
There may also be hacky methods of using various hyperShade nodes to recreate what Neox described, but I've never tried so can't say for sure.
Basically you'd have to scale the uv coordinates in the shader and bias them to determine which 'quadrant' of the texture to use.
Not very difficult if you've done it (modulo to get the U bias and integer division to get the V bias), but better to rethink what you are doing because something like this is unnecessary unless done on a very large scale.
http://boards.polycount.net/showthread.php?t=60555
Good luck.
Yeah, again, this question is in regards to implementing a 3D environment in the game engine "Unity" (which is now available for the PC btw!)
Specifically, the way it works on an iphone is such that game performance decreases dramatically when you use too many "draw calls". Essentially, to get the best performance, you will want as much of the geometry to technically be one huge object with one single texture.
I'm still not exactly sure why this is, but this is what is recommended. So, with the art style I am using, I could probably fit every single texture on a single 512x512 map - but only if I could tile portions of it.
There may be a way to do this on the Unity side of things, and that's what I'll look into next.
Thanks!
PS - kodde: Your recommendation would definitely work, but unfortunately polycount is a huge concern on the iphone, so tiling geometry isn't an option in this case.
I can't add geometry unfortunately, as its for an iphone game.
Open hypershade and get to your place2dTexture node. (click the little arrowinabox where you assign a map to the channel, if it takes you to the texture map tab click the arrowinabox under the uv coordinates rollout)
Then you can simply alter the "repeat UV" fields to whatever percentage of the texture you need repeated.
then how you expect partial tiling to work at all?
From what I saw iphones'gpu currently exposes OpenGL ES 1.x. ie no programmable shaders, so no advanced control for that sort of operation...
or do you do software rendering?