-2

E.g. say I have any array of planes, that for texturing-specific purposes, I want to treat as a single 2d object. Like so:

example

How would I go about mapping this? (In production, the number of independent objects and their location in the world space is arbitrary.)

arkon
  • 2,209
  • 3
  • 27
  • 36

1 Answers1

1

One simple solution would be to adapt the technique of Texture Atlases to your problem.

Remember that an entire texture is covered by the UV coordinate range of [0,0],[1,1], and you may apply any subset of that range to a texture assignment. For the example provided in the question, each individual quad would cover a 0.25 x 0.25 subset of the original texture.

enter image description here

This of course can be scaled to an n^2 number of objects, where each object covers a subset size of 1/n x 1/n of the original texture. If utilizing the entire texture and/or keeping the subset textures square is not a requirement, then it can be scaled to any number of potential subset images.

ssell
  • 6,429
  • 2
  • 34
  • 49