Sei sulla pagina 1di 8

COMPOSITING CG ELEMENTS

Compositing in Houdini is available as an integrated part of Houdini Master or as a standalone application named Houdini Halo. This compositor is ideal for bringing together elements of a scene and providing a method of refining their look without re-rendering. Often creative decisions about color and the general composition of a scene can be tweaked or dramatically altered at the compositing stage where the director can request changes, often expecting a fast turnaround. Compositing in Houdini takes place at the Compositing level where you build up networks of compositing operators (COPs). You can integrate compositing networks into the same Houdini scene file as your 3D elements or start a new file just for working with 2D clips.
Software Version: 8.0.410 Published on: 18 November 2005

In this lesson you will composite several layers into a finished clip. This will give you a chance to begin building up a COP network that you can later modify to enhance each of the layers. The focus here will be on workflow and on a general tour of compositing in Houdini.

SETUP
One of the most basic compositing tasks is to layer several clips that each contain alpha channels that ask as masks that delineate the masked area of each image that allows for background layers to show through. 1. LOAD START FILE Select File > Open. In the load from: window, click on the Jump menu and select $HFS/demo. From here select the following directories lesson_data/compositing/quickstart then open the snailcomp_start.hip scene file. If you are not seeing a snail rendered against black background then select Network > Compositing and make sure you are in the img1 network.
Main Menu Parameter Pane

LAYER THE CLIPS TOGETHER


One of the most basic compositing tasks is to layer several clips that each contain alpha channels that ask as masks that delineate the masked area of each image that allows for background layers to show through. 1. IMPORT LAYERS In the Network pane, press . (This is the key just to the left of the 1 key) This opens up a browser. Select Jump > $HIP then open up the pics folder. With the Ctrl key, select the BGdeep.pic, trail.pic and shadow.pic then click Accept. This will add three file nodes into the Network pane.

Viewer Pane

Network Pane

Note: For this lesson you will be compositing only one frame of an animation. The same steps would apply if you were working with an animated sequence except you would use a different syntax for loading the files. Generally you would append a $F between the file name and its extension to indicate a sequence such as shadow$F.pic.

2. ESTABLISH PROJECT SETTINGS Before you begin working you should set up the composite project to meet specific needs. Select Settings > Composite Project. Change the Resolution to 640 X 480. Now any new nodes created will be set to this resolution. Also turn On both the File Operators use the Project Resolution by Default. and File Operators use the Pixel Depth by Default. Make sure File Operators use last the entered filename is On. Press Accept. 2. VIEW ALL FILES Select all four file operators in the Network pane then click on the display flag on one of the operators to display them all simultaneously. Click the Link Scrolling to All Views button so when you pan/zoom on one image it will apply this to all views.

You will notice that the shadow file appears entirely black. This is because the shadow was rendered with a black background and wont be visible until it is composited on a different color. Click the Component 4 button on the bottom stowbar to show the alpha channels for all the images. You will use the shadow layers alpha to build up a shadow in the layered image later in the lesson.

Note: The other selected operators are still available through the tabs that can be found at the bottom of the Viewer pane. Only four operators can be viewed at one time therefore one of the original four selected operators was dropped from the list.

4. CREATE SKY In the Viewer pane press tab > Ramp and MMB-click to add. At first the ramp is not visible because it has been added to one of the hidden tabs. Click on the ramp1 tab at the bottom of the viewport to display it. Because of the Composite Project settings the resolution is automatically 640 X 480. In the parameter pane, change the Ramp to Vertical. Click on the Points tab and set the Color of Point 1 to a white. Set the Color of Point 2 to a dark blue. Set the Segment 1 Interpolation to Ease Out. This will be used as sky image that will sit behind the existing background. Click Show All Planes to return to the color channels. 3. LAYER IMAGES In the Viewer pane, put the mouse cursor over BGdeep_pic and press tab > Layer. This image is set as the background layer. It will then prompt you to select the Foreground 1 to Layer. Click the trail_pic image. Select the shadow_pic image as the Foreground 2 layer then the snail_pic image as Foreground 3. RMB-click to accept your selection. Move your cursor over the layer1 panel and press t to focus on the layered image. 5. ADD THE RAMP TO THE LAYER In the Network pane, click the output of ramp1, wire it into layer1. In the Viewer pane, click on the Layer1 tab. Notice that the ramp has been put in the foreground.

Compositing CG Elements 3

Click on layer1 in the Network pane to select it. In the Parameter pane, click on the arrow next to ramp1 four times until it is first in the list. You can also re-order the layers by dragging and dropping a layer into place. In the Network pane, press l to clean up the layout.

