Cycles goodies, a .blend containing various group nodes for shading effects (V. 13.5)

http://www.mediafire.com/download/4txzsgyy1mn3j9s/Cycles_nodes_2_65.blend


NOTE: The latest version gives a couple of groups use of the new ‘ray depth’ feature, so you need a build from this month for everything to function properly.

WHY THIS COLLECTION OF GROUP NODES

-The idea is to provide a collection of standalone effects and materials through group nodes to allow people to quickly create common materials like glossies and glass without having to put together an entire node tree for every object. This would also tend to help those new to the Cycles engine due to premade nature of the materials where he only has to place one or more in the tree (perhaps mixing them together as well), and tweak a few settings to get the desired effect during rendering. The other part of the idea is to make the materials fairly generic so they could be used as or part of many different materials, something similar to what you see in the material systems of engines like Luxrender.

This was originally and still is mainly for my personal use, but my list of ideas may assume many different cases that would require a wide assortment of materials and thus more group nodes would be needed to cover them.


USAGE::
Download the .blend above, select append, select the .blend file, and select the node tree data type list to find the list of available group nodes.

One of them is known under the name ‘Light’, while we do have an emission node, the rationale for creating it is simple

Taking in part what Micheal W did to make a light invisible, it was clear that the possibilities of light control was more than just that and I wanted to create a node group to give maximum control over light objects and light materials. This node also greatly reduces the aliasing seen on edges that border a light material or intersect with areas of the image where a light object is by allowing you to ensure that the the maximum RGB value of the light material is less than one (sharply reducing the contrast between pixels which the multi-sampler would otherwise have trouble anti-aliasing)

Options for the light node:

  • LIGHT COLOR: - Same as the normal emission color

  • STRENGTH: - Same as a plain emission node

  • TRANSPARENT: - Make the light transparent, since you can’t create a boolean for a group node option, just set the value anywhere above 0 to make the material use transparency

  • FAC: - Allows you to tweak the visibility of the actual emitting surface without any changes to the amount of light emitted, a value of 0 would make it render as if it used a plain emission node, a value of 1 will make the light invisible if it’s set to be transparent or make the emission surface invisible and the base material visible if not, depending on the power of the emission, you may have to use very high values (lower than 1 but higher than 0.9) to easily see the base material (or a partial transparency if the light is transparent)

  • BASE_MATERIAL: - The base material seen through the emission surface if the Fac value is high enough, is a closure input so it accepts any closure node setup (which allows base materials from glass to rock to mirrors)

Hope you find it useful, it has helped me with my scenes. :slight_smile:

Attachments

Cycles_nodes_2_65.blend (3.79 MB)

Bien que le nœud “Fresnel Blend” de Brecht est là aussi, vous remarquerez également un nouveau groupe de nœuds appelé «Light», la justification de sa création est simple.

LIGHT [LUMIERE]:
Prenant en compte en partie ce que Michael W a réalisé pour faire une lumière invisible, il était clair que les possibilités de contrôle de la lumière étaient plus que juste et je voulais créer un groupe de noeuds pour donner un contrôle maximal sur des objets et matériaux lumineux. Ce nœud permet également de réduire considérablement le lissage des arêtes qui bordent un matériau lumineux ou qui se superpose avec des zones de l’image où se trouve un objet lumineux, ceci en vous permettant de faire en sorte que la valeur maximale RGB de la matière lumineuse soit inférieure à un (réduisant fortement le contraste entre les pixels dont le multi-échantillonnage, autrement, a du mal à lisser).

