Houdini 20.5 Copernicus

Slap comp

Slap composite (slap comp) is a fast image manipulation you can use to view approximate and live results of a final composite.

On this page

Overview

One of Copernicus' main features is the slap composite (slap comp), which is a fast image manipulation you can use to view approximate and live results of a final composite. The viewport slap comp applies a network to the live results of the Solaris viewport render.

You can use the slap comp while in the Solaris viewport using Karma CPU or XPU perspective (see Using slap comp). Slap comp appears in the viewport camera, which suspends the output in space because that’s what the camera views.

Slap comp stashes and registers all of your AOVs when you converge or end the session, which is when you navigate away from the scene or close the window. This method of handling AOVs means that you can add a new AOV to your slap comp list to start the export process without restarting the render.

Errors

The slap comp stays on when you receive errors and the Control Slap Comp settings button turns into a warning symbol. When you hover over , a message appears pointing you to the Log Viewer. The Log Viewer contains the correct and complete list of all errors and warnings related to the slap comp.

The slap comp also displays errors in the Viewport, though these messages can be less articulate or disappear after you refresh the Viewport.

Limitations

  • The input names on the Block Begin COP must match the names of AOVs produced by the renderer. For example, if there’s a depth input it looks for the depth AOV. The type of each input must also be consistent with its AOV.

  • When using slap comp with husk, output AOVs must already exist and the output types in COPs must match the AOVs.

  • When using slap comp with husk, the output resolution must be the same as the original resolution.

  • Unlike in the Solaris viewport, the depth AOV isn’t exported by default by ROPs so you must turn it on. Add a Karma Render Settings LOP and go to Image Output ▸ AOVs ▸ Utility to turn on Depth (Camera Space).

Using slap comp

You can designate any section of any COP network as slap comp by adding a Block Begin COP before the section and a Block End COP after the section. You must then turn on Register as Slap Comp Block on the Block End COP. This lets you bring your COP network section into the Solaris viewport and adds it to the Control Slap Comp settings drop-down menu.

Tip

You can use the Slap Comp Block COP to put down a block with Register as Slap Comp Block turned on.

You can use slap comp in the following ways:

Slap comp is turned off if the Vulkan viewport is active. Slap comp outputs overwrite any inputs that have the same name.

Using slap comp in the Solaris viewport

Use slap comp in the COP network to view approximate results of a final composite.

  1. Go to the Solaris viewport (/stage) and render an image using Karma CPU or XPU.

  2. Create a COP Network node or go to an existing COP Network node and dive into the node. This opens a Geometry viewer and removes the previously rendered image.

  3. Add a Slap Comp Block COP in your scene. This makes Block Begin and Block End nodes, and you can wire additional nodes between them.

  4. Make sure Register as Slap Comp Block is on in the Block End COP.

  5. Go back up to /stage and click the Control Slap Comp settings button to turn on slap comp. Your non-GL/Vulkan renders are sent through the slap comp network before you see them.

  6. the Control Slap Comp settings button and choose the slap comp block you want to run from the drop-down menu. This processes C and depth layers by default, but you can add extra AOVs to input and output. You can adjust the nodes in your slap comp block to see live updates.

  7. If your Block End COP has an output other than C, choose the AOV that you want to display in the viewport from the Render Outputs drop-down menu. You can now preview your final output.

Tip

Use the Slap Comp Import COP to fetch the layers in live mode that last went through the slap comp process to see how it processes each node. The layers are positioned in 3D space where the camera is, similar to how they are in the real slap comp process. The Slap Comp Import doesn’t cook the slap comp.

Using slap comp with renders from the Solaris viewport

Use and configure your slap comp block with the viewport results. The viewport adds its render results to the global registry.

  1. Set up a COP network with slap comp turned on (see Solaris viewport).

  2. Dive into the COP Network node and select the Slap Comp Import COP.

  3. Turn on Live Recook so that the COP network updates live as the renders in the viewport change.

  4. Click Add AOVs from Last Render. This populates the node with available inputs from the last render so you don’t have to manually add the AOVs. You can now use the viewport’s render results in your slap comp block.

Note

You can also use the Slap Comp Import COP without a slap comp block or without having turned on use of slap comp in the Solaris viewport. The node just returns the requested AOVs from the last viewport render.

Tip

For each output, the Slap Comp Import has a corresponding fallback input that’s passed through if the respective AOV isn’t found in the registry. You can therefore plug test inputs into the node (from a File COP set to read rendered plates, for example) that are used when no Solaris viewport render has run.

Using slap comp with Solaris clones

