Most Popular Blogs

  1. Houdini Cellular Automata

    Name:  cellanim_wide.gif
Views: 26514
Size:  159.3 KB

    I've translated Malcolm Kesson's Cellular Automata SL into a Houdini VOP RSL Network (no reason). You can find the original SL on his website:
    Main difference is that Houdini VOPs don't support Arrays so I used multiple connections and 8 texture calls instead of a for loop. Let me know if there is some better way of querying neigbours.
    Original shader cell size and count is dependant on micropolgyons and controlled by shading rate. I've set the shading rate to a very high value and the cell count is controlled by geometric subdivision instead. That meant I couldn't use random function for initialization so I replaced it with cellnoise shadeop.

    Name:  cellularNetworkSmall.png
Views: 25613
Size:  88.6 KB

    OTL library contains digital assets:
    • cellular - Object type digital asset
    • bake3d - shadeop for pointcloud baking
    • texture3D - shadeop for pointcloud reading
    • cellnoise - rendermans cellnoise function
    • cellular_automata - VOP node version. Just a direct implementation of the code. Not used for anything.

    Cellular is Object Type Digital Asset that contains shaders, geometry and ROPs for 'out of the box' test.

    Have fun.

    Updated 03-01-2012 at 11:59 PM by Artur

  2. Romanesco broccoli pattern 2D shader

    photo: Romanesco broccoli

    I started playing with fractal shaders and in particularity I wanted to reproduce romanesco broccoli in SL. At first it was just a simple experiment but after each obstacle I got more persistent so eventually I discovered the world of calculus.
    I'm going to skip the theory part about phyllotaxis, Fibonacci etc and get straight to the shader math. Good site that explains it all is:

    Most of the math was found on Wolfram and WikiPedia pages

    First off we need to convert our UVs from cartesian to polar coordinate system

     r = sqrt( pow( x, 2 ) + pow( y, 2 ));

    theta = atan( x, y) + PI;
    // Note that PI offset has been added for polar translation 
    // equation to work (for secondary florets)
    Next, Golden Angle for distribution pattern.

    golden = PI*(3-sqrt(5));
    To draw a secondary florets or a circle on polar coordinates we can use polar translation equations

    r2 = sqrt(r*r-2*r*r0*cos( theta-th0 )+r0*r0);

    Updated 08-26-2013 at 05:13 AM by Artur

  3. Real world sky dome

    Another WebGL experiment with Three.js Real world sky dome lighting and shading:
    Not really finished (nothing ever is) but working features so far are:
    • Physically Based Atmosphere shader
    • Irradiance bake (using three.js IcosahedronGeometry for sampling directions)
    • Blurry reflections
    • Real world sun positioning with Google Maps
    • Cloud cover from Google Maps Weather Layer
    • ...

    And things I'm hoping to add
    • Google Maps WebGL buildings (possible?)
    • Moon and accurate stars
    • Fog, Rain, Snow from Google Weather
    • Cloud animation from Google Weather wind direction
    • Cloud lighting
    • Proper irradiance sampling
    • Sun directional light hack needs proper sampling too
    • Upload source code somewhere useful but currently can be sourced from

    • Bug in Three.js. When normal maps in use, cube reflection map coordinates are wrong. World normals are replaced with view normals and thats incorrect.
    • Only works in Chrome for some reason

    Libraries and source codes used:
    Three.js, Atmosphere Shader, snoise, SunCalc, dat.gui, Google Maps, jQuery, Raphaël

    Updated 05-07-2014 at 01:06 PM by Artur

  4. Shadertoy demo

    Long time no see! I've been busy working on the next 10 Lego movies. But hey, here is my first shadertoy contribution.

    Updated 09-07-2015 at 11:58 PM by Artur

  5. GLSL shading in WebGL

    My first attempt at WebGL using Three.js libraries. Check it:

    Eye shader main features:
    • Texture raytracing to simulate cornea refractions
    • Loads of parameters to customize the eye
    • Cornea vertex displacement
    • Normal maps
    • Reflections
    • Simple image based 'lighting'

    There is still some room for optimization in fragment shader. I feel like, I'm doing too many space transformations at the end. Also, I couldn't figure out how to access gl_ModelViewMatrixInverse in vertex shader so modelViewMatrix gets inverted in the vertex shader. Recalculating normals of displaced vertices is also questionable. I'm planning to add cat eye shape and caustics.

    Environments from and
    Eye textures from and Lukas Hajka

    Images processed with Photoshop and Crazybump

    Updated 02-24-2014 at 10:36 PM by Artur