1. Interior shader for The Great Gatsby

    In 2013 I worked on The Great Gatsby, recreating New York of the mid 1920s. One of the tasks was to develop a shader that simulates the parallax of interior walls behind thousands of building windows. In short, its a simple texture raytracer. In fact it was quick and simple enough for a CgFx port so that artists can have an instant feedback when setting it up.

    It was presented at an Autodesk event by our Lighting Lead and featured in Digital Media World interview:

    “A custom shader we developed was a hologram shader for buildings. Since we didn't have time to model interiors for every building in Manhattan, surfacing artist Artur Vill took an idea from video games, starting from our flat windows and shop fronts and letting us dial in parameters for room depth, wallpaper variation, interior lights, curtains - all from a shader that worked correctly in stereo. Viewers barely notice it in the final shots, but would definitely notice if it wasn't there, and just accept that all the windows have a proper room behind them.”

    Full article

    Updated 08-20-2015 at 08:55 AM 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. 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