Photoshop: transform into a specified regular geometric shape.

  • 1
  • Question
  • Updated 6 years ago
  • Answered
  • (Edited)
I contacted Adobe Technical Support to see if a selection could be transformed into a circle. The answer was no. As an illustration, imagine a green cube on a red cloth. I wanted to change the green cube into a green ball. Selecting the green cube is easy, but transforming it into a green ball, or circle, requires many transformation adjustments and it won't really be a true circle, sphere or ball. This might be a useful tool.
Photo of Doug Burgess

Doug Burgess

  • 11 Posts
  • 0 Reply Likes

Posted 6 years ago

  • 1
Photo of Chris Cox

Chris Cox

  • 20280 Posts
  • 823 Reply Likes
In this case, you want the sphereize filter.

You could also use Liquify, or the Warp transform.
Photo of mathias

mathias

  • 191 Posts
  • 39 Reply Likes
This is marked as "Implemented"???

What was implemented?

Edward, your need isn't clear. Have you ever used Illustrator's convert to shape feature? Is this something similar to what you're after?

You can of course enter Quick mask Mode and modify a selection like it's pixels. Press 'Q', to and enter and also exit.

Are you wanted to define a rectangular area and create an ellipse that fully envelops the defined area -OR- place a circle INSIDE the defined area? If either of these if needed, I don't see why just dragging out an elliptical marquee or vector ellipse won't quickly do the trick.
Photo of Doug Burgess

Doug Burgess

  • 11 Posts
  • 0 Reply Likes
Chris, the spherzie filter distorts too much and adds three dimensionality, which I don't want. At least not in this case. The Liquify filter, also, mushes everything like soft ice cream. I don't want that, either. Maybe I'm not as versed in those tools and am missing something. The warp feature, which is the tool most able to give me what I want, requires nudging and pulling and twisting and contorting, etc, and the result is still, and probably can't be, a true circle. The result may appear to be a circle, but it is not a mathematically correct circle. But, so far, it's the only thing that comes close. I was hoping there was a feature that could more or less snap the selected pixels into a circle, somewhat like holding the shift key during the marquee selection constrains the selection into a true circle.

Matt, I don't know what "Implemented" means. I didn't put it there, or didn't put it there knowingly. I have not used illustrator convert to shape feature, but that sounds promising and I will look into it. And, again, I don't want to modify the selection, I want to modify the contents within the selection. I want to take a green cube, as mentioned above, and make that cube into a circle. I guess I should say square, not cube, because "cube" suggests a 3-dimensionality that I'm not working towards.

Here is my actual situation. I photographed the the ceiling of a large dome using a panorama technique because I a) wanted a larger image file, but mostly because 14mm wasn't wide enough and I didn't have a wider lens. So, I had 12-15 files which were merged in photoshop to a panorama. Apparently photoshop had trouble with the circular nature of the subject matter and the result was not a circular image, but a distorted blob. Think of the difference between a long, non-round pumpkin, and a tennis ball, which is more or less a sphere, round. and circular. But both of those are spheroid, they have dimension. I'm not dealing with a sphere, but a geometric circle. The view looking up at the ceiling is not three dimensional. The visual effect is that of a geometric shape, a circle. That's why the spherize filter won't work, because it adds dimension, which I don't want (but I'll play play with it again, maybe I've missed something).

So, I have a squashed, pumpkin-ish result of something that should be purely circular. I can select the ceiling using lasso, or wand, or any of those, but then I have to use transform warp to coax it into something close to a circle, but it's not a circle. The diameter is not regular and smooth, and the radius varies. Granted, it varies by a little bit and I'm thinking I may just have to live with it, but I was hoping to be able to make that pumpkin shaped ceiling snap into a circle.

I see I can add an image, so I will post this, and then go to another computer and post the actual picture I'm working on.

Thank you both for responding, by the way.
Photo of mathias

mathias

  • 191 Posts
  • 39 Reply Likes
