telemax Posted July 26, 2021 Posted July 26, 2021 Hi, Is it possible to offset pixels along the X and Y axes, using a procedural texture? Quote Non-destructive Mask https://forum.affinity.serif.com/index.php?/topic/150439-non-destructive-mask/ Normal Map Generator https://forum.affinity.serif.com/index.php?/topic/137255-normal-map-generator/ Image layer & Pixel layer https://forum.affinity.serif.com/index.php?/topic/146720-image-layer-and-pixel-layer/ Brushes | Stars https://forum.affinity.serif.com/index.php?/topic/135202-brushes-stars/ Brushes | Arrows https://forum.affinity.serif.com/index.php?/topic/149795-vector-brushes-arrows/
NotMyFault Posted July 26, 2021 Posted July 26, 2021 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 👍🏼 telemax 1 Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K 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. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
telemax Posted July 26, 2021 Author Posted July 26, 2021 Thanks, i was only able to get a white image with offset by one of the coordinates. But I'm trying to move the layer to the side, some distance along X and Y (random offset). Quote Non-destructive Mask https://forum.affinity.serif.com/index.php?/topic/150439-non-destructive-mask/ Normal Map Generator https://forum.affinity.serif.com/index.php?/topic/137255-normal-map-generator/ Image layer & Pixel layer https://forum.affinity.serif.com/index.php?/topic/146720-image-layer-and-pixel-layer/ Brushes | Stars https://forum.affinity.serif.com/index.php?/topic/135202-brushes-stars/ Brushes | Arrows https://forum.affinity.serif.com/index.php?/topic/149795-vector-brushes-arrows/
NotMyFault Posted July 26, 2021 Posted July 26, 2021 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 telemax 1 Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K 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. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
telemax Posted July 26, 2021 Author Posted July 26, 2021 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? Quote Non-destructive Mask https://forum.affinity.serif.com/index.php?/topic/150439-non-destructive-mask/ Normal Map Generator https://forum.affinity.serif.com/index.php?/topic/137255-normal-map-generator/ Image layer & Pixel layer https://forum.affinity.serif.com/index.php?/topic/146720-image-layer-and-pixel-layer/ Brushes | Stars https://forum.affinity.serif.com/index.php?/topic/135202-brushes-stars/ Brushes | Arrows https://forum.affinity.serif.com/index.php?/topic/149795-vector-brushes-arrows/
John Rostron Posted July 26, 2021 Posted July 26, 2021 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 telemax 1 Quote 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
John Rostron Posted July 26, 2021 Posted July 26, 2021 @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: After, with noise*50: John telemax 1 Quote 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
telemax Posted July 26, 2021 Author Posted July 26, 2021 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 Quote Non-destructive Mask https://forum.affinity.serif.com/index.php?/topic/150439-non-destructive-mask/ Normal Map Generator https://forum.affinity.serif.com/index.php?/topic/137255-normal-map-generator/ Image layer & Pixel layer https://forum.affinity.serif.com/index.php?/topic/146720-image-layer-and-pixel-layer/ Brushes | Stars https://forum.affinity.serif.com/index.php?/topic/135202-brushes-stars/ Brushes | Arrows https://forum.affinity.serif.com/index.php?/topic/149795-vector-brushes-arrows/
telemax Posted July 26, 2021 Author Posted July 26, 2021 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. Quote Non-destructive Mask https://forum.affinity.serif.com/index.php?/topic/150439-non-destructive-mask/ Normal Map Generator https://forum.affinity.serif.com/index.php?/topic/137255-normal-map-generator/ Image layer & Pixel layer https://forum.affinity.serif.com/index.php?/topic/146720-image-layer-and-pixel-layer/ Brushes | Stars https://forum.affinity.serif.com/index.php?/topic/135202-brushes-stars/ Brushes | Arrows https://forum.affinity.serif.com/index.php?/topic/149795-vector-brushes-arrows/
NotMyFault Posted July 26, 2021 Posted July 26, 2021 You could try displace filter in combination with a crafted layer Quote Mac mini M1 A2348 | MBP M3 Windows 11 - AMD Ryzen 9 5900x - 32 GB RAM - Nvidia GTX 1080 LG34WK950U-W, calibrated to DCI-P3 with LG Calibration Studio / Spider 5 | Dell 27“ 4K 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. I use iPad screenshots and videos even in the Desktop section of the forum when I expect no relevant difference.
telemax Posted July 26, 2021 Author Posted July 26, 2021 When searching for one solution, there are other interesting effects 😁 NotMyFault 1 Quote Non-destructive Mask https://forum.affinity.serif.com/index.php?/topic/150439-non-destructive-mask/ Normal Map Generator https://forum.affinity.serif.com/index.php?/topic/137255-normal-map-generator/ Image layer & Pixel layer https://forum.affinity.serif.com/index.php?/topic/146720-image-layer-and-pixel-layer/ Brushes | Stars https://forum.affinity.serif.com/index.php?/topic/135202-brushes-stars/ Brushes | Arrows https://forum.affinity.serif.com/index.php?/topic/149795-vector-brushes-arrows/
R C-R Posted July 26, 2021 Posted July 26, 2021 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. John Rostron and telemax 2 Quote All 3 1.10.8, & all 3 V2.6 Mac apps; 2020 iMac 27"; 3.8GHz i7, Radeon Pro 5700, 32GB RAM; macOS 10.15.7 All 3 V2 apps for iPad; 6th Generation iPad 32 GB; Apple Pencil; iPadOS 15.7
telemax Posted July 26, 2021 Author Posted July 26, 2021 I think I was able to get a dependency of A from B. x-noise(x)*w*a*b y-noise(y)*h*b NotMyFault 1 Quote Non-destructive Mask https://forum.affinity.serif.com/index.php?/topic/150439-non-destructive-mask/ Normal Map Generator https://forum.affinity.serif.com/index.php?/topic/137255-normal-map-generator/ Image layer & Pixel layer https://forum.affinity.serif.com/index.php?/topic/146720-image-layer-and-pixel-layer/ Brushes | Stars https://forum.affinity.serif.com/index.php?/topic/135202-brushes-stars/ Brushes | Arrows https://forum.affinity.serif.com/index.php?/topic/149795-vector-brushes-arrows/
Recommended Posts
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.