Lisbon Posted December 19, 2021 Share Posted December 19, 2021 Been trying to get a better understanding of the procedural texture functions, but I don't know how some of them work. In particular: - Vector creation: tovec3 - Vector utilities: debump - Stepping: mapcui, smoothstepsini - Quantisation: All of them Any help on any of these functions would be appreciated. It can be a url. I don't mind. Quote Link to comment Share on other sites More sharing options...
NotMyFault Posted December 19, 2021 Share Posted December 19, 2021 Let me try: mapcui (lower, upper, runner) if runner<=lower: 0 if lower<runner<upper: linear interpolation from 0 to 1 if runner>upper: 1 See historgram play with lower / upper slider smoothstepsini (lower, upper, runner) if runner<=lower: 0 if lower<runner<upper: sinus interpolation from 0 to 1 if runner>upper: 1 Lisbon 1 Quote 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. My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected. Link to comment Share on other sites More sharing options...
NotMyFault Posted December 19, 2021 Share Posted December 19, 2021 tovec3: I did not get this to work. Probably defunct. Quote 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. My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected. Link to comment Share on other sites More sharing options...
NotMyFault Posted December 19, 2021 Share Posted December 19, 2021 quantize (steps, smoother, runner) steps: create 1/n steps, e.g 1/2: 2 steps, 1/3: 3 steps smoother: 0: hard steps, 1: max soft steps, in between: linear interpolation of smoothness example shows 3 steps (0/3, 1/3, 2/3). note that 3/3 is excluded! same with max smoothness: The other quantizers differ in the kind of smoothness function Lisbon 1 Quote 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. My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected. Link to comment Share on other sites More sharing options...
NotMyFault Posted December 19, 2021 Share Posted December 19, 2021 Here the test file to play / experiment with PT filter explained.afphoto Quote 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. My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected. Link to comment Share on other sites More sharing options...
NotMyFault Posted December 19, 2021 Share Posted December 19, 2021 debump: More info can be found here: https://stannum.io/blog/0IwyJ- https://www.pluralsight.com/blog/film-games/bump-normal-and-displacement-maps bump maps normal maps displacement maps Please keep in mind that Affinity seems to treat bump maps in displacement filter different than other apps. So the information given in the linksmay not apply to Affinity's special interpretation. Bump maps are used either in lighting filter (works great) or in displacement filter (this is kind of strange according to more experienced users, incompatible with Photoshop). Lisbon 1 Quote 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. My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected. Link to comment Share on other sites More sharing options...
Lisbon Posted December 19, 2021 Author Share Posted December 19, 2021 Thanks a lot NotMyFault. This is a great help. 1 hour ago, NotMyFault said: mapcui (lower, upper, runner) if runner<=lower: 0 if lower<runner<upper: linear interpolation from 0 to 1 if runner>upper: 1 You are right. The help file misled me: mapcui(T v, T edge0, T edge1) 1 hour ago, NotMyFault said: smoothstepsini (lower, upper, runner) if runner<=lower: 0 if lower<runner<upper: sinus interpolation from 0 to 1 if runner>upper: 1 Maybe, but im not sure NotMyFault. smoothstepsin (without the "i" at the end) does what you described. On my pc, smoothstepsini doesn't do anything regardless of the values i input. Maybe a bug, i dont know. 1 hour ago, NotMyFault said: tovec3: I did not get this to work. Probably defunct. The only thing i can do with tovec3 is this: var v1=vec2(0.5); tovec3(v1) [RGB all selected] This will make the R=0.5, G=0.5 and B=0 But im sure im using this wrong. 1 hour ago, NotMyFault said: quantize (steps, smoother, runner) steps: create 1/n steps, e.g 1/2: 2 steps, 1/3: 3 steps smoother: 0: hard steps, 1: max soft steps, in between: linear interpolation of smoothness example shows 3 steps (0/3, 1/3, 2/3). note that 3/3 is excluded! The other quantizers differ in the kind of smoothness function I definitely had no idea what I was doing. That posterize effect was exactly what I was hoping to get when using this function. 1 hour ago, NotMyFault said: debump: More info can be found here: https://stannum.io/blog/0IwyJ- https://www.pluralsight.com/blog/film-games/bump-normal-and-displacement-maps I will read that. Again, thank you NotMyFault. (Almost there. Only ~400 functions left) NotMyFault 1 Quote Link to comment Share on other sites More sharing options...
NotMyFault Posted December 19, 2021 Share Posted December 19, 2021 The documentation of procedural texture is really not on par with elementary quality standards. I tried multiple times to get more information, raised feature request, never get anything substantial answer from Affinity. Essentially all trial and error. tovec3 lead always to non-funktional filter (showing no effect). It does not show red text (indicating syntax error), only no effect. Today i found in CMYK that you cannot use K channel as input value, and filed a new bug report. Quote 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. My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected. Link to comment Share on other sites More sharing options...
Lisbon Posted December 19, 2021 Author Share Posted December 19, 2021 15 minutes ago, NotMyFault said: Essentially all trial and error. Exactly what I am doing. Testing and searching the web. It's not easy and it takes a lot of time. 15 minutes ago, NotMyFault said: Today i found in CMYK that you cannot use K channel as input value, and filed a new bug report. yes. I read your post this afternoon. (No K is not OK) NotMyFault 1 Quote Link to comment Share on other sites More sharing options...
NotMyFault Posted December 20, 2021 Share Posted December 20, 2021 13 hours ago, Lisbon said: Maybe, but im not sure NotMyFault. smoothstepsin (without the "i" at the end) does what you described. On my pc, smoothstepsini doesn't do anything regardless of the values i input. Maybe a bug, i dont know. Yeah a bug with smoothstepsini The functions ending on "i" are "inverse", see example for smoothstepcr[i] below. The white area in the middle is caused by the chosen parameters b and c which do not overlap. In case of b=c, you get the inverse as nothing is excluded. Lisbon 1 Quote 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. My posts focus on technical aspects and leave out most of social grease like „maybe“, „in my opinion“, „I might be wrong“ etc. just add copy/paste all these softeners from this signature to make reading more comfortable for you. Otherwise I’m a fine person which respects you and everyone and wants to be respected. Link to comment Share on other sites More sharing options...
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.