UTILISATION:
-Ajoutez l’objet “Groupes” à votre scène, ajoutez n’importe quel matériau dont vous avez besoin en tant que lumière (il est recommandé de ne pas utiliser tous les nœuds “plain emission” ailleurs dans la configuration) et modifiez les options suivantes:

  • Light color[Couleur de la lumière]: Idem que la couleur normale d’émission.

  • Strength [Intensité]: Idem qu’un nœud “plain emission”.

  • Transparent [Transparence]: Rend la lumière transparente, puisque vous ne pouvez pas créer une somme d’options de groupe de noeud, il suffit de définir la valeur n’importe où au dessus de 0 pour créer la transparence du matériau.

  • Fac [Facteur]: Vous permet d’ajuster la visibilité de la surface émettrice sans aucune modification de la quantité de lumière émise.

  • avec une valeur de 0, il sera rendu comme s’il utilisait un nœud d’émission ordinaire;

  • avec une valeur de 1, il rendra la lumière invisible.

Si elle est réglé pour être transparente ou pour rendre la surface d’émission invisible et le matériau de base visible, sinon en fonction de la puissance d’émission, vous pouvez avoir à utiliser des valeurs très élevées (inférieures à 1 mais supérieur à 0,9) pour facilement voir le matériau de base (ou une transparence partielle, si la lumière est transparente).

  • Base_Material [Matériau de base]: Le matériau de base vu à travers la surface d’émission si la valeur Fac est suffisamment élevée, est un socket de cloture ainsi il accepte toutes les réglages de noeud de cloture (qui permet des matériaux de base du verre jusqu’à la pierre, jusqu’aux miroirs)

J’espère que vous le trouverez utile, il m’a beaucoup aidé pour mes scènes.

Edit: Thanks a lot, Ace Dragon.

The thread has been changed to one where I share all of the node groups I have created so far. As of now the .blend has been re-uploaded with two new node groups

GLASS:
-Does a wide range of transparent materials including glass.

PARAMETERS

  • Transp Color - the color of the transparency in the material

  • Reflect Color - the color of any reflection in the material

  • Surface Color - the color of the diffuse surface in the material (visible when the opacity is set to less than one)

  • IOR Blend - The fresnal blending between the transparency and the reflection

  • Refractive sharp - the sharpness of the transparency part of the material

  • Reflective sharp - the sharpness of the reflective part of the material

  • Glass IOR - the index of refraction for the transparent part

  • Surface Opacity - controls the visibility between a diffuse surface and a fully transparent/reflective material, a value of one turns it into a simple diffuse material.


SUPER GLOSSY 2:
-May still be a work in progress, works similar to Brecht’s Fresnal Blend node but with more control, more options, and is able to create anything from a perfectly matte surface to a perfect mirror, this group node also has an advantage in that, according to my tests, seems quite a bit less susceptible to a random coloring bug that appears when you assign a colormap to a material that uses a mix between a glossy and a diffuse material.

PARAMETERS

  • Color - The base diffuse color (same as in fresnal blend)

  • Coat - The reflective color (same as in fresnal blend)

  • Roughness - the sharpness of the reflection (same as in fresnal blend)

  • Ref_Opacity - controls the opacity of the reflection, one means it’s fully visible, zero means it doesn’t show up at all, this also affects the general light reflection off the material (making perfect mirrors black), so it should be used in conjunction with the last option listed below or not used at all if you don’t need this extra control over brightness

  • Fresnal Strength - controls how strong the fresnal effect is, one eliminates any changes in reflectance based on angle, zero is a normal fresnal effect with the reflection opacity diminishing as the angle from the camera decreases, below zero starts to eliminate the visibility of the reflection at greater and greater angles until there’s no reflection on faces pointing towards the camera.

  • Fresnal Blend - controls the blending between a completely diffuse material and a fully glossy material, the main option for controlling the visibility of reflections.

Append the object ‘Groups’ into your scene

??? I simply don’t understand. Is it only me? The “group” add (and not append) does not work.
These expressions, is this a kind of advanced user’s language? I don’t get it.
Please try to be more helpful and precise. Not so fast. Some screen captures?
IOR, where is it?

This is great, thanks for sharing it AD.

Michalis, you append datablocks from other blends as usual… in the latest version of cycles when you append and select the blend file you see the contents in a folder structure… you want “node groups”.

