# Subdivide an image over several planes

**URL:** <https://forums.unrealengine.com/t/subdivide-an-image-over-several-planes/486061>\
**Category:** Rendering\
**Tags:** uv, unreal-engine, Rendering, question\
**Created:** [July 11, 2021, 2:56pm UTC](https://forums.unrealengine.com/t/subdivide-an-image-over-several-planes/486061 "2021-07-11T14:56:45Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![MichaelWion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MichaelWion](https://forums.unrealengine.com/u/MichaelWion)\
**Post date:** [July 11, 2021, 2:56pm UTC](https://forums.unrealengine.com/t/subdivide-an-image-over-several-planes/486061/1 "2021-07-11T14:56:45Z")

</div>

I have an actor which procedurally generates a floor of plane meshes.  
Depending on how many floor tiles are created, I would like to use a material instance which takes in a texture and “stretches” it out over the floor, so that each floor tile represents a piece of the image… Or I guess more accurately, I need a material which takes in a texture, numRows/numColumns, and an XY tile index, and “extracts” that cell from the image.

There is some kind of UV magic that I need for this, but after reading up and messing around for an entire day, I just couldn’t figure out how to get everything just right. It was either the wrong scale, the wrong tile, or just a complete mess of garbage. Could someone please guide me in the right direction?

---

<div class="post-metadata">

**Author:** ![Everynone](https://d1ap1mz92jnks1.cloudfront.net/user_avatar/forums.unrealengine.com/everynone/32/1135017_2.png) [@Everynone](https://forums.unrealengine.com/u/Everynone)\
**Post date:** [July 11, 2021, 3:11pm UTC](https://forums.unrealengine.com/t/subdivide-an-image-over-several-planes/486061/2 "2021-07-11T15:11:03Z")

</div>

How close is this to what you need:

> [@can blueprints be used to chop an image into pieces?](https://forums.unrealengine.com/t/can-blueprints-be-used-to-chop-an-image-into-pieces/104930/2):
>
> See if you can adapt the following to your needs: A material for the actors. It takes 3 scalar values - U, V and Size. UV is going to shift the coordinate and Size dictates the number of pieces. A \*PuzzlePiece \*actor that has a simple cube (with Z scaled down to make it flat), a Dynamic Material Instance is going to be fed data when the actor is spawned - the U, V and Size are variables ExposedOnSpawn The \*LevelBlueprint \*spawns PuzzlePieces. The 2D …

---

<div class="post-metadata">

**Author:** ![MichaelWion](https://d3kjluh73b9h9o.cloudfront.net/original/4X/2/8/5/28502927f1d97ba1051b3b47ccfe17233bf41ef0.png) [@MichaelWion](https://forums.unrealengine.com/u/MichaelWion)\
**Post date:** [July 11, 2021, 3:15pm UTC](https://forums.unrealengine.com/t/subdivide-an-image-over-several-planes/486061/3 "2021-07-11T15:15:44Z")

</div>

Looks fairly spot-on! Thanks!
