Results 1 to 5 of 5
  1. #1

    Five Input Add Shader with Noise Factor

    Five Input Add Shader Node

    This node is a highly customizable and can be used for a plethora of different materials. Combined with other techniques within the node editor it can morph into awesome shaders quickly and simply. The node itself is made up of extremely straightforward OSL code. Five inputs are allowed along with five factor inputs all adding together and coming out one output. There also is a noise factor value. The code itself could be changed so that there could be a thousand inputs and it still would all just add together and not mix. Below are some example setups that took a matter of minutes to create. It is very useful in creating advanced car paints, metal, glass, etc. Please post any questions, improvements, critiques. The concept was based on Gottfried Hofmann’s Tutorial. I hope you enjoy this script as much as I do! Also below is the code and blend file. Feel free to post anything you do with the script!




    https://www.dropbox.com/s/ah7nmf9u7b...Download.blend




    Code:
    #include "stdosl.h"
    
    shader node_FourAddValues(
    
    float Fac1 = 0.2,
    
    closure color Closure1 = 0,
    
    float Fac2 = 0.2,
    
    closure color Closure2 = 0,
    
    float Fac3 = 0.2,
    
    closure color Closure3 = 0,
    
    float Fac4 = 0.2,
    
    closure color Closure4 = 0,
    
    float Fac5 = 0.2,
    
    closure color Closure5 = 0,
    
    float Noise_Factor = 1.0,
    
    output closure color Closure = 0
    
    )
    
    {
    
    
    Closure = Fac1*Closure1 + Fac2*Closure2 + Fac3*Closure3 + Fac4*Closure4 + Fac5 * Closure5 * mix(1.0, noise(P * 10.0), Noise_Factor);
    
    }
    6_zps1bc25a91.png

    Link to more pics- http://blenderartists.org/forum/show...put-Add-Shader

    Enjoy,

    Phoenix
    Last edited by PhoenixSmith; 22-Mar-13 at 09:29.



  2. #2
    Hi Phoenix,
    Looks really nice, thanks a lot for sharing, but the link to your blend is broken.



  3. #3
    Thanks! It should be fixed now. Enjoy!



  4. #4
    Really valuable work! Thanks for the great script. I will definetly be using this for my next metal shader!



  5. #5
    Thanks! I hope it helps you.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •