0
$\begingroup$

Let's say I have a texture with 1x1 size, and then a surface with a relative 10x10 size (think floor). How do I make the texture repeat over the surface so that the texture is not stretched over the whole surface, but tiles itself perfectly in the original size 100 times? Using 2.71.

I should add that I will need to use this in SceneKit (iOS/OS X), and thus will export to COLLADA. It must work in SceneKit; not only inside Blender.

$\endgroup$
3
$\begingroup$

You could subdivide (W / Subdivide) in Edit Mode your face to 10x10 tiles and unwrap U. The texture is automatically repeated along the uv coordinates.

enter image description here

As pointed out by @someonewithpc this works also with a single plane:

enter image description here

Related: Unwanted patterns in texture from repeated, seamless image

$\endgroup$
  • $\begingroup$ You don't even need to subdivide it; Just go to the UV editor and scale it by 10 $\endgroup$ – someonewithpc Aug 18 '14 at 9:36
  • $\begingroup$ Will this work in SceneKit (ie outside Blender)? If not, I cannot use it. $\endgroup$ – Jonny Aug 18 '14 at 9:46
  • $\begingroup$ I just confirmed that this does not work outside Blender. You can export to COLLADA (.dae extension) and in OS X try to preview the .dae file. If the mesh has expected tiled textures it works, but in my case it has just one texture across the surface. The above method does probably not work with the COLLADA format, or how iOS/OS X handles the COLLADA format. I am using a plane for now, I will use cube meshes later. The point of tiling textures would be to not have to increase polygons just in order to create a large floor or similar. $\endgroup$ – Jonny Aug 19 '14 at 1:04
  • $\begingroup$ What do you know - I found out how to make your method work with SceneKit. Once again, it takes some editing inside Xcode to make the texture area "outside" be filled with repeated texture. In Xcode select the material, look under Properties→Diffuse, here you have to always select the texture anyway since Blender does not specify the texture file in a way that Xcode understands. The trick for the repeat is to open the extra options (tap the small triangle), then there are two options WrapS and WrapT, set those to Repeat and voila! $\endgroup$ – Jonny Aug 19 '14 at 2:01
3
$\begingroup$

I'll just make my own answer, stacker's answer is correct halfways but the last pieces of steps to make this work with COLLADA/Xcode(SceneKit/iOS/OSX) are:

  • Just export COLLADA using default options. Textures won't be specified in a compatible way anyway.

  • Put the .dae file in the .scnassets folder

  • Fire up Xcode, and select the .dae file.

  • Select the material pertaining to the texture that you want to repeat.

  • In Properties, select the image under Diffuse.

  • Also in Diffuse, tap the small triangle to open further options.

  • Set WrapS and WrapT to Repeat. (Edit: you could try Mirror as well in same cases)

Done. The texture should be tiled in the same way as it is tiled while looking in Blender (even in Blender's texture AND rendered mode).

enter image description here

$\endgroup$
  • 1
    $\begingroup$ I'm happy you found a solution, I don't have SceneKit. $\endgroup$ – stacker Aug 19 '14 at 6:21
  • $\begingroup$ tried this but no longer works in xcode 9 $\endgroup$ – jfisk Oct 20 '17 at 2:00

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.