How to Create "Wedge" Partial Shaders

New in ShaderSpider 1.2

"Cheetah -DC -B" FX6" Partial Shader (created in tutorial)

Partial shaders (FX6 files) let you save and load branches of the shader tree. They're very quick ways to reproduce effects, while preserving your other settings. A partial shader has the ability to "wedge" itself between a node and any inputs that the partial shader is using. For instance, you can have a partial shader connect a texture map to one of the partial shader's inputs (rather than Diffuse_Color). Here's a step by step example:

1) Add figure to the scene with desired starting materials.

I'm going to start out with David 3 using his standard texture maps (which I've applied from a MAT pose). Go into the Material Room and select the "SkinTorso" material.


2) Change the skin to golden-brown and add spots.



We'll start work on the effect by using nodes to change the look of the texture. Create an "hsv" (Hue-Saturation-Value) node, and hook the texture map into its "Color" input. Change the hue to shift the colors on the texture towards yellow. Now, create a "Spots" node, with dark brown spots on white. Next, to combine the spots and the map, create a "Color_Math" node and set it to Multiply. Plug the Spots into one of the "Value" inputs, and the HSV into the other. Plug the Color_Math node into the Diffuse_Color, and you have the adjusted texture.

3) Add fur to the bump.



Now to change the bump. First, create an "fBM" node. When you squish the node horizontally by scaling down the X-Axis, you get a furry look. Make other adjustments as you see fit. To combine the fBM with the bump map, create a "Math_Functions" node and set it to Muliply. Plug the bump map into one value and the fBM into another to combine them.

You should use a Math_Functions node when you're working with black and white images, but you should use Color_Math if you need to keep colors intact. A good rule of thumb to remember which node to use: If the input is a number, use a Math_Functions node. If the input is a color, use a Color_Math node. You can mix and match, but Math_Functions converts images to black & white, and Color_Math takes up a little bit more render time.

4) Disconnect maps and save the FX6.


The maps were useful in planning out the partial shader, but now it's time to save the effect, and including the maps in the FX6 makes it less useful and less portable. Instead, you'll set the FX6 to automatically connect the maps it finds to the right places.

Poser 6's Material Room includes a new feature called "Wacros" that lets you execute time-saving Python scripts from a convenient menu. The Wacros palette is located on the right hand side of the materials palette (you can collapse it and expand it just like the Library). By default, Poser has a full roster of wacros and the "User Defined" menu button. Clicking on the "User Defined" button will pop up a menu with "ShaderSpider" as an option. Choosing ShaderSpider will load the ShaderSpider wacro buttons.

Click "Save Partial Shader (FX6)", and pick a location and file name. I used the default folder and "Cheetah -DC -B.fx6". I like to name my partial shaders so that I remember what inputs they use (-DC = Diffuse_Color, -B=Bump). The options window will pop up next.

5) Select  your inputs.

In the input selection window, check off "Diffuse_Color" and "Bump", because these are the two inputs we want the partial shader to affect. Hitting OK brings up the next set of options.



6) Set connections.

In the connection window, you'll see a list of the inputs that will be a part of the partial shader, each followed by a button that says "DISCONNECT". When an input is set to disconnect, whatever node is attached when the partial shader is loaded will be disconnected. (I.e., if a map is connected to Diffuse_Color, it would be disconnected from it). Clicking the button pops up a new window where you can pick any input from any node in the partial shader. Selecting one will cause any attached node to be connected to that input.

You'll want the texture map (which would be attached to Diffuse_Color) to move to the Color input of the HSV node, so click the "DISCONNECT" button next to Diffuse_Color and choose "hsv : Color" from the pulldown.

You'll want the bump map to move from the Bump input to "Math_Funtions : Value_1". If you don't remember which node is which, you can always move the windows around and look.

Hit OK, and your partial shader will be saved for reuse.



7) Go back to the mapped figure by disconnected your effect.

You'll want to now apply the cheetah effect all over David, but you have to be sure to disconnect your partial shader first. If you reconnect the texture map to "Diffuse_Color" and the bump map to "Bump", that should do the trick ("Load Partial Shader" will automatically discard any nodes that aren't connected to the PoserSurface).

If you leave your effect hooked up to the Diffuse_Color input, then once you load the partial shader, you'd end up with two layers of the effect stacked on top of each other. Alternatively, if you only disconnect the shader, and don't reconnect the maps, then the textures won't get plugged into your effect.


8) Load the Cheetah FX6.

To load the cheetah partial shader, click the "Load Partial Shader (FX6)" wacro button. A dialog will ask you what materials you want to apply it to. I wanted the cheetah effect all over David's skin, so I chose the "Skin" surface group. Locate the "Cheetah.fx6" file and hit OK, and the FX6 will apply all over the skin.


9) Render.

David is now a cheetah-man, but the details on his skin textures have been preserved. He still has lips, nipples and eyebrows, as well as variations in tone that come from his texture maps. Try this partial shader out on a figure with a makeup texture for even more fun.



Main Page