Kelly L. Murdock delves into using the Wacro panel, creating smoothing and material groups and adding atmosphere effects.
Connecting most nodes to create advanced materials is easy to do with a little experimentation, but others can be down right tricky. To help you with these trickier materials, the Wacros palette includes several predefined scripts that can quickly add and connect the nodes needed to create certain effects. The Wacros palette is a pull-out panel located on the right side of the Material palette. You can open and close it by clicking on the panel handle, shown in Figure 8-29.
Wacros are PoserPython scripts that deal specifically with materials. They are typically used to add certain nodes needed to create a specific type of material such as a Toon Render or a Shadow Catcher material. You can access them from the Wacros palette located to the right side of the Shader Window. Clicking a wacros button executes the script for the current material and Shift-clicking on a button executes the script for all the materials that are part of the current object.
Adding Reflections and Refractions
You can add reflections to a material using the Simple Materials panel, but to enable true spherical reflections and to be able to configure the reflections, you also need the Add Reflection button. This button adds several nodes to the Shader Window and connects them to the Reflection Color value, as shown in Figure 8-30.
The Add Refraction wacro works in a similar manner, adding the nodes needed to create refractions through transparent surfaces. Refractions work only through transparent and semi-transparent materials.
Adding Subsurface Scattering
Subsurface scattering spreads reflected light across the surface of an object creating the effect that the light can shine through thinner parts of the model. For example, lights shining behind a character’s head will illuminate the ears as if they were translucent.
The Add Subsurface Scattering wacro adds three nodes[md]Edge Blend, Fastscatter, and Blinn[md]to the Shader window and connects them to the Alternate Diffuse and Alternate Specular values, as shown in Figure 8-31, to increase the color around the edges of the object.
Enabling Shadow Catcher and Toon Rendering
The Shadow Catcher wacro makes the current object completely transparent, but enables the ShadowCatchOnly option, which lets it display shadows that are cast onto it. You can use this option to give shadows the ability to be expressive and positioned independent of the floor.
The Toon Render wacro adds a Toon node and connects it to the Alternate Diffuse value in the root node, enabling the material to be rendered as a cartoon. It is used in conjunction with the Toon Outline render option in the Render Settings dialog box.
Using Atmosphere Presets
The Create Atmosphere button opens a simple dialog box where you can choose from four preset atmospheric effects, including Fog, Smokey, Smokey Room, and Depth Cue. After making a selection, the wacro sets up all the necessary nodes to create your selection for the Atmosphere node. More on adding Atmosphere effects to the scene is covered later in this chapter.
Defining a Light Style
The Set Up Light Style wacro can only be applied when a light object is selected in the Shader Window. It opens a simple dialog box where you can choose from three light styles, including Diffuse Only, Specular Only, and White Only. After you make a selection, the wacro changes the colors used for the Diffuse and Specular values to white and black, black and white, or white for both depending on your selection.
Enabling Ambient Occlusion and Image-Based Lighting
The Set Up Ambient Occlusion button can only be applied when a light object is selected in the Shader Window. It sets up ambient occlusion for the selected light material by enabling the Ambient Occlusion option in the Properties palette.
Ambient occlusion works only if the Raytracing option is enabled in the Render Settings dialog box.
The IBL button can be applied only when a light object is selected in the Shader Window. It opens the Texture Manager, where you can select the image to use for your image-based light and it offers to enable ambient occlusion. You can learn more about image-based lighting and ambient occlusion in Chapter 7, “Adding Scene Lighting.”
Removing Detached Nodes
If you’ve created a complex material and it includes some nodes that aren’t connected to anything, you can use the Remove Detached Nodes button to quickly remove any detached nodes. Detached nodes have no effect on the material and will only take up memory.
Adding New Wacros
You can add new wacros to the Wacros palette in the same manner as you add scripts to the Python Scripts palette by clicking an open button to open a dialog box. Clicking a script button with the Alt/Option key held down clears the selected button and clicking a wacros button with the Ctrl/Command button held down opens the script within a text editor for editing.
If you place a script file in the \Runtime\Python\poserScripts\Wacros\UserDefined directory, the script will appear under the User Defined pop-up menu the next time you restart Poser
Use Subsurface Scattering 1. Open Poser with the Ryan figure visible.
2. Click the Material tab to the open the Material Room.
3. Click the side window control to the right of the Shader Window to open the Wacros palette (if necessary).
4. Select the Head Camera to zoom in on the head and within the Document Window, click on the head object to make its material active.
5. Hold down the Shift key and click the Add Subsurface Scattering button. A dialog box will appear reminding you that all lights will have depth map shadows enabled. Click OK to clear the dialog box.
Several new nodes are added to the Shader Window to enable the subsurface scattering materials. The Shift key causes these nodes to be added to all body materials.
6. In the Light palette, rotate the main light around to the back of the head so light is cast on the back of the head.
7. Select the Render panel in the Document Window and click the Render button.
The thinner parts of the ear are illuminated as if light is shining through it, as shown in Figure 8-32.
8. Select File, Save As and save the file as Subsurface scattering wacro.pz3.
CREATE SMOOTHING AND MATERIAL GROUPS
The Group Editor can be used to identify groups of polygons that need to have the same type of material or that need to be smoothed together. For example, consider the neckline of a figure where the shirt meets the neck. It would look funny if some of the neck polygons were colored the same as the shirt or vice versa. It would also look strange if the polygons in the shirt were smoothed with the neck. The shirt and the neck each form a separate material and smoothing groups.
Figure elements are divided into objects that align with the figure’s bones to allow for easy figure posing, but the materials don’t often follow these groupings. For example, the elements covered by the shirt area could include multiple elements including the chest, abdomen, and both shoulders and upper arms, whereas the head as a single element can require separate material groups for the scalp, lips, cheeks, teeth, and tongue.
Setting Crease Angles
You can set smoothing at the global level using the Default Crease Angle value found in the Document panel of the General Preferences dialog box or at the local body part level using the Crease Angle value in the Properties palette, as shown in Figure 8-33.
The Crease Angle is determined by computing the angle between the normal vectors of two adjacent polygons. If the angle is greater than the Crease Angle value, the edge between the two polygons is made into a crease or a hard edge. If the angle value is less than the global or local Crease Angle, the polygon faces are smoothed together.
The Crease Angle value in the Properties palette takes precedence over the global Crease Angle value.
Most Crease Angle values are between 80 to 90 degrees, which causes almost all adjacent polygons to be smoothed. If a low Crease Angle value were used, the object would appear faceted where every polygon is shown.
Using Smoothing Groups
Even though a crease angle is set for an entire body part or object, you may want to have some hard edges across an object, such as the collar of a shirt. You can do this by defining a smoothing group. A smoothing group is created using the Group Editor panel, which can be opened by selecting the Grouping Tool in the Editing Tools palette.
With the Group Editor panel open, simply select all the polygons that need to be smoothed together and click the Assign Smoothing ID button. This opens the Assign Smoothing ID dialog box, shown in Figure 8-34, where you can enter a smoothing ID number. This gives each of the polygons within the smoothing group the same smoothing ID. Polygons along the border of a smoothing group have a hard edge.
Using the Grouping Tool
The Grouping Tool found in the Editing Tools opens the Group Editor panel, shown in Figure 8-35. Within this panel are buttons for creating a material group that can be recognized in the Shader Window. By dragging over polygons in the Document Window with the Grouping Tool, you can select polygons as part of the group. The selected polygons are highlighted in red in the Document Window.
To see the polygons clearly, select a wireframe display style from the Document Display Styles control bar.
To remove polygons from the current selection, click the Deselect button at the top of the Group Editor and click the polygons you want to remove.
You can also access the Deselect button by holding down the Ctrl/Command key.
Creating a Material Group
Once all the polygons for the material group are selected, click the Assign Material button in the Group Editor. This opens the Assign Material dialog box, shown in Figure 8-36, where you can type a name for the new material group. After you click OK, you can select the new material group from the Material List in the Shader Window.
Set a Global Crease Angle 1. Open Poser and load the Kitty Robot figure, found in the CP Partners/Sanctum Art folder, from the Library.
2. Select the Edit, General Parameters menu to open the General Parameters dialog box.
3. Set the Default Crease Angle to 1.0 and click the OK button.
The entire model becomes faceted showing each polygon in the model, as shown in Figure 8-37.
4. Select File, Save As and save the file as Faceted robot.pz3.
Create a Material Group 1. Open Poser and click the Material tab to access the Material Room.
2. Click the Grouping Tool button in the Editing Tools controls.
The Group Editor panel appears and the figure in the Document Window goes dark.
3. Click the Hidden Line button in the Document Display Style controls.
4. Click the chest object in the middle of the Document Window.
All the polygons that make up the chest element are highlighted in red.
5. Click the Deselect buttonin the Group Editor panel and drag over the top polygons in the Document Window to remove them from the selected polygons.
6. When just a single band of polygons surround the mid-section of the figure in the Document Window, click the Assign Material button in the Group Editor panel.
The Assign Material dialog box appears.
7. Type the name, Shirt stripe, in the Assign Material dialog box and click OK.
8. Select the Shirt stripe material group from the Material List at the top of the Shader Window and change the Diffuse Color to green.
9. Click the Smooth Shaded button in the Document Display Style controls.
The material group is colored green, as shown in Figure 8-38.
10. Select File, Save As and save the file as Green stripe.pz3.
ADD ATMOSPHERE EFFECTS
If you look in the Object List found at the top of the Shader Window in the Material Room, you’ll find an Atmosphere option directly below the Background option. Selecting this option opens the Atmosphere root node in the Advanced panel of the Shader Window, as shown in Figure 8-39. Using this node, you can add depth cue and volume atmospheric effects to the rendered scene.
Enabling atmosphere effects can add a substantial amount of time to the rendering process.
Enabling Depth Cueing
By selecting the Depth Cue option in the root Atmosphere node, you can turn on the depth cueing atmospheric effect. This works just like the Depth Cue option in the Document Window by making objects farther in the scene appear hazier.
Adding a Volume Effect
The Volume atmospheric effect adds a fog and haze to the scene by coloring all scene objects with the designated color. When the volume effect is enabled, notice how the figure details are washed out by the fog effect. The volume effect also affects shadows.
Using Atmosphere Presets
The Volume effect is a fairly simplistic atmospheric effect that applies equal fading over the entire scene. Within the Wacros panel are several additional atmospheric presets that combine turbulence and noise to give the fog a more random, realistic look.
Clicking on the Create Atmosphere button in the Wacros panel opens a simple dialog box where you can choose Fog, Smoke, SmokyRoom, or Depth_Cue effects. Figure 8-40 shows a scene with three figures and the Smokey Room atmospheric effect.
Atmospheric effects are not visible in the Preview Window and can only be seen on scene objects when rendered.
Creating Controlled Atmospheres
Even though the Atmosphere node in the Material Room provides an easy way to add atmospheric effects, you are not limited to only using this method. Using a prop object with a cloud or noise material applied to it provides a similar effect and gives you much better control over where the fog is located and how it looks.
Adding a Hi-Res Square from the Primitives Prop folder in the Library and positioning it where the fog should be located provides a surface for the fog. Then add a Clouds, Noise, or Turbulence node to the Shader window and connect it to the Transparency and Transparency Edge channels and render the scene. If you connect the Clouds to the Alternative Diffuse channel, then you’ll be able to control the color of the fog also.
Enable Atmosphere Effects 1. Open Poser with the default figure visible.
2. Click the Material tab at the top of the interface to open the Material Room and click the Advanced tab in the Shader Window, if necessary.
3. Select the Atmosphere option from the Object List at the top of the Shader Window.
The Atmosphere root node appears in the Shader Window.
4. Enable the Depth Cue On and Volume On values in the Atmosphere root node.
5. Click the Pose tab to move back to the Pose Room.
6. Click the Render button at the top of the Document Window.
The scene is rendered using the atmospheric effects, as shown in Figure 8-41.
7. Select File, Save As and save the file as Atmospheric effects.pz3.
Create a Fog Layer 1. Open Poser with the default mannequin figure visible.
2. Add the Square Hi-Res object from the Primitives Props folder and scale the object to cover the ground area. Then raise the plane object to about knee level.
3. Click the Material tab at the top of the interface to open the Material Room and click the Advanced tab in the Shader Window, if necessary.
4. Select the ClothPlane option from the Object List at the top of the Shader Window.
5. From the Shader window’s pop-up menu, select the New Node, 3D Textures, Turbulence option.
6. Drag the Value Input node in the top-left corner of the Turbulence node to the Transparency value, then repeat for the Transparency Edge value. Set the Transparency and Transparency Edge values in the PoserSurface node to 1. Finally, drag to the Alternate Diffuse value.
7. Click the Render button at the top of the Document Window.
The scene is rendered using the manual atmospheric effects, as shown in Figure 8-42.
8. Select File, Save As and save the file as Fog plane.pz3.
This chapter explained how materials can be used to define how the surface looks when rendered. Materials are created in the Material Room and the Library includes an assortment of preset materials you can apply to material groups. Simple materials include properties such as color, highlight, reflection, and transparency, and you create advanced materials by connecting material nodes together within the Shader Window. Several complex material properties can be created using the Wacros palette. Finally, the chapter showed how new smoothing and material groups can be created using the Group Editor and how atmosphere effects can be added to the scene.
What You Have Learned
In this chapter, you:
• Discovered the layout of the Material Room interface including the Shader Window.
• Used the Select Material Tool to select a material group in the Document Window.
• Discovered how materials can be previewed in the Document Window using OpenGL.
• Learned the properties used to create simple materials, including color, highlight, ambient, reflection, bump, and transparency.
• Added texture images to materials.
• Used Bump and Displacement maps to give the object’s surface some texture.
• Learned what the various root material values are used for.
• Connected material nodes together and created new material nodes.
• Loaded a Normal Map to display details on the surface.
• Reviewed a list of the available material nodes.
• Used the Wacros palette to enable specific material properties.
• Set the global and local crease angle.
• Created a new smoothing and material group using the Group Editor.
• Added depth cueing and volume atmospheric effects to the scene.
Key Terms from This Chapter• Ambient color. A global pervasive light color that is applied to the entire scene.
• Bump Map. A 2D bitmap image that adds a relief texture to the surface of an object like an orange rind.
• Depth cueing. An atmospheric effect that makes objects farther in the scene appear hazier.
• Diffuse color. The surface color emitted by an object.
• Displacement map. A 2D bitmap image that controls the displacement of geometry objects.
• Highlight. The spot on an object where the light is reflected with the greatest intensity. Also known as a specular highlight.
• Material group. A group of selected polygons that defines a region where similar materials are applied, such as a shirt or pants group.
• Material node. A dialog box of material properties that can be connected to control another material value.
• Normal Map. A texture map that adds details to the surface of an object by changing the normal vectors of the object.
• Opaque. The opposite of transparency. When objects cannot be seen through.
• Root node. The top-level material node.
• Shader Window.
An interface found in the Material Room where new custom materials can be created.
• Smoothing group. A group of polygons that are smoothed between adjacent polygons without any hard edges.
• Texture map. An 2D image file that is wrapped about a surface.
• Transparency. A material property that defines how easy an object is to see through, like glass.
• Volume effect. An atmospheric effect that colors all scene objects with the designated color, much like fog.
• Wacro. A custom PoserPython script used within the Shader Window to create new material types.
Kelly L. Murdock has more than 15 years experience in the computer graphics arena, especially in the area of 3D graphics. Included in the experience is a variety of tasks from high-end CAD product design and architectural pre-visualization to virtual reality and games. Kelly is best known for his international best-selling books on graphics including the 3ds max Bible, Illustrator Bible and Naked Maya. He also is the author of Poser 6 Revealed and Poser 7 Revealed as well as Edgeloop Character Modeling for 3D Professionals. Kelly currently works as a freelance designer for Logical Paradox Design, a company that he founded with his brother.