Mobile app version of vmapp.org
Login or Join
Miguel516

: Guessing a 3D rotation's parameters? I have 2 images I need to combine (actually in HTML but I need help with getting the rotation), one is a mockup of an iPhone with an angle, and the other

@Miguel516

Posted in: #AdobePhotoshop #SketchApp

I have 2 images I need to combine (actually in HTML but I need help with getting the rotation), one is a mockup of an iPhone with an angle, and the other is a screenshot with no angle. I need to guess the rotation of the screenshot to make it fit in the phone's screen area. I can't use skew because that's not available in HTML / CSS (the skew that is available is different that what I need to achieve).

See below images:




So I need to somehow rotate the screenshot in 3D space to make it have an identical perspective with the phone's screen. Anyone knows of a simple and straightforward way?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Miguel516

1 Comments

Sorted by latest first Latest Oldest Best

 

@Sent7350415

Take a look here, with skew(XXdeg,XXdeg) you can achieve exactly this in Photoshop.

EDIT:

Here is some css code that does that:

.transform {


transform: scale(0.8) scaleZ(1.0) rotateX(9deg) rotateY(9deg);
transform-origin: 0% 0%;
perspective: 200;-webkit-transform: scale(0.8) scaleZ(1.0) rotateX(9deg) rotateY(9deg);
-webkit-transform-origin: 0% 0%;
-webkit-perspective: 200;
-webkit-perspective-origin: 50% 50%;
-moz-transform: scale(0.8) scaleZ(1.0) rotateX(9deg) rotateY(9deg);
-moz-transform-origin: 0% 0%;
-moz-perspective: 200;
-moz-perspective-origin: 50% 50%;
-o-transform: scale(0.8) scaleZ(1.0) rotateX(9deg) rotateY(9deg);
-o-transform-origin: 0% 0%;
-o-perspective: 200;
-o-perspective-origin: 50% 50%;
-ms-transform: scale(0.8) scaleZ(1.0) rotateX(9deg) rotateY(9deg);
-ms-transform-origin: 0% 0%;
-ms-perspective: 200;
-ms-perspective-origin: 50% 50%;
transform: scale(0.8) scaleZ(1.0) rotateX(9deg) rotateY(9deg);
transform-origin: 0% 0%;
perspective: 200;
perspective-origin: 50% 50%;
}


You might want to play with attributes to make it fit, this link might just help you get there via GUI.

Here is a fiddle you just need to tweak it.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme