Technical

Computer grpahics

  1. Shader Toy

    What? GPU raytracing in your web browser? Yes, check out Shader Toy by Inigo Quilez.



    Most likely you will need to install WebGL which took me a few minutes to figure out what it is and where to find it. Eventually got it running on my Mac's Safari and Chrome. Nightly builds can be found here

    Once up and running you will find a library of 2D and 3D sample shaders.. Some well known fractals and demo-scene implementations. Great place to play around and learn about shaders or math.



    Actually reminds me Paul Falstad's page. Lots of Java apps to play around. Atom visualization, waves interference, math, physics, electronic circuitry. Probably one of my favorite toys. Nerdgasmic!

    Categories
    Technical
  2. 3D Scan

    Friend of mine started a little scanning service in Brisbane and I had a chance to check out the tech. Even got myself scanned.



    It's a relatively simple system that captures 3D geometry in a single shot using 4 DSLR cameras.



    Most of the work is actually done after images are captured. Once high resolution images are downloaded onto computer, software analyzes 4 images by triangulating pixel and pattern shifts in 3D space

    There are number of papers and projects describing how it all works in more detail. Check out his site at 3dfacelab.com

    Software and projects based on the same tech:
    http://www.photosculpt.net
    http://labs.autodesk.com/utilities/photo_scene_editor

    Updated 01-27-2011 at 06:38 AM by Artur

    Categories
    Technical
  3. So you like fractals?


    Or maybe Broccoli fractal in Renderman?

    Ok, let's not get ahead of ourselves. Simple 2D Mandelbrot shader is a good start for mortals like me

    Code:
    /*
     * MRmand.sl -- Mandelbrot texture
     *
     * DESCRIPTION:
     * Creates a Mandelbrot set as a texture
     *
     * PARAMETERS:
     * Ka, Kd, Ks, roughness - the usual
     *
     * HINTS:
     *
     * AUTHOR: Michael Rivero
     * rivero AT squareusa DOT com 
     *
     * History:
     * Created: 12/18/98
     */
    
    
    surface MRmand (
     float Kd = .5,
           Ka = .1;
     float maxiteration = 500;
     float useUV = 0.0;
    )
    {
     float lt;
     float ls;
    
    /* Map the U and V values to the bounds of the Mandelbrot set. */
    
     if(useUV != 0.0)
     {
      lt = v;
      ls = u;
    /* printf("lt = %f  ls = %f\n",lt,ls); */
     }
     else
     {
      lt = t;
      ls = s;
    /* printf("lt = %f  ls = %f  pre correction   ",lt,ls); */
      ls = mod(ls, 1.0);
      lt = mod(lt, 1.0);
    /* printf("lt = %f  ls = %f post correction \n",lt,ls);  */
     }
    ...

    Updated 12-10-2010 at 12:20 AM by Artur

    Categories
    Technical
  4. Lets talk fur - Kajiya Kay

    I've spend (or wasted) half a decade on projects involving some sort of furry/feathered creatures. Happy Feet, Where The Wild Things Are, Legend of the Guardians and Happy Feet 2. So, fur shading is going to be my first subject. I will start with a simple Kajiya Kay implementation in 3Delight. Safe to say that majority of hair shaders are using this model. From real-time hair shaders on GPUs to every project I've worked on. It's fast and relatively easy to understand.

    Code:
    //======================================
    / diffuse component of the shading model
    //======================================
    color KajiyaKayHairDiffuse( vector T; )
    {
            // Accumulate incoming radiance from lights in C
            color C = 0;
            extern point P;
            illuminance( P )
            {
                    // Must declare extern L & Cl because we're in a function
                    extern vector L;
                    extern color Cl;
                    float nondiff = 0;
                    lightsource( "__nondiffuse", nondiff );
                    if( nondiff < 1 )
                    {
                            vector LN = normalize( L );
                            C += ( 1 - nondiff ) * Cl * sin( acos( T.LN ) );
                    }
            }
            return C;
    }
    
    //======================================
    // specular component of the shading model
    //======================================
    color KajiyaKayHairSpecular(
    ...

    Updated 11-23-2010 at 02:17 AM by Artur

    Categories
    Technical
Page 2 of 2 FirstFirst 1 2