In Ace’s blend there are the three he mentions…

Now that you’ve appended them you can use them from the “add” popup from the “groups” section (or if you have an existing closure node selected you can change it to another closure or one of these group closures by changing the “surface” pulldown in the material properties area.

Ace, it’s spelled “fresnel” not "fresnal!!! the first time I thought it was a typo, but you’ve made this mistake so many times in this thread (and in group closure inputs in your node groups!) I had to say something!

UPDATE NO. 2 IS UP::

ADDITIONS:

  • New fresnel contrast options for both the glass and glossy group nodes, this will control the contrast of the fresnel effect, making the blending between angles higher or smaller depending on the value (if it’s above or below one)

  • New option and a change for glass, there is now a base material closure input, you now have to plug in a base material as the diffuse node that stood in for a base material is now removed, but the advantage is now it will accept any material as a base material which the visibility is still affected by the surface opacity value, as a result this also means that the surface color option has been removed (because it would now be set outside of the node)

  • Experimental dispersion and abberation options (dispersion for glass, abberation for glossy) using an updated version of an old trick I’ve seen on this forum for the BI render using red, green, and blue colored glossy and glass nodes to approximate a chromatic effect depending on where the value is set), it seems to work well as is, though there is always work to be done to make it more visible after the image converges.

  • Removed the use of the built in fresnel node for Super Glossy 2 and Glass, it only created a shading bug where you see a circle in front of the camera in many cases, changed the fresnel method in the glass node to my own fresnel calculation setup that was already in the Glossy node which works a lot better from my testing.

NEW NODE; SUPER FRESNEL:
-From my testing, I really didn’t like how the built in fresnel node behaved in many cases, wasn’t actually slope-based, had no real falloff, and only gave me problems (like a circle in front of the camera), so using the geometry node, a couple of vector math nodes, and some math nodes I made my own method which I found much more pleasing, the inputs are.

  • Fresnel Strength - controls the strength of the fresnel effect, higher power means less effect on glancing angles and thus they have to be even less parallel to the camera, negative values do the opposite.

  • Fresnel Blend - controls the visibility of the fresnel effect, zero means the visibility will be very low, if any, one means it’s fully visible

  • Fresnel Contrast - controls the contrast of the falloff, values higher than one mean that the effect between increasing angles will be more pronounced and larger, while smaller values do the opposite, this is best used with the two other settings as they will need to be tweaked as the contrast changes.

While the same options are in the other group nodes, this allows for my improved fresnel effect to be used with any possible setup, I hope it helps all of you who need such an effect.

French Trad.->MISE A JOUR N°2:

AJOUTS:

  • De nouvelles options de contraste du Fresnel pour les groupe de nœuds de verre[glass] et brillant[glossy], celles-ci contrôleront le contraste de l’effet Fresnel, ce qui rend le mélange entre les grands et petits angles en fonction d’une valeur (si elle est supérieure ou inférieure à un)

  • Nouvelle option et changement pour le verre[glass], il y a maintenant un socket de clôture pour le matériau de base, vous pouvez maintenant y brancher un matériau de base en tant que nœud diffuse lequel se trouvait dans un matériau de base est maintenant supprimé, mais l’avantage est que maintenant il acceptera n’importe quel matière comme matériau de base dont la visibilité est toujours affectée par la valeur d’opacité de la surface, ensuite, cela signifie également que l’option couleur de la surface a été supprimé (car elle est maintenant fixée en dehors du nœud)

  • Options de dispersion expérimentale et d’aberration (dispersion pour le verre[glass], aberration pour le brillant[glossine]) en utilisant une version mise à jour d’un vieux truc que j’ai vu sur ce forum pour un rendu BI en utilisant le RVB des nœuds de verre[glass] et de brillant[glossy] pour se rapprocher d’un effet chromatique selon l’endroit où la valeur est définie), il semble bien fonctionner tel quel, mais il y a toujours du travail à faire pour la rendre plus visible pour que converge l’image .

  • Suppression de l’utilisation du nœud Fresnel(par défaut) pour le brillant Super 2 [Super 2 glossy] et verre[glass], il créait seulement un bug d’ombrage où vous aviez un cercle en face de la caméra dans de nombreux cas, et j’ai changé la méthode du Fresnel dans le nœud de verre[glass] pour ma propre configuration de calcul Fresnel qui était déjà dans le nœud brillant[glossy] qui fonctionne beaucoup mieux selon mes tests.

