Jump to content

Recommended Posts

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.

Link to comment
Share on other sites

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

image.thumb.png.330f4fd04d837b8bac26b2077d682673.png

smoothstepsini (lower, upper, runner)

  • if runner<=lower: 0
  • if lower<runner<upper: sinus interpolation from 0 to 1
  • if runner>upper: 1

image.thumb.png.01520486174dc79a2686beca0f310aa6.png

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

tovec3: I did not get this to work. Probably defunct.

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

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!

image.thumb.png.537ceb6adec8833ec93f79feb59d8cca.png

same with max smoothness:

image.thumb.png.9fc6caaf40a073e412299ea8cbbbfcf8.png

The other quantizers differ in the kind of smoothness function

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

Here the test file to play / experiment with

PT filter explained.afphoto

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

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).

 

 

 

 

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

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:

I will read that.

Again, thank you NotMyFault.

(Almost there. Only ~400 functions left)

 

Link to comment
Share on other sites

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.

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

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)

Link to comment
Share on other sites

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.

image.thumb.png.48f80b9a1dc867952c0fcfa0321a2466.png

image.thumb.png.9bb49598288f698a719f793651d4c211.png

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

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.