Kristen Eggleston
  • Demo Reel

Displacement Shaders

2/13/2013

 
The basic displacement function is:

public void displacement(output point P; output normal N)
{
      //initialize m_shadingCtx variable just in case it had been used before
      m_shadingCtx->init();

      //assign m_hump variable based on wavelet noise
      exampleVariable = something_To_Make_It_Change_Like_A_Map

      //displace based on m_hump
      m_shadingCtx->displace(vector(normalize(N)),exampleVariable, "displace");

      //reinitialize m_shadingCtx
      m_shadingCtx->init();
}

Which creates the sphere on the right. If the last "m_shadingCtx->init();" is omitted, the shader turns into a toon shader like the one on the left! Hooray for experimentation!
Picture

Comments are closed.

    Categories

    All
    Accidents
    Cool Tricks
    Houdini
    Shaders

    Archives

    March 2013
    February 2013

    RSS Feed

Proudly powered by Weebly