SUPER FRESNEL (Nouveau noeud):
-A partir de mes tests, je n’ai vraiment pas aimé comment la construction du nœud Fresnel se comportait dans de nombreux cas, et n’était pas actuellement basée sur une pente, et n’avait pas d’atténuation réel, et ne m’a donné seulement que des problèmes (comme un cercle en face de la caméra) , ainsi avec l’aide d’un nœud de géométrie[geometry], un couple de nœuds de vecteurs mathématiques[vector math], et certains nœuds de mathématiques [math], j’ai fait ma propre méthode que j’ai trouvé beaucoup plus agréable, les sockets sont:

  • Fresnel Strength [Puissance du Fresnel]: contrôle l’intensité de l’effet Fresnel, une puissance plus élevée signifie moins d’effet sur les angles de la brillance et donc ils doivent être encore moins parallèles à la caméra, des valeurs négatives font le contraire.

  • Fresnel Blend [Mélange du Fresnel]: contrôle la visibilité de l’effet Fresnel, zéro signifie que la visibilité sera très faible, le cas échéant, 1 veut dire qu’il est entièrement visible.

  • Fresnel Contraste [Contraste du Fresnel]: contrôle le contraste de l’atténuation, des valeurs supérieures à 1 veulent dire que l’effet sera de plus en plus plus prononcé et les angles les plus larges, tandis que les petites valeurs feront le contraire, c’est le meilleur à utiliser avec les deux autres paramètres s’ils(la Fresnel?) devenaient tordu quand le contraste change.

Bien que les mêmes options sont dans les autre groupes de nœuds, celui-ci permet à mon effet Fresnel amélioré d’être utilisé avec n’importe quelle configuration possible, j’espère que ça aidera tous ceux qui ont besoin d’un tel effet.

French Trad.: Le fil de discussion a été changé d’emplacement pour partager tous les groupes de nœuds que je créée à ce jour. A partir de maintenant, le fichier .blend a été rectifié avec deux groupes de nouveau nœuds.

GLASS [VERRE]:
-crée une vaste gamme de matériaux transparents comme le verre.

PARAMETRES

  • Transp Color[Couleur de transparence]: la couleur de transparence du matériau.
  • Reflect Color[Couleur de reflexion: la couleur des réflexions du matériau.
  • Surface Color [Couleur de surface:] la couleur de la surface diffuse dans le matériau (visible lorsque l’opacité est réglée à moins d’un)
  • IOR Blend [Mélange IOR (indice de réfraction)]: La variation Fresnel entre transparence et reflet.
  • Refractive sharp [Acuité de la réfraction]: la netteté de la partie transparence de la matière.
  • Reflective sharp ][Acuité de la réflexion]: la netteté de la partie réfléchissante de la matière.
  • Glass IOR [IOR du verre]: l’indice de réfraction de la partie transparente.
  • Surface Opacity [Opacité de la surface]: contrôle la visibilité entre une surface diffuse et un matériau totalement transparent/réflexion. Une valeur de 1 -> il se transforme en un matériau diffuse simple.

SUPER GLOSSY 2 [SUPER BRILLANT 2]:
-C’est encore un travail en cours, comme les travaux de Brecht -> nœud de Mélange de Fresnel, mais avec plus de contrôle, plus d’options, et est capable de créer quelque chose d’une surface parfaitement mate à un miroir parfait, ce groupe de nœud a également un avantage, d’après mes tests, en ce qu’il semble un peu moins sensibles à la coloration d’un bug aléatoire qui apparaît lorsque vous assignez une palette de couleurs à un matériau qui utilise un mélange entre un brillant et une matière diffuse.