Houdini clones let you cook and render LOP networks. These clones use less resources when they don’t locally run. For example, use this method to set up three different scenes with three different lights that you can connect and render.

  1. Go to the Solaris viewport (/stage).

  2. Open the Clone Control Panel.

  3. Do the following for each node in the network that you want to render separately and then composite together:

    1. Choose HQueue Clone or Local Clone from the Clones drop-down menu to start up a local or hqueue clone.

    2. Under Node, point the clone to the node in the network you want it to represent.

    3. Under Frame, set the frame you want to render in the timeline. Each clone renders the currently selected frame.

  4. Turn on each clone so it renders (it should say Connected beside each clone).

  5. Create a COP Network node in /stage and dive into the node.

  6. Add a File COP for each clone.

  7. Configure each File COP with the following. Each File COP should reference a different clone.

    1. Set Source to Clone.

    2. Choose the clone you want to import from the Clone Name drop-down menu.

  8. Wire the File COPs into Add COPs to connect your renders until the network ends in one Add node. You can now preview your final output.

Using slap comp with Husk

You can use Husk to do an offline render. You can use the USD Render ROP LOP to apply slap comp after a render.

Warning

Using SOPs anywhere in the slap comp block, including in HDAs, fails.

  1. Go to the Solaris viewport (/stage).

  2. Create a COP Network node or go to an existing COP Network node and dive into the node.

  3. Add a Slap Comp Block COP in your scene. This makes Block Begin and Block End nodes, and you can wire additional nodes between them.

  4. Make sure Register as Slap Comp Block is on in the Block End COP.

  5. Go back up to /stage.

  6. Add a USD Render ROP LOP.

  7. Go to Husk ▸ Slap Comp.

    Tip

    Instead of using this tab, you can use the following Husk command line to perform slap comp: husk scene.usda --slapcomp program.bgeo

  8. Add a slap comp and do one of the following:

    • Set Source to COP Network and COP Node to a Block End COP.

    • Set Source to File and File to a slap comp program that’s saved to a geometry file. Use this option when you have a canonical network that you want to apply to different scenes, but you don’t want to duplicate the network in every scene file.

    Note

    The USD Render ROP LOP has Map Input and Map Output parameters. You don’t need to change these parameters if your slap comp’s inputs and outputs match the AOVs. These parameters are useful when you have a canonical slap comp program you want to apply, but it has its own input and output names that your current AOVs don’t match. The Map Input and Map Output parameters let you map your AOVs to those inputs and outputs.

  9. Click Render to MPlay. The MPlay window opens and previews your final output offline.

Saving slap comp

After you author a slap comp network (see Using slap comp), you can save your slap comp program to a geometry file.

  1. Create a Block to Geometry COP in your COP network.

  2. Set Block End Node to the Block End COP of the slap comp block you want to save as a geometry file.

  3. Export the geometry out to a file on disk.

Sending out your effect for 1000 frames

After you make an output using slap comp (see Using slap comp), you can send it out to create 1000 frames.

  1. Go to the Solaris viewport (/stage).

  2. Add or select an existing USD Render ROP LOP in your network.

  3. Go to Husk ▸ Slap Comp.

  4. Add a slap comp and set Source to COP Network.

  5. Set COP Node to the slap comp’s Block End COP.

  6. Enter a name in the Label parameter that you can use to identify this slap comp operation when husk prints out messages.

Tips

  • To remove all 3D transformations from your image and place it in canonical instead of camera space, wire the Block Begin COP into the first input of a Match Camera COP. This makes the image act as expected through the network. You can then wire the Block End COP into the first input of another Match Camera COP to restore your image back to its original location.

  • When working in LOPs, input layers can bring in cameras so the view is consistent with what’s rendering spacially. To control whether to bring in these cameras, the Block End COP has an Import Cameras with Slap Comp Inputs parameter you can turn on to place the input layer where the camera’s view is. When this parameter is off (the default setting), the slap comp places the input layer in the canonical default position (image space). A parameter of the same name is also present on the Slap Comp Import COP.

  • If you add a File COP in your slap comp block, the file initially displays its default resolution. You can add a Resample COP to change this resolution. Wire the File COP into the first input of the Resample COP, wire the Block Begin COP’s first output into the second input of the Resample COP, and then set the Resample COP’s Size Control parameter to Aspect Ratio and turn on Reframe to Destination.

Copernicus

Basics

Next steps

  • Working with Copernicus nodes

    Provides next steps and workflows for how to use Copernicus nodes.

  • Slap comp

    Slap composite (slap comp) is a fast image manipulation you can use to view approximate and live results of a final composite.

  • OpenFX

    Describes what OpenFX is and how to use it in your network.

  • Hatching

    Describes how to use hatching in your Copernicus network.

  • How to use ONNX Inference

    Describes how to apply inference using a model in the ONNX Inference node.

  • Copernicus tips

    Useful tips and information while using COPs.

Advanced concepts

  • Normals

    Defines the normals that the Copernicus network uses.

  • Spaces

    Defines the spaces that the Copernicus network uses.