THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 05/05/2011 at 03:26, xxxxxxxx wrote:
Cinema 4D Version: 12
Platform: Windows ;
Language(s) : C++ ;
I am using the C4DNoise class to affect the shape of geometry in my plugin. I know that in a material that the user has the option to adjust the brightness of the noise. How is this achieved? what aspect of the noise is being adjusted when the user changes the brightness? Any help would be greatly appreciated.
On 05/05/2011 at 05:06, xxxxxxxx wrote:
I'm not sure but I think about this:
The values are mapped. For example you're obtained Noisevalue is 0.7.
You want to bright it up by 50 %. The Range of the noise changes for 0 - 1 to 0.5 - 1.
Your new value would be 0.85
brightness = 0.5
min = 0
max = 1
value = noise.GetValue()
value = (value*(max-min-brightness)+min+brightness)
On 05/05/2011 at 05:51, xxxxxxxx wrote:
ah I see... Thanks Nux95,
I will try it out when I get home today.
On 06/05/2011 at 05:32, xxxxxxxx wrote:
Worked like a charm. Thanks again!