Using Your Rendered Output: Wireframe Rendering 2.0 *** Note: If you«re using XSI 1.5, do the tutorial on the previous page. If you«re using XSI 2.0, use this tutorial ***
Start with a new scene. File]New Scene.
Turn Viewport A into a property Editor.
Create a Sphere (Get]Primitive]Polygon Mesh]Sphere).
Connect the Toon_Paint_and_Host shader to the object«s Material surface by choosing Get]Material]Toon
Draw a render region in viewport B by pressing the Q key and dragging from left to right.
Also turn on the background by clicking Render]Region]Show RGB.
Now your object has the toon material on it, but no wireframe materials. It should look like this: ***See figure toon_no_camera_shader2.jpg
The object is still shaded. In order to see the wire effect we will have to connect the cartoon lens shader to the camera.
Turn viewport D into an Explorer by clicking the titlebar and choosing Explorer from the dropdown menu.
In the Explorer expand the camera_root node and click on the icon next to the word "Camera". The camera property page will open up.
Click the Lens Shaders tab, and press the "Add" button.
When the browser opens up click on the "Lens" folder, highlight the Toon_Ink_Lens shader, and click OK. The Toon_Ink_Lens shader will be added to the stack. ***See figure camera_lens_shader2.jpg
The location of this shader will be something like this: SoftimageXSI_2.0DataDSPresetsShadersLens
Highlight the word "Toon_Ink_Lens" in the Lens Shader stack and click "Inspect". The Toon_Ink_Lens shader controls will appear.
Click the Sampling tab. Check the box next to "Enable" and "Merge Coplanar". ***See figure toon_ink_lens2.jpg This option forces mental ray to render the ink lines on top of the objects.
In order to render just the wireframe and none of the shading, youÕll need to adjust the objects toon shader. Select the sphere and click Modify]Shader. Click the Transparency/Reflection tab and check the box next to enable. Also, make sure that the color is set to 1.0 in R, G and B. ***See figure toon_trans_reflect2.jpg
Now the object«s material is transparent, but the wireframe is not visible. This is because the wireframe is dark grey and does not show up against the background very well. To fix this, click the Ink tab and check the box in the Local Attributes section, located next to "Enable." Then change the color to something bright. (I used Green.) ***See figure toon_ink_color2.jpg
The resulting render looked like this: ***See figure toon_render_no_cull2.jpg
If you check the Back Cull box at the top of the Property Page, then all the wire frames associated with normals that are facing away from the camera will not render. This gives your wireframe renders a more solid look commonly called "hidden line" render. ***See figure toon_render_cull2.jpg
This setup works just fine if you want all your objects to have wireframe materials. But what if you want to mix wireframe and real shading? There is a way, and itÕs really easy. Try thisÉ. Create another Sphere (Get]Primitive]Polygon Mesh]Sphere).
Translate it off to the side so that you can see both spheres. The new sphere has the "wireframe on top look." ***See figure toon_render_both2.jpg
In the Explorer click on the icon next to the word "Camera". The camera property page will open up.
Click the Lens shaders tab. Highlight the word "Toon_Ink_Lens" in the Lens Shader stack and click "Inspect". The Toon_Ink_Lens shader controls will appear. Click the Sampling tab and uncheck the box next to "Require Host". ***See figure camera_lens_require_host2.jpg
Now you«ve got independent control of the wireframe effect on an object-to-object basis and with just a few clicks you can have mixed wire and shaded rendering on the same object. ***See toon_render_single2.jpg