Page 14 of 20 FirstFirst ... 41213141516 ... LastLast
Results 261 to 280 of 390

Thread: OSL Goodness

  1. #261
    Member Meta-Androcto's Avatar
    Join Date
    Aug 2006
    Location
    australia
    Posts
    4,048
    hi all!
    Some great osl news!
    The online matlib (in contrib addons) ((by petercassetta)) now supports osl shaders & node trees!!
    Initially I'm looking for contributions that can start off the osl texture & shader presets!

    Charlie
    niverik2k
    elbrujodelatribu
    varkenvarken & all the contributors in this thread are welcome to participate!
    Would you like to help set up the osl materials?
    Thank's to petercasseta for such a great job
    Can you donate your materials & i'll set them up.. (could be scary)
    Example osl/node tree saved & loaded by the addon
    Attached Images Attached Images



  2. #262
    Hi,

    could someone help me to make the voronoi animateble?
    For that the 3D Voronoi will need a time parameter to add a 4th dimension to the noise.

    The OSL Voronoi in SVN:
    http://projects.blender.org/scm/view...&pathrev=52894
    Includes:
    http://projects.blender.org/scm/view...&pathrev=52894

    The only helpful link I can find ist this one:
    http://mines.lumpylumpy.com/Electron...se/Voronoi.php
    There he explains how to get from 2D to 3D.
    But how can I adopt it to the Voronoi OSL texture?

    Any hints or tips?
    "Civilizations are not remembered by their bankers or lawyers. They are remembered by their artists." - Eli Broad



  3. #263
    Originally Posted by Meta-Androcto View Post
    hi all!
    Some great osl news!
    The online matlib (in contrib addons) ((by petercassetta)) now supports osl shaders & node trees!!
    Initially I'm looking for contributions that can start off the osl texture & shader presets!

    Charlie
    niverik2k
    elbrujodelatribu
    varkenvarken & all the contributors in this thread are welcome to participate!
    Would you like to help set up the osl materials?
    Thank's to petercasseta for such a great job
    Can you donate your materials & i'll set them up.. (could be scary)
    Example osl/node tree saved & loaded by the addon
    Ok, PM me if you have any questions or if you would like to see any particular node setups. I'll keep posting on my forum shaders as I get them. A good undertaking would be to port some of the Renderman header files over, such as noises.h or pattern.h, etc. If they were then included with cycles, that would be very good and useful.



  4. #264
    Hi Meta,

    you are more than welcome to use any or all of the shaders I have posted on this forum or on http://blenderthings.blogspot.nl/

    Not all will easily fit the models from the sample scene so if you need help let me know.

    cheers
    Check out my new add-on, IDMapper, or the other ones on my Blender Market store.
    There you will also find my e-books 'Creating Add-ons for Blender', 'Open Shading Language for Blender' and the new 'Blender Add-on Cookbook'.
    Main blog: http://blenderthings.blogspot.com



  5. #265
    @Conz3d: the voronoi implementation is actually in node_texture.h (include in the shaders dir). There you will find it uses OSLs cellnoise funtion to generate points (3-vector). If you need another component you could rewrite this routine to fill arrays of length 4 instead of points (but remember to offset your position in the argument to cellnoise otherwise this extra component is correlated).

    But of course I am not sure how you want to animate your voronoi in time. Another approach would be to warp the input coordinates (with the mapping node) in a such a way that it is not a simple translation but that warps the x,y,z components in some weird bu reproducible way.
    Check out my new add-on, IDMapper, or the other ones on my Blender Market store.
    There you will also find my e-books 'Creating Add-ons for Blender', 'Open Shading Language for Blender' and the new 'Blender Add-on Cookbook'.
    Main blog: http://blenderthings.blogspot.com



  6. #266
    Originally Posted by varkenvarken View Post
    But of course I am not sure how you want to animate your voronoi in time. Another approach would be to warp the input coordinates (with the mapping node) in a such a way that it is not a simple translation but that warps the x,y,z components in some weird bu reproducible way.
    I want to animate it like the gif in my link, but mapped on a 3D object with object coordinates.
    http://mines.lumpylumpy.com/Electron...oise/Cells.gif

    If I use a simple translation on a sphere, than you would see the movement eg. in the z-axis. I want to use it on a Sun-Sphere. For that I would need a 4D animation. Where the 4th dimension is the time. The same as the 4D Perlin noise.

    How would you fill 4D Arrays in OSL? I don't have the math knowledge and voronoi understanding, that I could expand it with an 4D array instead of points.
    "Civilizations are not remembered by their bankers or lawyers. They are remembered by their artists." - Eli Broad



  7. #267
    Member Bao2's Avatar
    Join Date
    Aug 2009
    Location
    Galicia - Spain
    Posts
    4,832
    Meta-Androcto, all I posted is to do with it absolutely what anyone wants. No credit or nothing is necessary.
    >>> Neytiri WIP <<<
    When explanations are complex you know there is no Truth on it.
    Tangled Fan Art



  8. #268
    @Conz3D:

    this works for me, noodle:

    animatedvoronoi.png

    Code:
    #include "stdosl.h"
    shader mix(
        point a = P,
        float m = 0,
        output point v1=a,
        output point v2=a+vector(1,0,0),
        output float f=0
    ){
        f = mod(m,1);
        //printf("%.2f %.2f\n",m,f);
        float mm = floor(m);
        v1=a+vector(mm,0,0);
        v2=a+vector(mm+1,0,0);    
    }
    the value node in the noodle is animated (two keys, with extrapolation linear).
    the output of the script node is two vectors, offset by one and a mix value varying between 0 and 1 The two vectors keep a constant value while the mix value varies. The vectors are input for voronoi textures, the mix values blends their output. This whole setup works because cellnoise (and therefore voronoi textures) are not correlated when you shift positions, so there is no need for a fourth dimension,

    the whole business is attached as a zipped .blend
    Attached Files Attached Files
    Last edited by varkenvarken; 13-Dec-12 at 15:16. Reason: added zipped blend with animation
    Check out my new add-on, IDMapper, or the other ones on my Blender Market store.
    There you will also find my e-books 'Creating Add-ons for Blender', 'Open Shading Language for Blender' and the new 'Blender Add-on Cookbook'.
    Main blog: http://blenderthings.blogspot.com



  9. #269
    Member Ray Tungsteen's Avatar
    Join Date
    Jun 2011
    Location
    the emitter plane
    Posts
    160

    OSL slowing down renders?

    Now that 2.65 is out, I've done some quick render timing tests. As soon as I turn OSL Shading on in the render settings, renders take almost twice as long as with GPU compatible mode (even though I'm using CPU only). That's without any OSL shaders actually being used. What a bummer, and I was so keen on this. I can't afford such slowdowns.



  10. #270
    Member
    Join Date
    Mar 2012
    Location
    France
    Posts
    286
    I don't know if someone have already fade the simple fake SSS in OSL.
    Here it is mine.
    #include "stdosl.h"
    shader node_advancedAdd(
    float strenght = 0.5,
    color Base_Color = 0,
    color Absorbtion = 0,
    output color Color = 0
    )
    {
    float raylength;
    getattribute("path:ray_length", raylength);
    float backface = backfacing();
    Color = mix(Base_Color,Absorbtion,pow(M_E,-1*strenght*raylength*backface));
    }
    Last edited by kgeogeo; 13-Dec-12 at 16:54.



  11. #271
    Originally Posted by niverik2k View Post
    Ok, PM me if you have any questions or if you would like to see any particular node setups. I'll keep posting on my forum shaders as I get them. A good undertaking would be to port some of the Renderman header files over, such as noises.h or pattern.h, etc. If they were then included with cycles, that would be very good and useful.
    Seems like an excellent idea as I'm sure that for many shaders we are recreating the same functions.
    Charlie

    ArtRage for Art ¦ EnergyXT for Music ¦ Blender for 3D



  12. #272
    Originally Posted by Meta-Androcto View Post
    hi all!Some great osl news!The online matlib (in contrib addons) ((by petercassetta)) now supports osl shaders & node trees!!Initially I'm looking for contributions that can start off the osl texture & shader presets!Charlieniverik2kelbrujodelatribuvarkenvarken & all the contributors in this thread are welcome to participate!Would you like to help set up the osl materials?Thank's to petercasseta for such a great job Can you donate your materials & i'll set them up.. (could be scary) Example osl/node tree saved & loaded by the addon
    Anything I post can be added or shared.
    Charlie

    ArtRage for Art ¦ EnergyXT for Music ¦ Blender for 3D



  13. #273
    Member Ace Dragon's Avatar
    Join Date
    Feb 2006
    Location
    Wichita Kansas (USA)
    Posts
    28,541
    Originally Posted by Ray Tungsteen View Post
    Now that 2.65 is out, I've done some quick render timing tests. As soon as I turn OSL Shading on in the render settings, renders take almost twice as long as with GPU compatible mode (even though I'm using CPU only). That's without any OSL shaders actually being used. What a bummer, and I was so keen on this. I can't afford such slowdowns.
    I'm think this is where patience is advised, one of Brecht's todo items for 2.66 is optimizations for the OSL shading mode, so he is aware of the fact that OSL mode is currently a bit slower and will be working to improve the situation.
    Sweet Dragon dreams, lovely Dragon kisses, gorgeous Dragon hugs. How sweet would life be to romp with Dragons, teasing you with their fire and you being in their games, perhaps they can even turn you into one as well.
    Adventures in Cycles; My official sketchbook



  14. #274
    Member LiquidApe's Avatar
    Join Date
    Jul 2008
    Location
    Atlanta, GA
    Posts
    1,058
    [QUOTE=Charlie;2256405]Texture maker. Sorry no decent images at present. Please muck around.

    This has two outputs to create a texture and the halftone pattern based on the threshold. It also outputs the x/y texture independently.

    With the current restrictions on the interface it is difficult to group everything properly.
    [QUOTE]

    It's a Las Vegas Casino Carpet generator!



  15. #275
    Member Jonathan L's Avatar
    Join Date
    Aug 2011
    Location
    Seattle, Washington
    Posts
    1,715
    Hey, sorry to make a request and not a contribution, but do you think this could be made with OSL? This would really help me immensely on an upcoming job, and I have found it very useful in the past. I know it used to be in some builds of Blender, but I guess it never got officially accepted.

    I will try to learn OSL, but for now it is way over my head.
    Check out my portfolio and tutorials.



  16. #276
    Originally Posted by varkenvarken View Post
    @Conz3D:
    the whole business is attached as a zipped .blend
    Thank you for your commitment. But it doesn't look like a 4D animation.
    With 4D it would look like boiling fluid, or bubbles coming out of the surface.
    With your solution it looks like blending two voronois. At 0.5 you loose all contrast, darkest gray is 0.5, 0.5, 0.5. Looks like it is pulsing.

    Thank you for trying to find a solution.
    "Civilizations are not remembered by their bankers or lawyers. They are remembered by their artists." - Eli Broad



  17. #277
    Originally Posted by LiquidApe View Post

    It's a Las Vegas Casino Carpet generator!
    So true! Or a 70s wallpaper generator.
    Charlie

    ArtRage for Art ¦ EnergyXT for Music ¦ Blender for 3D



  18. #278
    Originally Posted by Jonathan L View Post
    Hey, sorry to make a request and not a contribution, but do you think this could be made with OSL? This would really help me immensely on an upcoming job, and I have found it very useful in the past. I know it used to be in some builds of Blender, but I guess it never got officially accepted.

    I will try to learn OSL, but for now it is way over my head.
    I am pretty sure something like this could be done with OSL. It is just a lot of different noises put together. I am not sure which noises are put together to make that shader myself, but it looks useful. You have to use the experimental feature set to make true displacement work at the moment, but Brecht says that it is his next thing to do. You can see some of the displacement shaders I use in action on some of my posts, like the dented.osl displacement shader with the osl watermelon shader.

    Since OSL is so new, and a lot of the established material teach OSL in reference to shader writers wsitching over from Renderman, I think you might find it easiest to just get a book and learn Renderman for 3delight. This book, "Essential Renderman" is a great book, and will give you a frame of reference to understanding the programming language.
    Last edited by niverik2k; 14-Dec-12 at 03:04.



  19. #279
    Originally Posted by Conz3D View Post
    I am talking about the Displacement in the cycles shader (Bump), not the displacement on vertex level (like the modifier).

    For 3d Studio max there was a plugin for that (f-edge), only bump on the sharp edges:
    Attachment 205675

    The middle "f" has no additional faces, only the generated bump-map.
    When I use dirty vertex colors it looks fine, when I use the AO/Dirt from Bao2s OSL shader nothing is happening when I plug it into the displacement socket...



  20. #280
    Member elbrujodelatribu's Avatar
    Join Date
    Dec 2009
    Location
    Sevilla - Spain
    Posts
    466
    Originally Posted by Meta-Androcto View Post
    hi all!
    Some great osl news!
    The online matlib (in contrib addons) ((by petercassetta)) now supports osl shaders & node trees!!
    Initially I'm looking for contributions that can start off the osl texture & shader presets!

    Charlie
    niverik2k
    elbrujodelatribu
    varkenvarken & all the contributors in this thread are welcome to participate!
    Would you like to help set up the osl materials?
    Thank's to petercasseta for such a great job
    Can you donate your materials & i'll set them up.. (could be scary)
    Example osl/node tree saved & loaded by the addon
    Hi Meta-Androcto, you can use all my materials and node setups for the matlib. If you need blend of bcm files, tell me and I will upload them to pasteall.

    Here is another fractal code, Julia Sets:

    Code:
    #include <stdosl.h>
    
    shader node_julia_zn_zoom(
        float Zoom = 10.0,
        vector Vector = P,    
        float CenterX = 0.0,
        float CenterY = 0.0,
        int MaxIterations = 31,
        int Exponent = 2,
        float SeedX = -1.25,    
        float SeedY = 0.0,    
        float Bailout = 2.0,
        output vector Transformed = P,
        output float Fac = 0.0)
    {
        point p = Vector/(2*Zoom);
        float factor = 0.0;
        float auxiliar = 0.0;
        int i = 0;
        int j = 0;
        int prevIteration = MaxIterations;
            
        // Start Mandelbrot fractal    
        p[0] += CenterX;
        p[1] += CenterY;
        
        // C = pixel    
        point pa = p;
        point pb = p;
        point pc = point(0.0);
        
        do
      {
          // z^j
          for(j=1; j<Exponent; j++)
          {
            pc[0] = pa[0]*pb[0] - pa[1]*pb[1];
            pc[1] = pa[0]*pb[1] + pa[1]*pb[0];
            // for next product
            pb[0] = pc[0];
            pb[1] = pc[1];
        }
        // z^exponent + c
        pa[0] = pc[0] + SeedX;
        pa[1] = pc[1] + SeedY;
          pb[0] = pa[0];
          pb[1] = pa[1];
              
        i++;
        if ((prevIteration == MaxIterations) && (sqrt((pa[0]*pa[0]) + (pa[1]*pa[1])) > Bailout))
        {
            prevIteration = i + 1;
        }        
        } while (i < prevIteration);
    
        // Colorize
        //factor = float(i) – (log(log(sqrt((Vector[0]*Vector[0]) + (Vector[1]*Vector[1])))) / log(2.0));
        factor = float(i);
        auxiliar = sqrt((pa[0]*pa[0]) + (pa[1]*pa[1]));
        factor = factor - (log(log(auxiliar))/log(Bailout));
        factor = factor / float(MaxIterations);    
      
        Fac = factor;
        Transformed = pa;
    }
    You can mix with Mandelbrot fractal to produce something like this:
    osl_mandelbrot_z2_travel17.jpgosl_mandelbrot_z2_travel25.jpgosl_julia_fractal2_m125.jpg

    Hi res links:
    First
    Second
    Yo fuí a Blendiberia 2013

    elbrujodelatribu - blog / deviantart / blendswap / sketchbook



Page 14 of 20 FirstFirst ... 41213141516 ... LastLast

Posting Permissions

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