# Apply 3D perspective in photoshop

I know that I can apply a perspective in Image > transformation but it doesn't give me enough freedom. For example, I've this image like that

How can I rotate this image around X axis or Y axis with a specific rotation: 30 deg around X axis. Is that possible?

It is possible in Illustrator:

After you can copy/paste the rotated image on Photoshop as Smart Object and edit it in Illustrator whenever you want.

In Photoshop you just get distortions but with no specific degrees:

Convert the layer to Smart Object > Menu Edit > Perspective Warp

Perspective isn't defined until you also specify the placement and focal length of the imagined camera. In addition you obviously want to scale the image just like you scale photos taken by a real camera, you do not watch them in camera sensor size.

An alternative spec is to specify the imaging sector angle of the camera.

If the shape is rotated 30 degrees only around X axis with no other rotations and it's seen from very far away with a high zoom teleobjective you simply scale it vertically smaller, actually to cos(30 degrees) = 86,6%

This is a parallel projection. Rotation around Y axis means scaling in X direction to cos(rotation angle) and there's no interaction between those scalings.

The situation becomes complex, if the distance isn't especially long when compared to distance differences between camera and the corners. More complexity is caused if the camera watches somehow from up or down or from left or right. One technical person calculates a transformation matrix, another creates full 3D model with rendering.

An artist discards all numbers and distorts your image for a subjectively good appearance. That procedure is seemingly already well presented in other answers. Used 2D warping must be adjusted to artistically good appearance.

Photoshop and Illustrator have 3D tools which can calculate the distortion like in a 3D program. You specify the rotation angles and camera's viewing sector angle. Without specifying things numerically, they finally are subjective tools like 2D Warping. A good point: The total effect of simultaneous numerically defined X and Y rotations will be consistent.

One method left is to make a perspective construction using traditional descriptive geometry methods. It's beyond the scope of this answer, but you can find something about it by checking this older case:

Rotating a square

You can select the layer and then go to 3D > New 3D Extrusion from Selected Layer

Then you can specify the extrusion depth and the angles.

I totally agree with User287001.

Defining an angle of rotation on a perspective, without defining both: a Focal length and a camera distance has NO sense. You are only fooling yourself that you have a "correct angle" of 30° on X-axis.

Photoshop is not enough for this.