Sin wave ramp with shader mixer
![wprinz_43fe1596d7](https://secure.gravatar.com/avatar/86278edbc2d7a36eb770110124356757?&r=pg&s=100&d=https%3A%2F%2Fvanillicon.com%2F86278edbc2d7a36eb770110124356757_100.png)
I want to create a material surface that has stripes, say white and black (or light gray & dark gray) but have the two colors ramp in a sinusoidal way (light dark light dark etc.) so if you moved a light meter across it, you would get a sine function. I can make solid stripes (with checkers) and rotated them, change them in different ways (e.g., frequency, phase, amplitude), but I can't figure out how I can ramp the white to black in a sinusoidal (gradual) way. (Think of a boring tie-dye t-shirt.) I see that there is a sin function, but I can't figure out how to use it. If it’s the first brick is sin (going from right to left, left most is a surface brick, what should the sin function be connected to? In one tutorial I found, a color ramp 2 was mentioned but I can't find a brick with that name. I kind of think the output of the sin should go to some kind of ramp brick, or the math "mix" brick, but I can't figure it out. I have spent about a week on this nonstop and look at all the shader mixer tutorials I could fine. The "square wave" (abruptly white black white black with checkers) is only 4 bricks (surface, default material, checker, rotator) the sinusoidal surface mixer can't be that much more difficult. I have also tried waves 2d and waves 3d but they are problematic. (Oh, I am on a Mac so can't use iRay )-= I am using Daz Studio 4.10.
Comments
Hi! Didn't find any sine function but using the 2d wave you may get what you want. Quick test:
Inserted the mix brick:
Oh btw, I wasn't at my regular DS computer so this was in DS 4.7, maybe the sine brick has been added, I'll check out later;)
Wow, both responses for my request for a sine wave shader, they look great. If you find the sin function (brinks > functions > mathematical > standard functions, it would be even more cool because it would insure that the waves are (more or less) true sine waves. Plus it would be good to know how to use the math functions.
Its for a vision science experiment and those guys care about such things. I basically tried the same 4 bricks but had wrong parameters or something wired wrong. Oh, I see part of my error, too stupid to admit.
Deep thanks to both of you for coming up with solutions. They get better and better. I probably should have posted my question earlier,