Tutorial for ctrl_buffers

Zoom in at the sphere. Create another cube and move ... Create two blinn materials, two lambert materials and one material for ambient occlusion (connect the.
504KB taille 1 téléchargements 270 vues
Tutorial for ctrl_buffers 1. Get the files Download maya7.0_v1.5.zip, which is attached to the first post of this thread. Follow the instruction to install it and start Maya. 2. Create Geometry First create a poly sphere. Switch to face mode and select all faces. Make sure that Polygons => Tool Options => Keep Faces Together is not checked. Extrude faces (in Channel editor: Locale Translate Z = 1). Move sphere up (Translate Y = 2). Create Poly Box and scale (Scale X, Y and Z = 10), move up (Translate Y = 5). While the box is still selected reverse the normals (Edit Polygons => Normals => Reverse). Delete the three visible faces of the cube. Zoom in at the sphere. Create another cube and move to the side. It will not show up in the rendering. Now it should look similar to this picture:

3. buffer_api This is the shader that enables the framebuffer. For further information check the notes attached to certain nodes in m7_fbs_005.mb which is included in the zip file. Open the Hypershade and create a buffer_api node (Create => mental ray Geometry => Buffer_api). The node shows up in the work area. Select the little cube on the side and open the Attribute Editor (CTRL A). Go to the first tab (pCube2). Scroll down and open the mental ray options. Open the Geometry Shader options. Enable the Geometry Shader and with the middle mouse button drag the buffer_api1 node from the work area of the Hypershade onto the word Geometry Shader and then it should something like this:

4. Buffer_store Create two buffer_store nodes (Create => mental ray Materials => Bufferstore). Create two blinn materials, two lambert materials and one material for ambient occlusion (connect the mib_amb_occlusion1.outvalue to the surfaceShader1.outColor).

Connect blinn.outColor to buffer_store.primarybuffer and to bufferstore.inbuffer_1. Connect lambert.outcolor to bufferstore.inbuffer_2. Do this for buffer_store1 and buffer_store2. The surfaceShader gets connected to both buffer_store nodes. Drag the surfaceShader node with the middle mouse button over the buffer_store node. Select Other in the Menu. Connect surfaceShader1 to buffer_store.inbuffer3.

Select buffer_store1 and open the Attribute Editor. Check store for the framebuffer.1, framebuffer.2 and framebuffer.3. Give the buffer some names. Repeat for buffer_store2. Assign buffer_store1 to the sphere and buffer_store2 to the big cube.

5. Buffer_write

In the Hypershade create a buffer_write node (Create => mental ray Output Shaders => Buffer_write). Select the perspective camera open the Attribute Editor.Open mental ray options open Output Passes and open the subcategory of the same name. Click the button Create.Drag with the middle mouse button buffer_write1 onto Output Shader

Select buffer_write1 in the Hypershade (Utilities tab) and open the Attribute editor. Set File path (in the example the path is C:\, buffertest is the first part of the filename), select output format, pattern and padding. Select how many buffers are to be written out (Min buffer = 1 max buffer = 3) and name the buffer files.