Colormap Blur
eharetea

An attempt to blur a displacement.

A .vfl file that generates fun displacements.

Date Created:Friday December 29th, 2006 03:41 AM
Date Modified:Tuesday July 29th, 2008 08:47 PM

Original displacement with no blur:


Colormap Blur - www.3daet.com


/*
*
* This adds uv's based on s & t if there are no uv coordinates
*
* Author: Dan Lynch
*
*/


#pragma hint path image
#pragma hint uv hidden
#pragma range h 0 1
#pragma label h "Height"
#pragma hint switcher toggle
#pragma label switcher "Blur"
#pragma label d "Distance"
#pragma range d 0 0.12
#pragma label samples "Samples"
#pragma group Blur switcher samples d
#pragma disable d switcher 0
#pragma disable samples switcher 0

displace
d_disp 
        (
        float h=0.1;
        string path "Mandril.pic";
        export vector uv 0;
        int switcher=0samples=5;
        float d=0.1;
        )
{

        wo_space(P);
        wo_nspace(N);

        float u;
        float V;
        if (!isbound("uv")) {
            s;
            t;
        } else {
            uv.x;
            uv.y;
        }

        vector var;
        if (switcher) {
                var = vector (colormap(path,ddddddddsamples"filter""gaussian"));
        } else {
                var = vector(texture(path,u,V));
        }

        P+=normalize(N)*var*h;

        P=ow_space(P);
        N=normalize(computenormal(P,N,Ng));
}


Colormap Blur - www.3daet.com

Colormap Blur - www.3daet.com

Colormap Blur - www.3daet.com

Colormap Blur - www.3daet.com


Downloads:
Download: colormap_blur.vfl 1 KB

Please login or Click Here to register for downloads
Creative Commons License
Colormap Blur by Dan Lynch
is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 United States License
Based on a work at www.3daet.com
Permissions beyond the scope of this license may be available at http://www.3daet.com