PARAMETRES

  • Color [Couleur]: La couleur de base de diffusion (la même que dans “Fresnel Blend”)

  • Coat [Pellicule]: La couleur de réflexion (la même que dans “Fresnel Blend”)

  • Roughness [Rugosité]: la netteté de la réflexion (la même que dans “Fresnel Blend”)

  • Ref_Opacity [Opacité de réflexion]: contrôle l’opacité de la réflexion.
    : 1 veut dire qu’il est entièrement visible,
    : 0 signifie qu’il n’existe pas, cela affecte aussi la réflexion générale de la lumière sur la matière (la fabrication de miroirs noir parfait), il devrait donc être utilisé en conjonction avec la dernière option ci-dessous ou pas du tout si vous n’avez pas besoin de ce contrôle supplémentaire sur la luminosité

  • Fresnal Strength [Puissance du Fresnel]: contrôle la force de l’effet Fresnel.
    : 1 élimine tous les changements de réflexion basé sur l’angle,
    : 0 est un effet Fresnel normal avec l’opacité qui diminue à mesure que la réflexion de l’angle de la caméra diminue,
    : <0 commence à éliminer la visibilité de la réflexion pour des angles de plus en plus grand jusqu’à ce qu’il n’y ai pas de réflexion sur la face dirigée vers la caméra.

  • Fresnal Blend[Mélange de Fresnel]: contrôle le mélange entre un matériau totalement Diffuse et un matériau totalement brillant[Gloss], la principale option pour contrôler la visibilité des reflets.

Update 3 is up with two new group nodes that would be useful for various effects.

HALO:

Allows the creation of a surface material that mimics a halo (mainly usable on spheres), somewhat based on what Micheal W has also discovered with a couple of added controls.

  • Power - Adjust the power of the effect, larger values will decrease material opacity in normals more perpendicular to the camera until the object is invisible

  • Contrast - Adjusts the falloff contrast, would often be used with the power setting.

  • Base Material - that material that makes up the visible part of the halo, can be any material you want


DISTANCE BLEND:

Utilizes a blend texture to adjust an object’s visibility based on the distance to the camera, could be used for mist effects in some cases when applied to every material in the scene mixed with a transparent material.

  • Contrast - Adjusts the falloff contrast, changing the value affects how long it takes for the second material to be completely visible.

  • Offset - Controls when the falloff zone starts, very low values will mean that it’s already started at the camera location, higher values means it starts much further away

  • Mat front - the front material, completely visible before the falloff zone starts

  • Mat back - the back material, only seen after the falloff zone starts

Enjoy the new groups;)

screenshots ?

Done.

Also fixed a glitch in the new distance blend node, switching the math node that does the contrast from power to multiply did the trick.

EDIT: I just figured that the super fresnal group node can perform the exact same effect as the new halo group node with a little more node work, oh well, for those who need a ‘quicker’ way to make a halo.

French Trad.: Mise à jour n°3 avec deux nouveaux nœuds (de groupe) qui pourront être utile pour divers effets.


HALO [LUEUR]:
Permet la création d’un matériau en surface qui imite un halo (principalement utilisables sur des sphères), peu après ce que Micheal W. a également découvert avec une paire de contrôles ajoutés.

PARAMETRES

  • Power [Puissance]: Pour régler la puissance de l’effet, plus la valeurs est grandes, plus l’opacité du matériau diminue sur les normales les plus perpendiculaire à la caméra jusqu’à ce que l’objet soit invisible.
  • Contrast [Contraste]: Pour régler l’intensité de l’affaiblissement, il sera souvent utilisé avec le réglage de la puissance.
  • Base Material [Matériau de base]: La matière qui compose la partie visible du halo, peut être n’importe quel matériau.

