Thursday, April 9, 2015

Spherically-projected perspective in photoshop

who's ready for some ultra-boring perspective stuff? I am!
I wasn't satisfied with pinched coordinates at the poles of spheres- that and the incredibly warped perspective led me to come up with other solutions, like adding a cap for overhead clouds, or just leaving the top of the sphere a generic wash of colour.
The other day, i figured out how to paint to your hearts content, with way less perspective distortion.
Let's use the polar coordinates filter in photoshop!

An example of the kind of perspective we'll be making. notice the huge warping going on at the top and bottom.

We’ll skip ahead and assume you've already got a 4 point perspective drawing. This would wrap onto a sphere well, but there would be gross pinching at the top. What if you wanted to continue your drawing all the way to the top of the sphere this was getting mapped onto?
I'll be using a square canvas for this demo. The grid measures out every 45 degrees

For the tops, I've found its easier, and more sane to make another painting for the top (and bottom if need be). I started here with a 5 point perspective drawing of my top pole ( imagine fluffy clouds and happy trees and stuff)

the grey border will match up with the 45 degree longitude line in the other drawing


You can mark out a smaller circle (like I've done in grey) that cuts into the radius by half. this is the 45 degree mark, where you’ll be cropping later. Making sure your perspective drawing is perfectly centered, you can run it through a filter called ‘polar coordinates. use the ‘polar to rectangular’ option;



I’m still getting used to polar coordinates myself. Basically, it cuts your drawing halfway through and stretches it around a virtual sphere. It will get un-stretched when we map it onto real geo in maya. All you have to do then is shrink it vertically and sew it up with your other drawing:

See the nasty stretching happening at the top? that means its working!
To test our results, here it is mapped onto a sphere. Ive also included a generic looking texture to show something other than a grid;


Glorious.



This was just a photo I used the same technique on .















Magnifique! I hope this comes in useful to anyone doing skyboxes/ matte paintings and such.