Help needed with trigonometric functions

Started by alessandro, January 14, 2014, 06:48:31 am

Previous topic - Next topic

alessandro

Hello, I was wondering I'd you actually build a b/w gradient or a range of values between [0-PI] to be fed to a sin/cos or other trig functions.
I ask this because I'd like to experiment how to add some trig effects to existing terrains, so that for example, if you have a PF with a stretched X scale and some color offset that turns it into b/w stripes, I'd like to add some sin wave effect to those.
Thanks for any help.

Matt

The trig functions in Terragen work with radians. Cos and Sin should take values between 0 and 2*PI (approximately 6.283), and Tan takes values between 0 and PI. Values outside these ranges wrap around of course.

Matt
Just because milk is white doesn't mean that clouds are made of milk.

Matt

Just because milk is white doesn't mean that clouds are made of milk.

alessandro

Thanks Matt, but how would you actually have a sin scalar, say ranging from 0 to PI, and use it as the input on a Merge Shader? I mean, how do you provide a specific input range to a Sin Scalar node?