rainbow material

Hey I made something that looks like this.


Respective blend file:http://www.pasteall.org/blend/38085

The question is can this be done so that the colours blend into one another?

Why the <1 fresnel values? Why not use a color ramp controlled with a facing and plugged into a single shader? Or the ramp based OSL shader if OSL is an option.

Don’t know how.

Btw, are those the colors you actually want to use? Like, green and red in two locations.
If not, and you want a more “spectrumy” look, you could try mapping a curved layer weight/facing into a wavelength->RGB node. I believe rainbows have been discussed here before, but I may have a look into it when I get home.

Colours in this scenario really have no significance.
The interest is to have a blending happening.

Just as CarlG suggested: Use a Layer Weight > Facing node to drive a Color Ramp



The interplation type of the Color Ramp determines the softness of the transition. The part in the red box is the important one, the rest is just for a bit of glossiness on the sphere.

An alternative is to use the radial gradient texture - and run this through a colour ramp. That way you can have the rainbow mapped onto a flat surface easier than you can for layer weight.

An alternative is to use the radial gradient texture - and run this through a colour ramp. That way you can have the rainbow mapped onto a flat surface easier than you can for layer weight.

You know what would be an awesome addition to the colour ramp. Instead of specifying the colours at each point using RGB values - it would be good to be able to use the wavelength or black body value instead.

On Ikari’s image, you don’t actually need to have all those color stops, you can just define a starting hue and a stopping hue and switch the interpolation mode to use the hue value (as opposed to ‘RGB’).

nice tip ace dragon.

Just another alternative - “rainbow” by varying hue before CombineHSV node:



Sine function could go into V and will darken the extremes. Could possibly be fed through a power of math node to sharpen or soften the curve.

And another one - “rainbow” by Wavelength converting fed by UV’s U component (teapot is unwrapped):



Ideally I would use a custom fLerp node rather than a color Mix since I’m only working with numbers at this stage.

Volumetric emission rainbow:


it looks nice for a volume

how do you make the arch ?
is it thick volume ?

tried set up for get horizontal lines instead !

thanks
happy cl

Ricky, he used an object with a spherical gradient texture (which is basically done by changing a setting in the gradient texture node).

He then follows it up by scaling the width of the texture down a bit and then map the colors on using a ramp (finalizing it by using an emission volume).

Now the shape of the object is a simple rectangular prism, because that’s the only type of volume you need.

beginning to get something looking like pic shown

but still requires some fine tuning

thanks
happy bl

Yep - what Ace said.

Default cube scaled to make it thin - the rest is done by the gradient texture, mapping node and colour ramp.

you seem to have a clear render

but my test are blurred !

anyway to make it sharper ?

thanks
happy bl

Attachments


Your cube is too thick.

what size should the cube be ?
2 X 2X 0.1 may be ?

I tried but then I loose the curvature

thanks
happy bl