2. DARKEN THE SLIME With your cursor in the Viewer pane over the translated slime, type tab > Bright and RMB-click to accept. In the Parameter pane lower the Brightness to 0.6.

3. STRENGTHEN THE SHADOW In the Network pane, Click the display flag of layer1, then Shift+LMB-click the display flag of the shadow_pic layer to view it as well. With the cursor over the shadow image in the Viewer pane press tab > Bright and RMB-click to accept. Deselect the R G and B buttons in the Plane Scope parameter, to limit the effect of the Bright operation to the Alpha plane. In the top stowbar in the Viewer pane deselect the Apply Changes to all Views button. Move your cursor over the bright2 image and press spacebar-x to focus on it. Its name will highlight in yellow. Select Show Component 4 in the bottom stow bar to see its Alpha channel while Layer still shows all planes. You can now interactively turn up the Brightness and see the immediate effect on the shadow layer and the final result of the layering. Set Brightness to about 2.5. The alpha for the shadow gets brighter while the shadow in the layered image gets darker.

ADJUST INDIVIDUAL LAYERS


Each of the layers connected to the layer COP can be modified individually to enhance their look. These modifications will be inserted as new operations sitting inbetween the existing ones. 1. REPOSITION THE SLIME In the Viewer pane, press t to see all the selected images. In the Network pane, click on the display flag of the layer1 COP then shift-click on the display flag of the trail_pic COP file to add it to the Viewer pane. With your cursor in the Viewer pane over the slime image, type tab > Transform and RMB-click to accept. After accepting the operation the translate handle will appear in the middle of the slime image. Use the transform handle to drag the slime upwards until it is definitely positioned under the snail. Preview the results in the layer1 view.

4. BLUR SHADOW With the cursor over the bright2 COP in the Viewer pane, press tab > Blur and RMB to accept. Again, deselect the R G and B buttons in the Plane Scope parameter.

COMPOSITING EFFECTS
Set the blur Size to 50.

5. VIEW THE LAYERED CLIPS LMB-click the display flag of layer1 to view this operation and focus on the results of the changes made so far.

In the Viewer Pane press tab > Vector and RMB-click to accept. Deselect the R G B and A planes, and delete the * in Plane Scope. Replace the asterisk with N in order to only affect the Normals plane.

COMPOSITING EFFECTS
In addition to basic layering effects, you can set up more complex compositing networks where you add effects such as fog to your shot or even re-light it using information stored in a Deep Rastor file.

RE-LIGHT THE SCENE


Most of the compositing decisions made so far have been subtle and provide a refinement on the original. Now imagine that the director has an epiphany and directs you to change the shot to a night shot. Rather than going back to the 3D scene, reposition lights and re-render, you can take advantage of rendering Deep Rastors which contain not only color information but also surface normal and point position information. 1. INCREASE GENERAL RASTER DEPTH To relight the scene, you will need all the pixels to be set up as 32 bit Floating point. Select Settings > Composite Project... and set the Pixel format to 32 bit FP. Click Accept to convert all of the images in your project. This higher raster depth will provide more accurate results when you apply the new lights. 2. NORMALIZE VECTORS In the display controls in the top stowbar change the display from C to the N plane. This displays the normals created by the Deep Raster options when these images were rendered. Normals describe which direction each point of the geometry is facing. You will need Normal (N) and Point Position (P) information if you are to relight the scene. The current normals will work properly, but it is a good idea to make the normals uniform so you can visualize them better. Tip: At top right of the Houdini workspace there is a button that says Always. Click once of this to change it to Never. Now Houdini will not re-cook the operators as you change parameters. You can add a whole series of changes then press Update to see the results. Under the Light tab, set the following parameters to position the light: Surface Type to Point and Normal Maps. Position to 0.3, 1, 0.5; Attenuation to 4; Direction to 0, -0.8, 1; Cone to 10; Cone Falloff to 15.

3. ADD FRONT LIGHT Change the display plane back to C (color). In the Viewer pane, press tab > Lighting and RMB-click to accept.

Compositing CG Elements 5

4. ADJUST ATMOSPHERIC EFFECT The light is now positioned, but you still need to adjust the rolloff and photon scattering. Click on the Lighting tab and set the following: Add to Original Color to Off. Ambient to 0.1, 0.1, 0.1, 0.1; Diffuse to 0.7, 0.7, 0.6, 0.7. These settings define the new light and use it in place of the existing lighting values. Click on the Volumetric tab and adjust the following: Atmosphere Scatter to 0.25; Light Falloff to 10; Ray March Step to 0.2. Click Update to see the how these settings create a new lighting effect. These values came from a creative exploration and you may want to change them if you want to explore an alternative light setup.

