Dual material with CVS-Blender ... How ?

Hi, I try to build a new material which blends from one material to another material in dependence of either the amount of light falling on it or the view angle. Unfortuantely I have no success until now. I read the Material nodes tutorial and reference but … I would be very happy for a hint or trick to achieve this effect. kind regards, mcc

That’s pretty straightforward.

You need a stencil material node that is e.g. dependent from the energy. Therefore you could use a Ramp Shader, Input Methode either set to “Energy” or to “Result”. Adjust the colorband as you see fit, but use only black/white values, since you need an intensity value as result.

Use the Ramp Shader Material Node (“Color” output) as input for ‘‘Fac’’ of a Mix node. Blender will automatically insert a RGB->value converter node.

Use the other two materials you would like to blend as inputs for the color inputs of the Mix node.

That’s it.

Attachments



Thank you very much for your help, soylent_gr !!! I will try this as soon the compilation of the new CVS-snapshot (yes, I am a CVS-blender-junkie :wink: has ended its work. One question: How can I make the blending form one to the other material dependant of the viewing angle ? Keep hacking noodles! :))))) mcc

Well, just use Input “Normal” for the Ramp Shader, or use a radial blend texture, Input Type “Nor”, Z/-/-. Be aware of the fact, that this ist not really the viewing angle, but the camera angle. So it works well with spheres, and bad with large planes.

You could also try and use fresnel transparency, this should avoid the aforementioned problem.

It may be that the new shading options will also lead to a good solution for that, but before I go and play with that, it would like to see at least some documentation on it.

Hi soylent_gr, me again…sorry. I git some probnlems with the first part of the noodles experiment… From previous tries to create the desired material (which failed) I had a material node with two matrial combined via a mix operator. “Fac” is set to 0.5 and the result is feed into an output node. So far, so nice. Now… I added another empty material node , pressed “add new” and created a pure white material with colr ramps bound to energy and the described color ramp. The color output is fed over a rgb->bw converter to the “fac” input of the mixer node. All this works nice … in the preview. BUT: The real render is statical. Regardless how I partition the color ramp or whether I choose “energy” or “normal” or whatever…the render does not change. It is definetly different from what I get when rendering without the nice trick you described…but… Do I have to attach the additional material to the object or to the lamps (???) in any way or what is going wrong here ? (or is it a current bug in the CVS of this morning?) Unfortunatly I have no webspace so I cannot feed any files or pics into this list… Any ideas ? Have a nice weeklend! mcc

Heureka, I found it!

The fresnel trick is absolutely great, and very promising. This gives true viewing angle dependent materials.
Send me a private mail with your e-mail address, and I will send you the blend files.