DISTANCE BLEND [MELANGE PAR DISTANCE]:
Utilise un mélange de matériau pour ajuster la visibilité d’un objet en fonction de la distance à la caméra.
Dans certains cas, il pourra être utilisé pour des effets de brouillard s’il est appliqué à tous les matériaux dans la scène en mélange avec un matériau transparent.

PARAMETRES

  • Contrast [Contraste]: Pour régler l’intensité de l’affaiblissement, sa valeur représente l’importance de l’écart entre les deux matériaux.
  • Offset [Décalage]: Contrôles la position du début de la zone affaiblissement, des valeurs très faibles signifie qu’il a déjà commencé à l’emplacement de la caméra, des valeurs plus élevées signifieront qu’il commencera beaucoup plus loin
  • Mat front] [Matériau de premier plan][/B: la première matière entièrement visible avant le début de la zone d’affaiblissement.
  • [B]Mat back [Matériau de fond]: la matière du fond, seulement visible au travers de la zone d’affaiblissement.

Profitez de ces nouveaux groupes.

Small update this time, but with a couple of improvements based of what I’ve been needing for scenes I’ve been working on with Cycles.

  • Attempt to improve the results from the distance blend node a bit, one of the improvements is the improved way the offset increases or decreases the distance that the fade starts (which should be much closer to regular blender units)

  • Small utility node, Remove Backfaces, simply gives a short way to make the backfaces invisible, could have various uses using the output of the distance blend node (like removing some depth if you’re wanting to see if it can used for a mist effect)

Trad. French: Petite mise à jour cette fois, mais avec une paire d’améliorations en fonction de ce que j’avais besoin pour des scènes que j’ai travaillé avec Cycles.

  • Pour le Noeud “distance blend” -> Amélioration du décalage[Offset] qui augmente ou diminue la distance à partir de laquelle commence le fondu(qui doit être beaucoup plus courte que les unités standarts de Blender). Ce changement tente d’améliorer un peu les résultats du noeud “distance blend”.

  • Remove Backfaces [supprimer Faces arrière]: C’est un petit noeud utilitaire qui permet simplement de rendre les faces arrière invisible. Il pourrait avoir des utilisations diverses en utilisant la sortie du noeud “distance blend” (par exemple: pour supprimer certaine profondeur, si vous êtes désireux de voir si elle peut servir pour un effet brouillard).

Thought this would be the appropriate place to post this - I’m trying to create a radial brushed metal effect in cycles. I’m certain it must be possible somehow - but I cant really figure it out. Can any cycles nodes experts help ?

examples of what i mean here

this is actually for a live project I’m working on at the moment, so you’d be doing me a massive favour :wink:

Have managed to produce all the other simpler materials i need, but this one element has me a bit stumped at the moment.

thanks!

Ben

Actually - I think i might have nearly cracked it - see below for the node setup if anyone is interested. Its not perfect as the reflection should vary depending on the viewing angle i think, so if anyone can help with that, that would be cool, but for now this is a good start :slight_smile:


To get viewing angle dependent effects you would need to plug the camera coordinates from the texture coordinates node in somewhere (perhaps through one or more vector math nodes), this will make things change depending on where the camera’s pointing.

I am not very good with procedurals, so I tend to cheat with stuff like that, and for the control knobs on an amp I rendered a few weeks back, I simply created a radial bump map. Then let cycles do its thing. Looked terrific. I will see if I can find the map.

http://i189.photobucket.com/albums/z123/bogey61/groovy.jpg

Heres a high res png, but there easy to create.

http://www.pasteall.org/blend/7554

Its really a 7z file. Change the suffix, and un zip.
Use it as you wish.

Wow, thanks, thats really cool! I had got to almost the correct solution I think with nodes, but I think your texturemap will look a lot better, I’ll give it a try

thanks again!