Nicolas Sievers

Skin Spikes
Last update: 05/19

Project/Research:

My final is geared toward investigation and beginning implementation of work on a 'spikey shader.' This work is being done in hopes of future use in my thesis as well as Richard Reed's thesis. The description is a little difficult and would be easier explained by Richard, however I will do my best.

The scene will involve a person who is strapped to a hospital bed. Anesthesia is being inject into the patient's arm. The effect that will take place is a representation of the feeling of anesthesia working its way through the bloodstream. The feeling is this needle/spikey/burning sensation. The only analogy I could come up with since I personally have not been given anesthesia is something like the needle sensation when your arm falls asleep.

Here is where the research comes in....How do we accomplish this! Difficult problem to tackle in the main fact that we both want seamless integration with live action.


Initial thoughts and thoughts after some research:

1. Displacement shader that moves up the arm in spikey/needle fashion.

     -Difficulty seems high, especially trying to move shader in s and t space up an arm

     -Also the problem arises that how would this be integrated with live action? Because the shader is applied to a full body mesh not
      just where
the displacement is happening, it can not be composited into live action.

2. How about doing something like the Matrix mirror effect? Instead there is actual geometry that flows up and arm that is composited over live action. A displacement shader could then possibly be applied directly to the traveling mesh, just the mesh could be composited without the arm it is traveling up. Of course in any case a skin texture would have to be replicated so it can integrate with the live action arm. The mesh would also be very thin, it wouldn't have the thickness of the Matrix goo. It would be almost skin tight, for better compositing.

     -How can this be done? Softbodies? Particles? The actual matrix effect was done using Houdini's creep SOP by creeping NURBS
      geometry
geometry over a digital replica of Keanu Reeve's arm. I have used this creep SOP before, so it is a definite possibility.
      Then the shader
would have to be ported to VEX.

3. How about just bracketing the shot such that instead of doing CG integration onto an actual arm, just fully replacing the the arm with a CG arm?
     
-This has possibilities and would be the easier than the other two ideas, does not have the look with the camera position that the
      other two
would have. It would definitely be easier to integrate a full CG arm onto a live action bed, such that it looked like it was
      really there then
placing a displace onto a real arm. Matching the skin tone would not have to be exact.

 

Initial work expanding on research:

I can apply a displacement shader to a soft body, so if softbodies are a possibility in moving up the arm then I can get the spikeyness from a shader. Here are a render: 

  

I felt like no matter what, the displacement shader could be worked into this problem. So I went ahead and worked in Renderman on a shader. This I think could fairly easy be ported into vex if needed. If I can get geometry to do the movement up the arm then, the shader itself would only have to look like it was in motion! So I worked on moving displacement in s and t. My initial work is only using the noise function, so at this point the spikes are not very sharp and there is only one layer. The one on the left is just varying phase. The one on the right is varying phase and frequency. 

  

I already have been taking it to the next step and implementing different types of noise. I will hopefully have some renders up soon. I am also still researching methods of moving 'conformed' geometry up another object. 

UPDATE: 05/10

So I spent the whole weekend researching ways to try and get a displacement to move along a surface. I pretty much came to the conclusion that using particles or softbodies was just going to be too difficult, even though I was finally able to import NURBS geometry into Houdini from Maya using the '.iges' file export. This would allow for the use of the CREEP SOP within Houdini which would go along with initial thought #2 listed above.

I also worked on different methods of noise to generate the displacement for my shader. Had some interesting results some of which are getting closer to what I am looking for, but still a ways off yet. Check out some renders. 

 

Some other ideas I had to accomplish the displacement came from the Renderman documentation. Much of the references to texture projection were very interesting. Especially the tutorial regarding the 'Slide Projector'. This involved projection a texture through a light and within its cone angle. This documentation led me to believe that it might be possible to actually be able to project a displacement on the surface of geometry. As say with the texture and the light, the displacement would only effect the area of the mesh that is within the cone angle. The light would then easily be animated within MAYA to project anywhere on a surface. This would require further work,

 

UPDATE: 05/12

After working with Malcom on Monday(5/10) he came up with a completely different approach from my last thought of displacement projection. This method was much more elegant in the fact that it used a point locator within MAYA to relay a position to the displacement shader by message passing. The point locator could easily be placed anywhere on the intended geometry animated within MAYA. A radius of influence would then be used based off the point locator's position as the center. Anything within the radius of influence would be affected by the displacement. A falloff could also be calculated based on the distance from the center point. With some work by Malcom the shader also takes into account the surface normal. As I found it important that since it is not just a radius of influence but a sphere of influence, it needed to take into account the surface normal. If the sphere of influence was large enough and the geometry being affected was a closed surface having two sides (such as a cylinder or in the case of what I am trying to accomplish an arm) I would not want to displace the second side such as underside of the arm. The following code is used to determine which way the normal is pointing, then this can be used to determine whether or not to displace:

float d = distance(transform(spacename,P),transform(spacename,Ref)); /* where Ref is the reference point used */
normal n = normalize(N);
/* only use a ref thats on our side of the surface */
vector vec = transform(spacename,Ref);

float dot = normalize(transform(spacename, N)).normalize(vec);

Even with this new implementation I would still like to pursue the idea of displacement projection, as I think it would also have its uses.

UPDATE: 05/17

Worked with the displacement to try and at least get it to move across a surface with the wave changing phase in Renderman. Then try and port it to Maya.

After much experimentation I got it to work using Renderman and a .rib file. See the result Maya

 

There is a problem with importing coordinates from MAYA and getting them into the correct coordinate space. I originally had it working from MAYA, with the original I worked on with Malcom. The original render is below. Also with the Slim palette and a screen shot of the motion curve adhered to the surface (click for larger pic) . The curve is placed directly on the surface by using "Make Live" on the cylinder. This allows you to draw a curve on the surface.

The TCL code for getting values from MAYA and to PRMAN is the following:

[expr xyz([mattr "locator1.tx" $f],[mattr "locator1.ty" $f],[mattr "locator1.tz" $f])]   /* which will return the x,y,z location the given locator */

[mattr "locator1.Phase" $f]   /* will return the value of the attribute I created named 'Phase' this value can then be animated */

Looking at this render at first just basically accomplishes the same thing a sculpt deformer can be used for within MAYA. However the shader can be such that it is not just a lump traveling around, but any displacement that you wish to write. So once I get the coordinated working I should be able to apply some of the displacements I have above to the cylinder and move them around. The sculpt deformer alone would not be capable of this.  

UPDATE: 05/19

So then using a basic displacement based on noise with phase addition and a falloff, the example is below. The displacement is based on the following code: 

float ph = phase + noise(.1, 1.5);
float dispSp = sin((s + ph) * PI * 1.2 * freq)*sin((t) * PI * 1.2 * freq);   /* only moves in s direction */

However based on this displacement, if you look at the render closely you will see it only moves phase in the s coordinate direction. So this is something I will have to work on so that its phase moves based on the s and t of the object it is displacing, or the direction of the curve..