What's new
Photoshop Gurus Forum

Welcome to Photoshop Gurus forum. Register a free account today to become a member! It's completely free. Once signed in, you'll enjoy an ad-free experience and be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Slice and randomize


nawerwohl

Member
Messages
5
Likes
0
Hey there,

I have an image here and rather little experience with photoshop.

I want to divide that image into smaller parts (proabably using the slice tool, right?), and then piece it back together randomly. Is there a way to do that, and if so, how?

Any assistance is highly appreciated. Thanks!
 

Eggy

Retired Moderator
Messages
5,313
Likes
5,085
Make a selection of one piece (it doesn't matter what tool you're using)

Untitled-1.jpg

grab that piece and move/rotate/place it the way you want

Untitled-2.jpg

Untitled-3.jpg
 

nawerwohl

Member
Messages
5
Likes
0
Hi Eggy,

Thanks for your reply.

Maybe I didn't express my intention accurately.

In this picture you can see the grid lines from the slice tool. Now what I want to do is take these pieces and rearrange them randomly such that the overall shape of the image is the same but the positions of the individual slices are randomized.

Technically, I could rearrange them manually but I am wondering whether there is a way to automate that process.


green field screenshot.png
 

Eggy

Retired Moderator
Messages
5,313
Likes
5,085
Oh that way...

I'm sure there's an action (atn) for doing that but I don't know any...
 

nawerwohl

Member
Messages
5
Likes
0
I see.

Thanks for the keyword. I'll look into it. Maybe I can find something.

If anyone else has an idea, please let me know.
 

Chipyluna

Member
Messages
14
Likes
47
I would use the selection tool and control J until you have them all on separate layers, if you blind the original image it will just leave you with the individual layers/squares that you can move around using the move tool.

As far as an auto shuffle .....no idea
 

Tony Bowman

Well-Known Member
Messages
68
Likes
87
I can't think of any way to get an action doing this (which doesn't mean there isn't one), but to make the manual process a little easier, when you've saved your slices and imported them back, use the 'auto-select' feature on the move tool and have 'snap' turned on in the view menu (maybe 'snap to' layer). That way you should be able to easily move them using drag and drop and ensure they all line up and complete the task quite quickly.
 

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
I could be wrong, but I think what the OP may want is something like this.........

Original
Screen Shot 2017-08-30 at 11.51.56 AM.png

Randomized
Screen Shot 2017-08-30 at 11.51.42 AM.png

I don't know if an action for this can be made but I did something similar to what Tony Bowman described.
I created a grid made of correctly spaced guidelines.
Screen Shot 2017-08-30 at 11.56.02 AM.png

Then I used the Rectangular Marquis Tool to make a selection of each section, then I copied the selection to it's own layer using Cmd/Cntrl + J.
Screen Shot 2017-08-30 at 11.56.47 AM.png

Once I had all the layers separated, I grouped them together.
I made a duplicate of the grouped layers and used the Move Tool (set to auto select) and just moved the layers around.

For more fun, I also added another copy of the grouped layers which I desaturated.
I then place a layer mask on the desatted group and again used the Rectangular Marquis Tool to mask in the sections I wanted to be Black and white.
Screen Shot 2017-08-30 at 12.00.18 PM.png

You could use different effects on additional group layers.

As I said, I don't know that this process can be automated, but it was not that difficult and went fairly fast.
 

nawerwohl

Member
Messages
5
Likes
0
Hey,

Thanks for your help! This is what I meant. Doing it manually now, it's fine.

Just one more question:
Is there a way to take the individual tiles and merge them back together into one image?
 

Eggy

Retired Moderator
Messages
5,313
Likes
5,085
Keeping in mind the possibility to re-arrange the tiles, highlight the top layer and press cmd/ctrl+shift+alt+E.
This will create a snapshop of all the layers below.
 

SCTRWD

Power User
Messages
457
Likes
239
Let's say your tile is 40x40 px.
Make horizontal selection with 40 px height and the width of your image. Position it at the top of the image.

Now record simple action consisting of two steps:
1. Filter->Other->Offset with horizontal offset value set to some multiple of 40 and Wrap around option checked.
2. Shift the selection one row down: just use Select->Transform selection with bottom reference point and -100% Height. This way you can use it later with selections of any size.

For Offset Filter step check "Dialog on" checkbox in the Actions panel. Choose some shortcut for your action.

Now start playing your action repeatedly, each time choosing some random offset of multiple of 40 in the Offset filter dialog. Once you've done all the rows of the image rotate it: Image->Image Rotation 90CW, again select the top row and play
the action again as many times as needed.

Finally rotate the image back 90CCW.

Instead of playing your action manually I'd suggest making special helper "Repeat" action, which just plays your action many times. Just create new action, call it Repeat and record one go of the action, stop recording. Then copy that step many times in the Actions panel(select the step, copy, select all copies, copy, select all copies, etc). By playing this Repeat action all you'll have to do is just enter the Offset parameter in the Offset Filter dialogs. Once your selection goes outside of the image it will show error message letting you stop the action all together.

If your not satisfied with the resulting look just rinse and repeat :cheesygrin:

P.S. If you have a hard time picking random numbers you can find many online random generators...

P.S.S. I'm pretty sure someone here can write a script realizing all of this this automatically...
 
Last edited:

IamSam

Administrator
Staff member
Administrator
Messages
22,721
Likes
13,258
Is there a way to take the individual tiles and merge them back together into one image?
Of course.

Since the the random version is just a group of layers made up of the sections from an original version, then the original version is still intact..............just turn off the group sectional layers (that you should have grouped) and the original image apppears.
Screen Shot 2017-08-31 at 8.15.58 AM.png
 

Top