(The implemented question was more for Chris. The admins here determine the status of topics. This one seems to be falsely marked as Implemented. Don't know why.)

___

Doug, it would help immensely if you would link to an image. We're visual people. I tend to misinterpret long explanations when there's room to do so. If there was an image to see I'm sure everyone would get it.

But with your last post, you filled in a lot of the blanks - you're trying to stitch a panoramic together that contains a prominent circular architectural feature and Photoshop is botching the overall circular shape of it - you're not just trying to convert a simple, flat rectilinear selection to elliptical. In fact, there's not really a "selection" involved in this problem. Illustrator's convert to shape won't help you with this.
So, obviously Spherize would do nothing but even more damage, because it just fisheye distorts.

I think you're up against a BIG challenge here. Did you turn and angle your camera as you shot, or did you simply aim it at a different angle, using the same vantage point for each photo?

I've stitched panoramas before where there was significant distortion in each photo. So much distortion that PS couldn't stitch them well enough so what I did was import them all into a new doc, each on their own layer, arrange them as best as possible, set all layers' opacity to 50% so I could see through overlapping areas and use Transform > Warp, even Liquify to make manual adjustments. THEN, I would attempt automatic stitching. It's when there's a lot of inter-related hard lines on the edges of each photo that you run into problems because it betrays the stitching.

And of course, there are other stitching options at your disposal. There's software out there dedicated to the task. Never tried them, though.
Photo of Doug Burgess

Doug Burgess

  • 11 Posts
  • 0 Reply Likes
Here we go. The selection is shown and my goal is to take that selection and, if possible, "Snap" it into a circle. Again, not the selection, but the image within the selection.

Instead, what I have been doing is using the warp tool with many, many adjustments, nudges, tweaks, pushes, twists, etc. The result is still not a genuine circle. The distortion caused by the spherize tool squeezes too much around the circumference and destroys image detail. Maybe there is something there, though, and I will do some more investigating.
Photo of Doug Burgess

Doug Burgess

  • 11 Posts
  • 0 Reply Likes
Matt, I was posting this image as you were writing your reply.
Photo of Doug Burgess

Doug Burgess

  • 11 Posts
  • 0 Reply Likes
Matt, we're more on the same page, now. The images were collected with me lying on the floor beneath the center of the dome. I had to turn the camera to get the sides of the dome. The 14mm aimed straight up would only capture the smallest edge of the rim of the dome, none of the columns, so yes, I had to angle it to the sides, and to the top, and to the bottom. Yes, Photoshop couldn't fathom it as the top left looked exactly like the bottom right--my guess. I merged these using the Automatic setting in photoshop merge, but I see that there's also a montage and a sphere option, so I will try those, too. But, aside from that, I think you see what I was hoping to find within photoshop, to be able to define a selection, and then to have the pixels within that selection snapped into a circle. I would think that could be engineered into the software.
Photo of mathias

mathias

  • 191 Posts
  • 39 Reply Likes
Ah ok, there it is. Yep, so far it looks really tweaked around. The straight vertical columns give it away. You've got nice continuous lines making up the circles, though.

If you aren't already, I'd definitely place a true circle on a layer above everything, maybe give a 0% fill and a bright pink outline, and use it as a guide. You could multiple concentric circles, too - a guide for each circle.

This is a tough one. And it's the columns doing it.
Photo of Doug Burgess

Doug Burgess

  • 11 Posts
  • 0 Reply Likes
yes, that is exactly what I've done ( place a true circle on a layer, etc) and it's about all I can think of.

The picture I posted, above, is the best photoshop could offer, after merging, of at least a dozen attempts. In other words, this is my starting point for this particular merge. Some of the others came out like stars, or amoebas, or melted candle wax....just nothing like a circle. This one (above) at least reminds one of a circle. And the stitching here is, as you noticed, pretty smooth. That was not easy to obtain, either.

The picture attached to this post (below) is one of my first efforts, and it comes close to what I want, pretty close, I think, but it was stitched poorly. For example, you can see three or four columns where there should be two, (I've hidden these behind my copyright notice) and some burps in the stitching here and there, barely visible at this resolution. I also solved the column problem you pointed out by cropping them away, although this leaves me no choice but to present the picture with the mask as part of the image. Not the best solution, but a compromise.

I began to work this out on a Gigapan, but this is not a simple 360 degree horizon. It's that, plus a 360 degree zenith. So, it's a bubble and Gigapan wanted 1500 images and 2 hours to collect them. That's quite a lot more than my lying on the floor and collecting 15 in about a minute. I don't know the gigapan well enough to reduce that 2 hours/1500 images down to something more practical, so I gave up on it.

Anyway, I see that I can come close to what I want, and I guess that's where I'll have to be satisfied, but this is only after a lot of transforming, which degrades the quality of the image, and is still not really as true to the architectural geometry as I had hoped I could obtain. Hence, my suggestion to the photoshop engineers.

Photo of mathias

mathias

  • 191 Posts
  • 39 Reply Likes
Good work.

Now the biggest problem you have is the "notched" border where bad seam blending is apparent. But you already know that.

Ya know, this image is so symmetrical, you could almost just copy one quadrant and copy/rotate it around to get around most of it's issues - the lower left quadrant doesn't appear flawed from the small thumbnail you've posted. I'd exclude the innermost area since it all looks good, though.
Photo of Doug Burgess

Doug Burgess

  • 11 Posts
  • 0 Reply Likes
I can tell that you now feel my pain!

That symmetry is what is pushing me to make it a true circle. I've tried what you've suggested, carving out a slice like a pie and just replicating it, but since it is not a true circle it doesn't line up right and refuses to be aligned. Not being a true circle, a difference in the radius of even the smallest amount means the pie slice technique won't work. The distortions imposed by Warp on the circumference, and at the center, all of which are more or less imperceptible to the eye, reveal themselves when trying that. Very frustrating.
Photo of mathias

mathias

  • 191 Posts
  • 39 Reply Likes
I do. I've been there before.

But getting back to your initial post, since you labelled this an idea, a feature idea, here's two basic suggestions on how to tackle the issue at hand, though both are terrible. It at least lends something to build off of.

Photo of Doug Burgess

Doug Burgess

  • 11 Posts
  • 0 Reply Likes
hahahah! Yes, an unsolvable conundrum.

Actually, though, your diagrams might not be so bad because you have drawn your yellow target with a straight grid, when in fact, in my case, that grid was distorted by the merge. So the starting point was a grid that does not have parallel intersecting lines. That means that the distortions visible in your solutions look bad on these illustrations, but that distortion would not be so easily apparent on the final result, at least as it applies to my picture.

What does "Sample outer edges to expand to 'target' circle" mean.

I'm not familiar with that phrase.
Photo of mathias

mathias

  • 191 Posts
  • 39 Reply Likes
Hehe true. good point.

-- "Sample outer edges to expand to 'target' circle"

Oh I don't know, was just trying to come up with a nifty brief explanation of my Solution #2. As you can see all I did was take the outermost pixels and "drag" them outward, which I did by using a zoom Radial Blur until all outer edge pixels touched the target pink cirlcle, then collapsed all transparency by making copies of the result and merging them into themselves until no transparency survived.
Photo of Doug Burgess

Doug Burgess

  • 11 Posts
  • 0 Reply Likes
Matt, check this out. In terms of the final result, this is what I was trying to do with all of the above. It was obtained as follows: I did a 360° panorama of the interior, then made a "tiny planet". The 360° panorama did not include the skylight, so that was shot separately and pasted in. I did this quickly last night, but a more serious attempt would obviously include cutting and pasting more than just the skylight, but also the panels, which would take care of the mushing that was caused by the Polar Coordinates filter, which is an integral and crucial part of the Tiny Planet effect. This filter was very effective at giving me a good circle. You can still see burbles, but that's because my panorama had problems. As said, it was done quickly last night and I can address those issues later. But, effectively, this was a completely different solution to the visual problem I was facing. It clearly does not answer the original post, but in terms of final result, it's as good as anything. At least for this particular dome.

Photo of mathias

mathias

  • 191 Posts
  • 39 Reply Likes
Wow! That looks awesome.

I like how you killed all the dark areas and made it more evenly lit. Almost gives a surreal feel. (or maybe it was just lit better that day . . .)

And you used Polar Coordinates??? Rectangular to Polar setting I guess. That filter has always amazed me. Only found a good use for it ONCE, that I can remember.

Surely you didn't create a linear panorama somehow, then Polar Coordinates it into a "tiny planet". Or did you?

One thing on your side is how "componentized" this image is. It's basically a quilt of separate geometric shapes. This will allow you to relatively (though, laboriously) shoot the vertical walls, under the dome and piece by piece "repair" the stretched elements. ie. shoot each window separately and perspective warp them into place, etc.

Anyway, very impactive result.
Photo of Doug Burgess

Doug Burgess

  • 11 Posts
  • 0 Reply Likes
I followed this tutorial explicitly, except I may not have rotated the image 180 before applying the filter.

https://www.youtube.com/watch?v=oQbC_G...

Yes, it was a different day, the light was more diffuse. The panorama I started out with had an aspect ratio of something like 7:80, but I did what the tutorial said: made it square, which distorted it tremendously, and then applied the polar coordinates filter. And yes, you're right, I have a lot of repairing to do, but I think if I spend some time on the panorama before starting this part, I'll be better off when it generates the planet.
Photo of mathias

mathias

  • 191 Posts
  • 39 Reply Likes
Well, it's a success. Now let's just hope the ROI is worthwhile.
Photo of Doug Burgess

Doug Burgess

  • 11 Posts
  • 0 Reply Likes
ROI = Return on Investment? If so, it is. There's always something to learn.
Photo of mathias

mathias

  • 191 Posts
  • 39 Reply Likes
Yes. Just saying, because I lost count of how projects I've spent endless hours on, only to question once done - ok . . . "was that really worth it???" hehe

Definitely always new stuff to learn!