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:
-
in the Solaris viewport
-
in the COP network using renders from the Solaris viewport
-
in the COP network using Solaris clones
-
using husk for offline rendering
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.
-
Go to the Solaris viewport (
/stage
) and render an image using Karma CPU or XPU. -
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.
-
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.
-
Make sure Register as Slap Comp Block is on in the Block End COP.
-
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. -
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.
-
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.
-
Set up a COP network with slap comp turned on (see Solaris viewport).
-
Dive into the COP Network node and select the Slap Comp Import COP.
-
Turn on Live Recook so that the COP network updates live as the renders in the viewport change.
-
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.
-
Go to the Solaris viewport (
/stage
). -
Open the Clone Control Panel.
-
Do the following for each node in the network that you want to render separately and then composite together:
-
Choose HQueue Clone or Local Clone from the Clones drop-down menu to start up a local or hqueue clone.
-
Under Node, point the clone to the node in the network you want it to represent.
-
Under Frame, set the frame you want to render in the timeline. Each clone renders the currently selected frame.
-
-
Turn on each clone so it renders (it should say Connected beside each clone).
-
Create a COP Network node in
/stage
and dive into the node. -
Add a File COP for each clone.
-
Configure each File COP with the following. Each File COP should reference a different clone.
-
Set Source to
Clone
. -
Choose the clone you want to import from the Clone Name drop-down menu.
-
-
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.
-
Go to the Solaris viewport (
/stage
). -
Create a COP Network node or go to an existing COP Network node and dive into the node.
-
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.
-
Make sure Register as Slap Comp Block is on in the Block End COP.
-
Go back up to
/stage
. -
Add a USD Render ROP LOP.
-
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
-
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.
-
-
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.
-
Create a Block to Geometry COP in your COP network.
-
Set Block End Node to the Block End COP of the slap comp block you want to save as a geometry file.
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.
-
Go to the Solaris viewport (
/stage
). -
Add or select an existing USD Render ROP LOP in your network.
-
Go to Husk ▸ Slap Comp.
-
Add a slap comp and set Source to
COP Network
. -
Set COP Node to the slap comp’s Block End COP.
-
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.