• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Limit saturation

Community Beginner ,
May 25, 2023 May 25, 2023

Copy link to clipboard

Copied

Hi
I need some help with limiting the saturation of a color node between 0 and 0.8. I know I should use the linear interpolation function, but when I try breaking the color node with swizzle and limiting the 'y' parameter, it doesn't work. Can you show me the solution? Thanks!

TOPICS
How to

Views

76

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2023 May 25, 2023

Copy link to clipboard

Copied

The function needs to output RGBA

So this will do it directly as a function within the uniform color node:

2023-05-25_11-46-48.jpg2023-05-25_11-47-25.jpg

 

 

Alternatively, if you want to do this on an image in a separate node then use the pixel processor

2023-05-25_12-02-30.jpg2023-05-25_12-04-32.jpg

 

Both of these examples just clip the saturation. You could quickly adapt either to interpolate rather than clip.

I hope that helps

Dave

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
May 25, 2023 May 25, 2023

Copy link to clipboard

Copied

Thank you.
In the first method, I have to define 3 parameters but I'm looking for a way to define the color parameter (float4) in a way that just the saturation maximum is limited to 0.8

 

 

2023-05-25 20_28_41-Window.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
May 25, 2023 May 25, 2023

Copy link to clipboard

Copied

LATEST

In my example only the saturation is limited, the hue and value are free to be any value you input.

The HSV controls have to be either on the normal control panel or from a function acting on inputs  which can be exposed in your graph if you wish.  You cannot mix them though.

Dave

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines