Custom Distort for printing on non-flat media

Here everybody can post his problems with PhotoLine
maho
Mitglied
Posts: 83
Joined: Sun 18 May 2003 02:02

Custom Distort for printing on non-flat media

Post by maho »

Big picture: I'm using PhotoLine to make an image, to be "printed" (engraved) on a beer glass. Something like this:

Image

The problem is that because the surface is not flat, the image appears distorted when viewed. That logo is actually a perfect circle (when measured on the physical glass), but appears as an elongated ellipse when viewed straight on (741 pixels wide and 847 high).

I am looking for some tool similar to the Distort tool, that allows images to be distorted in a non-linear way. In particular, to print on a cylinder, I would like some kind of arcsin(x) transformation Distort, that leaves y-coordinates unchanged. The left and right edges need to be stretched more than the center. EG, something that does this:

Before:
Image

After:
Image

Any suggestions?
User avatar
Hoogo
Betatester
Posts: 3927
Joined: Sun 03 Jul 2005 13:35
Location: Mülheim/Ruhr

Re: Custom Distort for printing on non-flat media

Post by Hoogo »

Had a similar problem when I recreated the stencils of my bike, just the opposite way.
I pasted squared paper to the tubes, took a photo, then used the distort tool to turn everything into squares again.

For a moment I was also thinking about a more perfect tool, but then I considered focal length and didn't bother anymore. Good enough was simply really good enough, I could print, test and correct.

If you're looking for something perfect, then you'd have to consider the distance of the viewer. If you can't tell the distance, then a photo of wrapped squared paper and some manual distortion should be good enough.
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
User avatar
shijan
Mitglied
Posts: 1262
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: Custom Distort for printing on non-flat media

Post by shijan »

There is a Effects -> Effect Filters -> Projection -> Preset: Cylinder
Is it creates perspective in the way you need?
Image
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
maho
Mitglied
Posts: 83
Joined: Sun 18 May 2003 02:02

Re: Custom Distort for printing on non-flat media

Post by maho »

Thanks for the responses, guys.

Hoogo - My problem is actually a bit harder than what I originally described, as my glasses are in the form of a conical frustum rather than a cylinder. The transformation I need is:

x' = R(1-y/H)*arcsin(x/(R(1-y/H))
y' = y (unchanged)

I am sympathetic to the idea of just settling for "good enough" rather than trying to make it "perfect". As you mention, it is only perfect if viewed from a particular distance and a particular angle.

I can't seem to find a way to transform in a non-linear fashion using the Distort tool.

shijan - Thanks for pointing out the Projection menu, which I had never used before. Those effects are really cool. Unfortunately, none of them have the transformation that I need to print on my glass. Conceivably it could be implemented as a custom Rotation file (.rot file), but I don't know how to do that.
Martin Huber
Entwickler
Entwickler
Posts: 3999
Joined: Tue 19 Nov 2002 15:49

Re: Custom Distort for printing on non-flat media

Post by Martin Huber »

maho wrote: Sat 26 Nov 2022 18:35 I can't seem to find a way to transform in a non-linear fashion using the Distort tool.
You can non-linearly change the content of a layer by changing the helper points:
DistortTool.png
You can set a precise precision by double-clicking a point. In the position dialog, you can also insert calculations, so you can simple append a "+ 50" to shift a point by 50 units.

Martin
You do not have the required permissions to view the files attached to this post.
User avatar
Hoogo
Betatester
Posts: 3927
Joined: Sun 03 Jul 2005 13:35
Location: Mülheim/Ruhr

Re: Custom Distort for printing on non-flat media

Post by Hoogo »

I hope we're all talking about the same distort... There are some distort filters within Effects, there were some misunderstandings about that in the past.
Distort.png
You do not have the required permissions to view the files attached to this post.
----------------
Herr Doktor, ich bin mir ganz sicher, ich habe Atom! /Doctor, doctor, I'm sure, I've got atoms!
User avatar
shijan
Mitglied
Posts: 1262
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: Custom Distort for printing on non-flat media

Post by shijan »

Yep, it is Distort Tool in Toolbox
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302
maho
Mitglied
Posts: 83
Joined: Sun 18 May 2003 02:02

Re: Custom Distort for printing on non-flat media

Post by maho »

Thanks Martin, using the Distort Tool the way you suggest looks very promising- I tested it on paper. I'm going to test it on the laser tomorrow.

Is the Distort Tool available as an Adjustment Layer as well? That would be very helpful.
Juan
Mitglied
Posts: 609
Joined: Thu 06 Oct 2011 08:08

Re: Custom Distort for printing on non-flat media

Post by Juan »

maho wrote: Tue 29 Nov 2022 04:41 Is the Distort Tool available as an Adjustment Layer as well? That would be very helpful.
Agree.
User avatar
shijan
Mitglied
Posts: 1262
Joined: Mon 23 Dec 2019 15:21
Location: Ukraine

Re: Custom Distort for printing on non-flat media

Post by shijan »

Probably Distort can't be Adjustment Effect because it is a Vector Effect, so same as all other vector effects you can enable/disable/edit it in Layer Attributes:
Image
PhotoLine UI Icons Customization Project: https://www.pl32.com/forum3/viewtopic.php?f=3&t=6302