# can blueprints be used to chop an image into pieces?

**URL:** <https://forums.unrealengine.com/t/can-blueprints-be-used-to-chop-an-image-into-pieces/104930>\
**Category:** Blueprint\
**Tags:** unreal-engine\
**Created:** [January 12, 2018, 8:16am UTC](https://forums.unrealengine.com/t/can-blueprints-be-used-to-chop-an-image-into-pieces/104930 "2018-01-12T08:16:27Z")\
**Posts on this page:** 1\
**Showing post:** 2

<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:** [January 12, 2018, 11:13am UTC](https://forums.unrealengine.com/t/can-blueprints-be-used-to-chop-an-image-into-pieces/104930/2 "2018-01-12T11:13:58Z")

</div>

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.

 ![PuzzleMat.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/f/1/f1660e080b0afbd9f1d2a79d49ed15503be72e3c.png)

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_

 ![ActorConstructor.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/b/5/b595c38d3ba5dce3a3328f5306a8ac7e2ad1bd5f.png)

The \*LevelBlueprint \*spawns _PuzzlePieces_. The _2D Grid Execution Macro_ does the heavy lifting of distributing them and feeding the abovementioned material coordinates. The actors representing the pieces of the puzzle are stored in an array - you’ll want to interact with them later on, surely.

 ![SpawnActors.PNG](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/6/565486ff5d605870ccab5dd0dfad94569033fd92.png)

The end result:

 ![Puzzle.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/5/2/5220f1ee8c025329bf69c6746538cae488986d35.jpeg)

It clearly needs more work but should be a decent starting point.

By adjusting _Size_, you should be able to get as many pieces as you need, 7x7 in this instance. The flattened cubes are 100x100, the gaps can be adjusted in the \*2dGridExecutionMacro \*- _SectorSize._

 ![Puzzle7.jpg](https://d3kjluh73b9h9o.cloudfront.net/original/3X/1/d/1d9973bfd8141b8e913aca73db602a9700f6b0b8.jpeg)

---

_[View the full topic](https://forums.unrealengine.com/t/can-blueprints-be-used-to-chop-an-image-into-pieces/104930)._
