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!

Fit image into shape.


PutinHuilo

Well-Known Member
Messages
65
Likes
0
I have created following shape in Photoshop, now i need to load image and have that image automatically fit inside that shape. Can this be achieved with built in Photoshop tools or plugin?


Shape
shape.jpg

Image
1.jpg

Image fit to shape (note, shape does not crop the image, top part of image actually stretches to fit inside shape)
In other words image precisely fills the shape.
2.jpg
 

IamSam

Administrator
Staff member
Administrator
Messages
22,752
Likes
13,268
I have created following shape in Photoshop, now i need to load image and have that image automatically fit inside that shape. Can this be achieved with built in Photoshop tools or plugin?
Yes.

Easy with smart objects.
Shape converted to smart object....
Screen Shot 2022-02-14 at 11.23.24 AM.png
Image..
Screen Shot 2022-02-14 at 11.19.40 AM.png

Image in shape...
Screen Shot 2022-02-14 at 11.18.29 AM.png

New image in shape. Automatically updates...
Screen Shot 2022-02-14 at 11.30.44 AM.png
Screen Shot 2022-02-14 at 11.22.07 AM.png

You can edit the shape......
Screen Shot 2022-02-14 at 12.05.33 PM.png
 

IamSam

Administrator
Staff member
Administrator
Messages
22,752
Likes
13,268
What is the specific command that warps the image exactly into the smart object?
No direct command........it's just a matter of altering the shape after it's been converted into a smart object in free transform (warp). Like a mock up. I've actually explained this technique multiple times here over the years! I'll have to look them up.

I apologize for the fact that I have not explained "how" to accomplish the effect, I only answered the question at hand which was, "Can this be achieved with built in Photoshop tools". It's a time issue and I'm not sure if the OP wants an explanation.

This video is where I found the concept over 7 years ago! Just watch what he does with the smart object shape.
 

Rich54

Guru
Messages
1,739
Likes
3,425
Ahh... I figured it out after watching the video. I never knew of this technique. Very cool.
 

PutinHuilo

Well-Known Member
Messages
65
Likes
0
Yes.

Easy with smart objects.
Shape converted to smart object....
View attachment 127571
Image..
View attachment 127572

Image in shape...
View attachment 127573

Thank you this method does indeed work, but not for my situation.

I already created shapes that i want to use and now i just want to be able to load my shapes and position image inside them. some shapes are more complicated like star and cannot reproduce it using free transform > wrap.
 

IamSam

Administrator
Staff member
Administrator
Messages
22,752
Likes
13,268
Thank you this method does indeed work, but not for my situation.
No, I expected that it wouldn't. I'm learning this about you! LOL!!

I already created shapes that i want to use and now i just want to be able to load my shapes and position image inside them.
I see. Other than using a clipping mask and warping the image to fit the shape..............you may be out luck using Ps.

some shapes are more complicated like star and cannot reproduce it using free transform > wrap.
I don't think you can get an image to conform/distort to the shape of a star. Even with the method I described above.

I myself don't know of any other Ps methods or plugins that may help you out.
 

PutinHuilo

Well-Known Member
Messages
65
Likes
0
Yes.

Easy with smart objects.
Shape converted to smart object....
View attachment 127571
Image..
View attachment 127572

Image in shape...
View attachment 127573

New image in shape. Automatically updates...
View attachment 127575
View attachment 127574

You can edit the shape......
View attachment 127576
I don't understand how this works could you give example (better if its working PSD file), i did watch video and i cannot do it.

If i create shape or convert to smart object then smart object has rectangular shape and if i open smart object and draw outside the edges of shape (or place image over it) then shows trough inside working document as well.


Working document.
working-document.jpg


Smart object edit mode:
smart-object.jpg
 
Last edited:

IamSam

Administrator
Staff member
Administrator
Messages
22,752
Likes
13,268
I don't understand how this works could you give example (better if its working PSD file), i did watch video and i cannot do it.
You either understand the concept or you don't. A PSD file will not help you unless you understand how it's working.

If i create shape or convert to smart object then smart object has rectangular shape and if i open smart object and draw outside the edges of shape (or place image over it) then shows trough inside working document as well.
I can see by your image samples that you are doing something wrong. You have a distorted smart object document (PSB)............that's not how it's done!

I will explain this again, but it will not help with your original question!


Remember, we are working with two different documents! A PSD file and a PSB file. Not a typo!

This is a working PSD document.

Screen Shot 2022-07-19 at 9.50.13 AM.png

This is a shape within the PSD document.
Screen Shot 2022-07-19 at 9.50.01 AM.png

Convert the shape layer into a smart object.
We have two layers now, a BG layer and a shape layer converted into a smart object.
Screen Shot 2022-07-19 at 9.52.09 AM.png

Once the shape has been converted into a smart object, double click the SO/Shape thumbnail to open the PSB file.
Screen Shot 2022-07-19 at 9.59.46 AM.png

This is the SO/Shape layers PSB document.
It's just a white shape with NO edges! (The black you see is not part of the document, only the white!)
Screen Shot 2022-07-19 at 9.55.07 AM.png

Let's add an image to the shape in the PSB document
Screen Shot 2022-07-19 at 9.58.01 AM.png
Screen Shot 2022-07-19 at 9.58.12 AM.png

Save the PSB file by closing and selecting "save", or hit Cmd/Cntrl + S.

This is what the PSD document now looks like....
Screen Shot 2022-07-19 at 10.01.41 AM.png
Screen Shot 2022-07-19 at 10.02.22 AM.png

In the PSD document, lets distort the shape! DO NOT DISTORT THE SHAPE IN THE PSB DOCUMENT!
Screen Shot 2022-07-19 at 10.06.18 AM.png
Screen Shot 2022-07-19 at 10.06.27 AM.png

If we look back on the PSB document, it has not changed.
Screen Shot 2022-07-19 at 9.58.01 AM.png
Screen Shot 2022-07-19 at 9.58.12 AM.png
 

thebestcpu

Guru
Messages
2,994
Likes
2,760
@IamSam Thanks for reposting this technique. I don't know if I can use it yet it is very cool to effectivcely be able to save the Mesh transformation and apply to other images.

@PutinHuilo I took a look and see no easy automatic in PS or with an Addin to do what you want espectially "automatically). One would still have to create the base transformation to match the shapes your created.

One more are to look at is to use Edit > Puppet Warp. It gives quite a few degrees of freedom that the basic transformation tools do not. However, it is far from an automatic considering you still have to set up the initial transformation.

I would also like the tool which you seek you don't know of a source of such a tool

Best wishes on your continued search.
John Wheeler
 

PutinHuilo

Well-Known Member
Messages
65
Likes
0
I found how to do it (in theory), there is plugin called Flexify 2 that allow photo transformations e.g. from 180° fisheye view to 90° rectilinear view for example. Also to transform images to different shapes. This works i think trough creating 3d geometric object and then applying photo to it, same as they do with textures in video games they map texture to object its a piece of cake for any 3D library.

I am not suggesting to write a plugin for this, simply 3DS Max or Maya or other 3D model editor, if they already have functionality like that theoretically can:
- import 2d photo containing the new shape of image
- auto create polygon of same shape
- apply the image to that shape
- select right settings so it fills the entire polygon
- export in high resolution
 
Last edited:

Top