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

Procedural textures : How can I read pixel data from arbitrary pixels


Recommended Posts

Is this possible with procedural textures code? Say the procedure is currently operating on pixel (1,2) but I want to know the red values of the pixels at (1,1) ánd (1,3) - how do I get that data?

Is there any sort of array structure I can use to store and index a lot of different values?

Can I directly access the pixel data of the image as an array?

Also is there a way of shifting the entire image or perhaps the current row/column by n pixels procedurally (like "affine" but in code)?

If not then please consider this a feature request.

Edited by skitchy
Link to comment
Share on other sites

  1. You could use the Colour Picker Tool (i) in conjunction with the Info Panel, View > Studio: Info Panel this will read out location data and colour information. https://affinity.help/photo/English.lproj/pages/Panels/infoPanel.html 
  2. The only Array I can think of would be to create a colour palette from the image. https://affinity.help/photo/English.lproj/pages/Panels/swatchesPanel.html
  3. With regards to Affine but in code, you have Filters > Distort: Equations... and also Filters > Colours > Procedural Texture and you have Procedural Texture... as a Live filter on the Layer panel. You also have the Affine Filter under Filters > Distort: Affine 

iMac 27" 2019 Somona 14.3.1, iMac 27" Affinity Designer, Photo & Publisher V1 & V2, Adobe, Inkscape, Vectorstyler, Blender, C4D, Sketchup + more... XP-Pen Artist-22E, - iPad Pro 12.9  
B| (Please refrain from licking the screen while using this forum)

Affinity Help - Affinity Desktop Tutorials - Feedback - FAQ - most asked questions

Link to comment
Share on other sites

You can shift pixels using Filters > Distort > Equations, with a similar effect to the Affine Transform (Filters > Distort > Affine), but I cannot see how to use these equations in a Procedural Texture (and I have tried).

The equations I used were:

x=   irem(x+a*w,w)
y=   irem(y+b*h,h)

I have  posted a thread in the Resources forum describing a macro to do this.

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

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.