Jump to content
You must now use your email address to sign in [click for more info] ×

Using Equations in Distort - Parameter won't work


Recommended Posts

@atfitzy posted a thread about re-shaping a text block. I tried various Equations in Filter> Distort and the best I could come up with is:

x=x

y+(h-y)*(w-x)*x/w/w/a

This produces the required arch in the upper margin of the block. The a parameter allows the user to increase the stretching effect. The default of one has no effect; reducing it will increase the effect. However, I find that reducing the parameter has no effect until the value goes below half, after which it has the desired effect. I can get the desired effect by putting a multiplier at the start of the equation:

y+2*(h-y)*(w-x)*x/w/w/a

Here are a couple of arched images using this formula:

5a5a3cf19c9a8_BenguiatBlackDist.png.04d7b1970af32fc66a2aaa338bf5a2ea.png

5a5a3d086ea55_GridPatternDist.thumb.png.0a096c5715cd2551650a1205a9fe311e.png

Otherwise the formula works as desired. Before I commit this to a macro can anyone explain this unexpected behaviour in the parameter value?

John

Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Link to comment
Share on other sites

1 hour ago, stokerg said:

Hi John,

 

This is a bit over my head but hopefully @James Ritson or @Andy Somerfield would be able to clear up why it's acting the way it does

Thanks, @stokergI will live in hope.

John

Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Link to comment
Share on other sites

Works for me when applied on a custom SVG grid under OSX. - The default of one has an streching effect on the grid here and also altering the "a" parameter slider continously updates the whole streching effect.

☛ Affinity Designer 1.10.8 ◆ Affinity Photo 1.10.8 ◆ Affinity Publisher 1.10.8 ◆ OSX El Capitan
☛ Affinity V2.3 apps ◆ MacOS Sonoma 14.2 ◆ iPad OS 17.2

Link to comment
Share on other sites

The expression (w-x)*x/w/w should be zero at each end, rising to a maximum of 0.25 in the middle. Thus the arch should rise up a quarter of the current position above the x-axis (h-y). The a parameter at the default of 1 would have no effect. As a decreases, the value of the expression should rise in inverse proportion. It should do so strictly monotonically. It is not doing this on my Windows 10 PC. Note the 2* is just a fudge factor to make it behave as expected.

(Note that strictly monotonic means that the rise should always be positive and non-zero.)

John

Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Link to comment
Share on other sites

  • 3 weeks later...

I have modified this equation from top a little bit. Please give a try - it should eliminates this A-jump.

y+(h*c-y)*(w-(x*b))*x/w/w/(a*0.5)

If B =1 and C = 0.5 than A is just scaling from the middle BUT!!! it works different for different layers (with different sizes).  

So my question is it possible that this filter is computing the whole canvas, not the size of the selected layer?

OSX 12.5  / iMac Retina 27" / Radeon Pro 580X / Metall: on! --- WWG1WGA WW!

Link to comment
Share on other sites

@Polygonius, I have now tried your equations. Putting /(a*0.5) at the end is algebraically the same as I had with /a at the end and 2* at the beginning. However, I now find that the a parameter still does not cut in at first, but only when it reaches a value of about 0.7-0.8. Curiouser and curiouser! (The link explains the origin of this expression for those unfamiliar with it.)

Your use of parameters b and c are interesting. Parameter b just seems to scale along the y-axis, enhancing the value of a - not what I would have expected. Parameter c is more intriguing. It shifts the effective horizontal axis of the effect upwards. If this is used with an enhanced curve-shift (with parameter b), it gives the appearance of a rounded corner. I was applying these parameters to the square grid as in my first posting. Here is the grid with a=0.7, b=0.9 and c=0.3 (all values approximate).

5a76e7fa3a80f_GridPatternDist2.png.758406cfa33819c3b756e71a126da711.png

I am interested to see these effects on a real image!

John

Edited by John Rostron
Coirrected link!

Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Link to comment
Share on other sites

16 minutes ago, R C-R said:

 

alice.png.a11c66444b6e4f5b5328b32f08663af4.png

@R C-R, for a moment I thought that you had applied this filter to Alice and the pig. I must try it!

AliceWithPigDistort.png.392590742b227fc6cf3ec2224fb1c074.png

For Alice in Wonderland, a stretch transform seems appropriate. This has a=1, b=0, b=0.9, c=0.35 (all approximate).

John

Windows 10, Affinity Photo 1.10.5 Designer 1.10.5 and Publisher 1.10.5 (mainly Photo), now ex-Adobe CC

CPU: AMD A6-3670. RAM: 16 GB DDR3 @ 666MHz, Graphics: 2047MB NVIDIA GeForce GT 630

Link to comment
Share on other sites

1 hour ago, John Rostron said:

For Alice in Wonderland, a stretch transform seems appropriate.

 

Or a shrink transform, depending on whether you’re illustrating “Eat Me” or “Drink Me”. ;)

 

Alfred spacer.png
Affinity Designer/Photo/Publisher 2 for Windows • Windows 10 Home/Pro
Affinity Designer/Photo/Publisher 2 for iPad • iPadOS 17.4.1 (iPad 7th gen)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.