latimeriasdream Posted October 18, 2023 Posted October 18, 2023 I am looking for something like a threshold, but with a fine control where i can say any pixels with a R value greater than 50, set the R value to 0 or some specified value. Seemed like the procedural texture made sense but i can not figure out how to do this. Quote
walt.farrell Posted October 18, 2023 Posted October 18, 2023 If you haven't seen these tutorials, they might help: https://forum.affinity.serif.com/index.php?/search/&q=Procedural Absolute beginners&type=forums_topic&quick=1&nodes=9&search_and_or=and&sortby=relevancy Or another user may be along who can help. thomaso 1 Quote -- 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.3.1, Apple Pencil 2, Magic Keyboard Mac: 2023 M2 MacBook Air 15", 16GB memory, macOS Sequoia 15.0.1
v_kyr Posted October 18, 2023 Posted October 18, 2023 6 hours ago, latimeriasdream said: I am looking for something like a threshold, but with a fine control where i can say any pixels with a R value greater than 50, set the R value to 0 or some specified value. Seemed like the procedural texture made sense but i can not figure out how to do this. R in the sense of red channel color value, or an x coordinate value? - See also related ... (ah Walt already pointed to some tuts about that theme). AFAIK and what I always see as a problem for such things is, if you can't make use of any supported conditional expressions (if/else, equals ==, >=, <= ... etc.). Thus peronally I prefer to do such things in scripting + programming languages which offer much more capabilities and flexibility in this regard. https://stackoverflow.com/questions/69213814/how-to-change-the-value-of-one-rgb-channel-in-python-with-cv2 https://pythonexamples.org/python-opencv-extract-red-channel-of-image/ https://stackoverflow.com/questions/59320564/how-to-access-and-change-color-channels-using-pil ... etc. walt.farrell 1 Quote ☛ 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
latimeriasdream Posted October 18, 2023 Author Posted October 18, 2023 R as in the red channel, x just being a random number. I would like to stay in affinity instead of scripting for art direction, I want the ui and ux of affinity, not having to juggle things from the command line. Quote
thomaso Posted October 18, 2023 Posted October 18, 2023 21 minutes ago, latimeriasdream said: I would like to stay in affinity instead of scripting for art direction, I want the ui and ux of affinity, not having to juggle things from the command line Doesn't your request for "something like procedural texture" imply a kind of " juggle things from the command line"? wikipedia: "In computer graphics, a procedural texture is a texture created using a mathematical description" In addition to Walt's link to a bunch of tutorials done within Affinity here is one more: Quote macOS 10.14.6 | MacBookPro Retina 15" | Eizo 27" | Affinity V1
latimeriasdream Posted October 18, 2023 Author Posted October 18, 2023 In my case scripting is very inefficient because I'm working with fine details, a few pixels of tolerance while also needing to assign colors and develop how they look. So having a live viewport is very important. Basically i am taking a black and white image doing things like assigning colors and detecting edges from between certain value ranges. The procedural texture doesn't seem to have any options for conditional statements so i was hoping someone had come up with the math or another solution. Quote
lepr Posted October 18, 2023 Posted October 18, 2023 (edited) Set red value to 0 where red value is less than r (8-bit integer): R = step(r/255, R)*R Edited January 1 by lepr noticed error in formula latimeriasdream 1 Quote
latimeriasdream Posted October 18, 2023 Author Posted October 18, 2023 Thank-you! This is exactly what i was looking for. lepr 1 Quote
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.