Jump to content

Recommended Posts

Posted

Some time ago I presented a formula to plug into Equations to warp text along a wavy baseline. I promised to create a macro to perform this, but never got round to it. Well here is that macro and a library containing it.

Wavy Text.afmacro

Wavy Text.afmacros

The transformation is just a sine/cosine curve:

y=y-(h*a/3)*(b*sin(360*x/w/c)+(1-b)*cos(360*x/w/c))

The a parameter determines the amplitude. The default is a=0.5, which creates a wave that  reaches about half way to the top and bottom of the layer. 

The b parameter shifts the position of te wave along the horizontal axis.

The c parameter affects the wavelength. Reducing c gives more waves along the x-axis.

If you start with a text layer such as:

147699529_OriginalText.png.e649968b898d4fe53db88c870d468517.png

and apply the macro with the default parameters, you get:

414516505_WarpedText.png.3021ebcd4a43d3840105d09e83cc0f1f.png

The macro is designed to operate on a text object on a background. It needs the background to give it room. It begins by rasterizing the text to a pixel layer. It uses the height and width of the background layer to determine the amplitude and wavelength, not the height and width of the text itself.

To use this, I would suggest creating a new document of a size to hold the text, then warp it, then  place or copy it into the target document with an appropriate blending mode.

John

Windows 11, Affinity Photo 2.4.2 Designer 2.4.2 and Publisher 2.4.2 (mainly Photo).

CPU: Intel Core i5 8500 @ 3.00GHz. RAM: 32.0GB  DDR4 @ 1063MHz, Graphics: 2047MB NVIDIA GeForce GTX 1050

Posted
52 minutes ago, evtonic3 said:

Does this mean the UI to this is right around the corner? I'm excited!

I'm not sure what you mean by this.

John

Windows 11, Affinity Photo 2.4.2 Designer 2.4.2 and Publisher 2.4.2 (mainly Photo).

CPU: Intel Core i5 8500 @ 3.00GHz. RAM: 32.0GB  DDR4 @ 1063MHz, Graphics: 2047MB NVIDIA GeForce GTX 1050

Posted
57 minutes ago, evtonic3 said:

Does this mean the UI to this is right around the corner? I'm excited!

John is a user, not a Serif developer.

-- Walt
Designer, Photo, and Publisher V1 and V2 at latest retail and beta releases
PC:
    Desktop:  Windows 11 Pro 23H2, 64GB memory, AMD Ryzen 9 5900 12-Core @ 3.00 GHz, NVIDIA GeForce RTX 3090 

    Laptop:  Windows 11 Pro 23H2, 32GB memory, Intel Core i7-10750H @ 2.60GHz, Intel UHD Graphics Comet Lake GT2 and NVIDIA GeForce RTX 3070 Laptop GPU.
    Laptop 2: Windows 11 Pro 24H2,  16GB memory, Snapdragon(R) X Elite - X1E80100 - Qualcomm(R) Oryon(TM) 12 Core CPU 4.01 GHz, Qualcomm(R) Adreno(TM) X1-85 GPU
iPad:  iPad Pro M1, 12.9": iPadOS 18.5, Apple Pencil 2, Magic Keyboard 
Mac:  2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.4

Posted

Just excited to see any resemblance of text warping. What I meant was since warping can be done mathematically, could a true warp function similar to other apps (AI Warp)  be close to bringing it Affinity apps as well?

Screen Shot 2019-03-13 at 11.16.28 AM.png

Posted

It's also handy to make wavy lines! :)

Acer XC-895 Core i5-10400 Hexa-core 2.90 GHz : 32GB RAM : Intel UHD Graphics 630 – Windows 11 Home - Affinity Publisher, Photo & Designer, v2
(As I am a Windows user, any answers/comments I contribute may not apply to Mac or iPad.)

Posted
On 3/13/2019 at 5:17 PM, evtonic3 said:

Just excited to see any resemblance of text warping.

Well in APh using equations here will always yield to a pixel based representation of the modified text or shapes then ...

warp_equation.jpg.96a50d43ae80491f79d3a8df0449c4a8.jpg

On 3/13/2019 at 5:17 PM, evtonic3 said:

What I meant was since warping can be done mathematically, could a true warp function similar to other apps (AI Warp)  be close to bringing it Affinity apps as well? ...

What you probably mean is then on the plain vector side (AD) instead, so things like envelope distortion or freeform distortion of vectors/shapes which are sadly missing there in AD. - It's something which needs to be still implemented for AD, so people don't have to switch over to use AI, Inkscape, Magix/Xara, ... etc. instead for performing such tasks.

 

☛ 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

  • 1 year later...
Posted

evtonic3, there is another way to apply wave effect on layer(s) by using different distort filter called "Shear" in Affinity Photo.
It has good use, because you can control it manually and knowledge about linear equations is no needed.

Unfortunately... this option requires some time, because we need to set the curved lines properly by "trial and error" method.
If you will want to give the same wave effect on another layer, which has a different dimension, then the line will go differently.
You can see these differences on attached image - I made it on a darker background to not strain my eyes.

Best Regards,
Michael

wave-shear.jpg

  • 9 months later...
Posted

@yoroshi, I have just discovered your post. I had not realised that the Distort > Shear filter was so flexible.

I did find though, that that adjusting the points was rather fraught. A tiny movement can have a large effect on the curve, and on the image!

I will need to have a further play with this.

John

Windows 11, Affinity Photo 2.4.2 Designer 2.4.2 and Publisher 2.4.2 (mainly Photo).

CPU: Intel Core i5 8500 @ 3.00GHz. RAM: 32.0GB  DDR4 @ 1063MHz, Graphics: 2047MB NVIDIA GeForce GTX 1050

Posted

Well the whole with bitmaps/rasterization based distortions is generally always a pain here. What would be instead much better and badly needed is some vector based distortion scheme, ideally then in a reusable manner, so that one and the same distortion settings can be reused/applied for other objects too.

☛ 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

Posted

in this distort shear i cannot use formula? looks like no.

makes me tihnk is possible develop such way tool put text to circle element. if is possible allready some other tool i want know.
Ps. these macros are affinity photo only?

AMD 7 7700X 64gigabytes ram 4Tb SSD for all kind projects. Affinity Apps v2 version. Windows 11 Pro.

Posted
On 1/6/2021 at 2:54 AM, MxHeppa said:

in this distort shear i cannot use formula? looks like no.

No, there is nowhere in the Distort > Shear dialogue where you  could enter a formula. If you use Distort > Equations, then you can apply formulae.

On 1/6/2021 at 2:54 AM, MxHeppa said:

Ps. these macros are affinity photo only?

Yes, I am afraid so.

John

Windows 11, Affinity Photo 2.4.2 Designer 2.4.2 and Publisher 2.4.2 (mainly Photo).

CPU: Intel Core i5 8500 @ 3.00GHz. RAM: 32.0GB  DDR4 @ 1063MHz, Graphics: 2047MB NVIDIA GeForce GTX 1050

  • 1 month later...

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.