top of page

Non Photorealistic Shading:

Simian Virus

The goal of this project is to recreate geometries that are intended to mimic the "look" of images recorded by a scanning electron microscope. Rendered using the PxrOcclusion integrator, my scene is shaded through the use of Open Shading language and "lit" from procedural shading techniques.

Final Renders
npr_render1.jpg
npr_render2.jpg
npr_render3.jpg
Camera Depth of Field Test
Directional "Light" Test
Reference

Electronic Microscope image of the simian virus is used as a reference and inspiration for this project. Noticeably, the virus pathogen has a unique cauliflower shape. (Some artistic refining were taken in order to enhance the look of the final product.)

simian virus.jpg
Basic Geometry

- rendered using PxrVisualizer Integrator -

visualizer.jpeg
OSL Shading Process

A. Edge Node

shader

SEM_502_Edge

[[

int rfm_nodeid = 11,

string rfm_classification = "rendernode/RenderMan/pattern",

string help = "Brief description goes here."

]]

(

    color base = 1,

    color edge = color(1,0,0),

    float strength = 1,

    output color resultRGB = 0,

    output float resultF = 0)

{

    vector i = normalize(I);

    vector n = normalize(N);

    float angle = 1 - fabs(dot(n, -i));

    resultRGB = mix(base, edge, pow(angle, strength));

    resultF = angle - 0.5;

}

B. Noise Node

shader

SEM_502_Noise

[[

int rfm_nodeid = 12,

string rfm_classification = "rendernode/RenderMan/pattern",

string help = "Brief description goes here."

]]

(

    string spacename = "object",

    float freq = 0.5,

    int octaves = 3,

    int creases = 0,

    output float resultF = 0)

{

    point p = transform(spacename, P);

    int n;

    float result;

    float F = freq;

    float amplitude = 1;

    for(n = 0; n < octaves; n++) {

        result = noise("perlin", p * F)/amplitude;

        resultF += result;

        F *= 2;

        amplitude *= 2;

    }

    if(creases > 0)

        resultF = 1 - abs(resultF);

}

C. Hilite Node

shader

SEM_Hilite(

    color base = 1,

    color edge = color(1,0,0),

    float strength = 1,

    vector hilite_direction = vector(0,0,-1),

    string spacename = "world",

    output color resultRGB = 0)

{

    vector dir = transform(spacename, hilite_direction);

    vector hd = normalize(dir);

    vector n = normalize(N);

    float d = fabs(dot(n, -hd));

    resultRGB = mix(base, edge, pow(d, strength));

}

testimage.jpeg
bottom of page