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

Recommended Posts

Hi,

Is it possible to offset pixels along the X and Y axes, using a procedural texture?

Pixels_Offset.png.44e78992c8c9147d86e405876aa26515.png

 

Link to comment
Share on other sites

Not fully sure how to interpret your question, but i hope my reply covers all possible interpretations;-)

  • PT expressions can contain coordinates like x,y, rx,ry, ox,oy. Using r or o as prefix gives you the option to drag an offset my mouse, but 
  • PT expressions can contain RGBA values (or CMYK / LA/LB etc depending on color format), but
  • these values are always bound to the pixel position.
  • To my knowledge, you cannot „read“ the RGB value of another position in PT filters.
  • As a limited workaround, you may use „apply image“: It allows to access exactly two layers (called source and dest), and if you move one layer according to your offset, you can blend the RGB values of two layers.
    This workaround is limited to a fixed offset for all pixels of the layer, and destructive usage.

If you raise a feature request adding this functionality to Photo, i will be more than happy to add my vote 👍🏼

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Thanks, i was only able to get a white image with offset by one of the coordinates.

pt-test.png.e0203830311fca043bbf608f7250a16c.png

 

But I'm trying to move the layer to the side, some distance along X and Y (random offset).

 

Link to comment
Share on other sites

i don’t thing  that PT filter is able to move pixels. 
 

Equations filter will do what you need. Unfortunately there is no live version available

https://affinity.help/photo/English.lproj/pages/Filters/filter_equations.html

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Thanks, it works in Equations. I made an offset of 500 pixels.
Does anyone know if it is possible to make a shift by a random number of pixels, within the limit?

eq_test.png.b4ba73fdaac0054fa69b1e2e5cca9515.png

Link to comment
Share on other sites

Equations does not have an expression for random numbers. It has a noise expression, but I still have not yet worked out what it does to an image. You could try something like:

x=x+noise(x,y)

y=y+noise(x,y)

If you just want an offset, you could try the Affine Transform.

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

@telemax, I have just tried this on an image.  You need to multiply the noise function by around 20 to 100 to get any useful effect. It does produce quite a nice random artistic effect though.

Original:

Before.png.65d54bbc6af28fa6fa55aa047b89c6d4.png

After, with noise*50:

After.png.e98d40cb098e6074ceb920129e2f0119.png

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

Thanks, I checked it out. x+noise(x,y) and y+noise(x,y) create small noise on the image, including image edges.
It also works x-noise(x,y) and y-noise(x,y)

a little explanation

image offset works more simply, x-50, y-50 or x+50, y+50

 

Link to comment
Share on other sites

1 hour ago, John Rostron said:

You need to multiply the noise function by around 20 to 100 to get any useful effect. It does produce quite a nice random artistic effect though.

Wow it really cool effect! But I just wanted to offset a lot of selected layers, in random X and Y directions.

 

Link to comment
Share on other sites

You could try displace filter in combination with a crafted layer

Mac mini M1 A2348 | Windows 10 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080

LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5

iPad Air Gen 5 (2022) A2589

Special interest into procedural texture filter, edit alpha channel, RGB/16 and RGB/32 color formats, stacking, finding root causes for misbehaving files, finding creative solutions for unsolvable tasks, finding bugs in Apps.

 

Link to comment
Share on other sites

Link to comment
Share on other sites

4 hours ago, John Rostron said:

You need to multiply the noise function by around 20 to 100 to get any useful effect.

FWIW, instead of a number, using w in the x equation & h in the y equation, plus Parameter A & B multipliers seems to work well regardless of document dimensions. So something like this:

x= x+noise(x,y)*w*a

y= y+noise(x,y)*h*b

Changing the Extend Mode to Wrap or Mirror is also interesting.

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

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.