With the cursor over color1 in the Viewer pane press tab > VEX Filter. RMB-click to accept. Change the VEX Function to zexpand by clicking on the selection arrow for this field. Now the Depth information has been converted to 3D point information. Click Update. Click the display flag on light1 to show this node only, and select it as current if it is not already. 7. CREATE BACK LIGHT Now you will add a second light to illuminate the shell a bit more. In the Network pane, press Ctrl-c then Ctrl-v to copy and paste the light node. Set the display flag on light2 only. Set light2's parameters. Under the Lighting tab: Ambient to 0, 0, 0, 0; Diffuse to 0.5, 0.5, 0.4, 0.5; Under the Light tab: Position to -0.8, 0.5, 1.4; Attenuation to 2; Direction to 0.55, -1, 1.7; Cone to 30; Cone Falloff to 20; Under the Volumetric tab: Atmosphere Scatter to 0.1; Light Falloff to 3. Click Update.

5. ADD Z-DEPTH PLANE TO SKY It is subtle but the sky is not being lit properly. This is because, unlike the other images which were rendered with Deep Raster settings, the sky ramp has neither a P nor an N plane. Shift+click on the ramp COPs display flag to view it alongside the light COP in the Viewer pane. With the cursor over the ramp COP in the Viewer pane press tab > Color. LMB-click on the ramp image to select it to add to, then RMB-click to accept. In the Parameter pane, click on the Image tab and set Add Plane to Z. This will add a Z-depth plane that will tell Halo how far back or forwards to place it in the scene. Under the Color tab, set the Scalar value to 20. This will place the ramp well behind our scene. Click Update. 6. CONVERT DEPTH PLANE TO POINTS 8. LAYER LIGHTING COPS Shift+LMB-click in light1's display flag to view both Lighting nodes. In the Viewport press tab > Layer, it will select one layer as the background. LMB-click on the other image to select it as foreground and RMB-click to accept. Set the display flag on layer2 only.

COMPOSITING EFFECTS
Change the Global Operation to Add. Set the display flag on layer2 only then click Update. Click Update.

2. CREATE DEPTH PLANE In the Network view. press l to organize the operators. In the Viewer pane press tab > Depth of Field and RMB-click to accept. By default this has created a new plane for us called M, which creates and alpha-like channel based on the Pz plane. Change the display to the M plane.

CREATE FOG AND DEPTH BLUR


You can also use the depth information found in the shot to add a fog effect. This will provide some atmosphere to the image. 1. CREATE FOG In the Viewer pane press tab > Fog and RMB-click to accept. Click on the Layer tab and set the following: Layered to Y Layered (Below), this will create a ground mist effect; Layer Edge to -3; Layer Falloff to 9; Falloff Function to Ease Out. Go back to the Fog tab and set the following: Fog Type to Additive Fog; Fog Density to 0.01; Fog Color to a dark grey - around 0.36 in all fields.

If you have a fast enough machine and you set Updating back to Always, you can interactively change the Focus Distance slider and watch the effect in the Viewer pane. When creating masks it is important to note that the whiter an area is, the more effect a masked operation will have. An area that is black will not be affected. Set the Focus Distance to 2.5, and the Depth adjust to 1.1.

Compositing CG Elements 7

3. ADJUST DEPTH PLANE In the Viewer pane press tab > Contrast and RMB-click to accept. Click on the Mask tab and turn off the Plane Scope for R, G, B and A then replace * with M. Set the Global Contrast Black parameter to -0.05 and the White parameter to 1.5.

CONCLUSION
You now have a basic understanding of how Houdini can be used to composite CG elements. From basic layering to advanced effects utilizing deep rastor images, Houdinis compositing tools let you bring together the parts of a shot and adjust it procedurally.

4. ADD BLUR TO MASK In the Viewer pane press tab > Blur and RMB-click to accept. Change the Viewer pane to view the C plane. Change Operation Mask to First Input, and the input field to the right to M. Deselect A from the Plane Scope. Turn Accurate Mask Blur to on and set the value to 0.01. Now increase the Size to 30. The Blur has taken the information from the M plane and applied the corresponding blur to the C plane. Now the snail seems to pop out of the image. 5. RENDER In the Network pane, press tab > ROP File Output, then LMB-click to accept. Using this node you can render images directly out of COPs. Click the output of the blur2 node and wire it into the input of rop_comp1. Click the Render button to view the results.

Potrebbero piacerti anche