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

Equations - a general comprehensive overview?


Recommended Posts

Hello there,

 

in the tutorials equations are mentioned a few times, like in the Macros videos. But there is no general overview of the functions that I am aware of - for instance, relative to noise the video mentions that there are 4 different noise generators but I didn't find specific explanations as to possibilities using equations.

 

Is there anything? I'd be glad to go through it...

Link to comment
Share on other sites

Plus to that. When I was writing my resize macros I had trouble finding the right information. I found it under Field Entries! I found that the only circumstance where Equations work reliably is in Filter > Distort > Equations. In the Transform panel, you can appy an equation in the fields, but the resulting value is then fixed. This means that if you enter an Equation in the Width field, then if you wish to refer to the Width in the Height field, it uses the new width, not the original width!

I aim to have a little project to explore the Equations faciity in Affinity and report back in the Tutorials forum.

Perhaps the Mods could confirm that Equations are on their to-do list for Transform and for Document > Resize.

 

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

In the tutorial "Macros: Equations" there is mention of different noise algorithms available in the equations - I would be glad if these (and everything else possible with equations) could be subject to a tutorial or online paper sometime. :-)

 

Link to comment
Share on other sites

It is a complete list, but it is lacking in how to  to use them effectively. I have been focussing on the mathematical expressions at the end, for which it says: For general use throughout the user interface! As I mentioned above, these seem to work only in the Distort > Equations filter.

My first exploration of these has been the sine function sin(x). So far, I have got it to work, but with unexpected scaling effects. I will be reporting further on this.

BTW, I tried the Noise function, and it appears to have no effect whatsoever! Perhaps it would help if there were some documentation.

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

8 hours ago, Jurgen said:

... for instance, relative to noise the video mentions that there are 4 different noise generators but I didn't find specific explanations as to possibilities using equations.

Is it just something I am doing wrong or has anyone else noticed that the Noise2 expression always is displayed in red & does not work in Filters > Distort > Expressions, while the other 3 do?

 

11 minutes ago, John Rostron said:

BTW, I tried the Noise function, and it appears to have no effect whatsoever!

Assuming there are pixels present in the targeted layer, all but Noise2 have some effect when I try them, although the results are hard for me to predict. Some (not particularly useful) expressions to try:

 

x= x*noise(w,y)

y= y*noise(h,x)

 

x= x

y= y*noise(y*a)

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

Try this one. (see image)
Use the slider to adjust the effect from 0 - 100

@R C-R

noise2 does not appear to work but more surprisingly noise5, noise6, and noise7 all work

 

 

noise.jpg

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Link to comment
Share on other sites

1 minute ago, carl123 said:

noise2 does not appear to work but more surprisingly noise5, noise6, and noise7 all work

Because I am too lazy to find out for myself, do Noise5, etc. do anything different visually from (for example) Noise1 or Noise4?

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

5 minutes ago, R C-R said:

Because I am too lazy to find out for myself, do Noise5, etc. do anything different visually from (for example) Noise1 or Noise4?

There is no Noise1 and I don't cater for lazy, you need to do your own testing :)

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Link to comment
Share on other sites

12 minutes ago, carl123 said:

There is no Noise1 and I don't cater for lazy, you need to do your own testing :)

One of the reasons I asked (besides being lazy, of course) is Noise7 does not work for me -- like with Noise2, it shows up in red & has no effect. A related reason is I do not know if this might have anything to do with the other terms in an expression you have tested but I have not.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

15 minutes ago, R C-R said:

One of the reasons I asked (besides being lazy, of course) is Noise7 does not work for me

Brilliant, you see what happens when you test for yourself, you discover an error in my previous post.  Now you only need to test noise5 and noise6 to see what they do differently (if anything?)

To save time I am currently using an automated AI to reply to some posts on this forum. If any of "my" posts are wrong or appear to be total b*ll*cks they are the ones generated by the AI. If correct they were probably mine. I apologise for any mistakes made by my AI - I'm sure it will improve with time.

Link to comment
Share on other sites

@carl123, this is an interesting artistic effect. It should be worth while exploring the possibilities and documenting them in a Tutorial.

2 hours ago, John Rostron said:

My first exploration of these has been the sine function sin(x). So far, I have got it to work, but with unexpected scaling effects. I will be reporting further on this.

I have found that the unexpected scaling effect is because Equations expects the parameter in degrees, and I was using radians! Again, there is no documentation on this. I will post a  couple of images shortly.

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

Here are a couple of applications of SIn to the Severn Bridge in the Mist:

The first is the original image.

The second has the y-coordinate set as y+30*sin(2*360*x/w)

The third has the y-coordinate set as y+20*sin(9*360*y/h)

SevernBridgeMist800.jpg

SevernBridgeMist800Sin1.jpg

SevernBridgeMist800Sin2.jpg

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

34 minutes ago, carl123 said:

Now you only need to test noise5 and noise6 to see what they do differently (if anything?)

But even if I take considerable time to do that, I can't be sure if the results are different enough to notice. As it is, even for some of the simpler expressions there are no noticeable differences when I change from one of the noise expressions to another one, or the differences only are apparent on some document sizes and/or ones with different pixel content.

 

As John said, the expressions documentation is inadequate, particularly for the distortion filters. That should be obvious, if from nothing else than what you have discovered about higher dimension noise expressions or what I did about Noise2 not working at all.

All 3 1.10.8, & all 3 V2.4.1 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7
Affinity Photo 
1.10.8; Affinity Designer 1.108; & all 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7

Link to comment
Share on other sites

I have posted a more extensive tutorial on using trig functions in the Tutorials section. So far I only include using sines, but I will add more.

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 years later...

Tweaking John Rostron's warping equation above, I been able to produce a Warped Glass Texture which has potential for artistic and graphic design purposes.

Cartesian

Radians

x+(200*c)*sin(360*x/w)*a

y+(200*c)*sin(360*y/h)*b

Extend=mirror

C paramater controls the warp complexity.

I have attached a macro of the 360 version of the filter578651501_WarpedGlassFilterEquations360.JPG.4f6d12310ea309969d6beefcde7beef3.JPG1051313120_WarpedGlassFilter45.JPG.64e6f716dc667fad5eb5d19d48b8df79.JPG578651501_WarpedGlassFilterEquations360.JPG.4f6d12310ea309969d6beefcde7beef3.JPG

Reduce 360 parameter to 270, 180, 90, 45 gives increasingly larger areas of warping, each of which could be saved as a macro. You can also use higher number than 360 to get increasingly dense textures. When using as a macro the a, b & c parameters are only adjustable (click on the cog icon) BEFORE clicking the play macro arrow.

Warped Glass Filter.afmacro

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.