Using More Than Three Colors

Basic Scene Setup
Add a simple plane and a sphere. Add a light and ensure that it casts shadows. Finally, position the camera appropriately.

Setting Up Basic Surface
Select the Material Editor adn add a Color, Shaderlab shader. Bring up its interface and pick fBm from the Enhance:TS - Noise section. Make Color1 Red (1.0, 0.0, 0.0), Color2 Yellow (1.0, 1.0, 0.0) and Color3 Green (0.0, 1.0, 0.0). Now we want a transition red to yellow to green so set Blend1 to 0.0, Blend2 to 0.25 and Blend3 to 0.5. This means that the color, based on the fBm texture function, will start red transition to yellow and then to green for the majority if the object. This is shown in the image to the left.

Adding More Colors
Now imagine that you wanted to have more colors. Well, these can be added using a reflectance shader. To do this add a Reflectance Shaderlab Shader, bring up its interface can pick fBm from the Enhance:TS - Noise section. What we are going to do is overlay the reflectance colors so that the underlying, already applied, color shows through and we add some more on the top. First off, Make Color1 Green (0.0, 1.0, 0.0), Color2 Cyan (0.0, 1.0, 1.0) and Color3 Blue (0.0, 0.0, 1.0). Then make Blend1=0.5, Blend2=0.75 and Blend3=1.00. This means that the color, based on the texture function, will be mostly green and then transition to cyan and finally blue. Now, as the texture functions are identical if we made the green transparent for the reflectence shader the underlying color shader would show through and we would get a five color transition (red, yellow, green, cyan, blue). To do this first set up an Alpha Map by setting Alpha1 to 1.0, Alpha2 to 0.0 and Alpha3 to 0.0. Then make the Layer parameter 1.0. The means that the layering will use the Alpha Map which starts off at 1.0 making the color transparent up until 0.5. This allows the underlying color to show thorough. Next,the color transitions to cyan and the Alpha Map to 0.0 making the color increasing opaque giving the blend green to cyan. Finally, the color goes cyan to blue and is totally opaque. The result is shown on the left a five color texture.


Home Order About Pricing Mail Previous Next Back