SideFX Labs Documentation

repository·Development·Indexed 22 days ago

https://github.com/sideeffects/sidefxlabs

An open-source collection of tools, HDAs, Python modules, and plugins designed to extend Houdini's functionality. Includes the P4Houdini plugin for Perforce asset management, Pyper for cross-DCC compatible widgets, and various specialized assets, VEX functions, and game engine plugins. Supports installation via Houdini Launcher, command line for studio deployment, or manual GitHub installation.

Tokens
3.7K
Snippets
4
Records
18
Agent score
79%

What's inside SideFX Labs

  1. Overview of SideFX Labs

    Development

    SideFX Labs is an open-source, artist-friendly toolset developed by SideFX. It provides a collection of tools designed to extend Houdini's capabilities. The toolset includes:

    • Houdini Digital Assets (HDAs): Hundreds of specialized assets for various workflows.
    • Python Modules: Custom modules to extend Houdini's scripting capabilities.
    • Game Engine Plugins: Tools for integrating Houdini workflows with game engines.
    • Houdini UI Extensions: Custom interface elements for Houdini.
    • Custom VEX Functions: Specialized functions for use within VEX expressions.

    Because these tools are developed outside the standard Houdini release cycle, they allow for faster testing and feedback loops.

  2. Namespace changes in SideFX Labs Unreal Plugin 5.1+

    Development

    Starting with version 5.1, the SideFX Labs Unreal Plugin has unified its asset namespaces. All assets previously using namespaces like SideFX ... or MF ... have been renamed to use the Houdini ... prefix.

    Example mapping:

    • Old: MF_VAT_RigidBodyDynamics
    • New: Houdini_VAT_RigidBodyDynamics

    This change is intended to clarify the dependency on the plugin for users unfamiliar with the 'SideFX' name.

  3. Use Pyper wrappers for cross-DCC compatibility

    Development

    Pyper provides a common interface via pyper.wrappers to interact with different Digital Content Creation (DCC) applications like SideFX Houdini and Autodesk Maya. This allows you to write tool logic that works in both applications without writing DCC-specific code (like maya.cmds or hou) directly in your widget logic.

    How it works

    Instead of calling application-specific commands, you use a wrapper model. For example, to get selected objects:

    • In Maya: The wrapper uses maya.cmds.ls(sl=True).
    • In Houdini: The wrapper uses hou.selectedNodes().

    Usage Pattern

    In your widget's logic, import the appropriate wrapper and use the Model() to access common methods:

    # For Houdini
    from wrappers import houdini as wrapper
    selected_nodes = wrapper.Model().selection()
    
    # For Maya
    from wrappers import maya as wrapper
    selected_nodes = wrapper.Model().selection()
    from wrappers import houdini as wrapper
    selectedNodes = wrapper.Model().selection()
  4. Namespace changes in SideFX Labs Unreal Plugin (v5.1+)

    Development

    Starting with version 5.1, the SideFX Labs Unreal Plugin has unified its asset namespaces. Older namespaces like SideFX ... or MF ... have been renamed to Houdini ....

    Example: MF_VAT_RigidBodyDynamics is now Houdini_VAT_RigidBodyDynamics.

    This change is intended to clarify the plugin dependency for team members who may not be familiar with the 'SideFX' name.

  5. Install SideFX Labs from GitHub (Manual/Advanced)

    Development

    If you need specific versions or same-day updates, you can install manually from GitHub:

    1. Download: Get a release zip from the GitHub releases page, download the repository ZIP, or clone the repository.
    2. Unzip: Extract the contents into a custom directory of your choice.
    3. Configure Package: Copy the SideFXLabs.json template from your custom directory to the appropriate Houdini packages folder for your OS and rename it to SideFXLabs21.0.json (adjusting for your Houdini version).
    4. Edit JSON: Open the renamed .json file and replace "$HOUDINI_PACKAGE_PATH/SideFXLabs21.0" with the absolute path to your custom SideFXLabs directory.

    OS-Specific Packages Folders:

    • Windows: C:\Users\...\Documents\houdini21.0\packages
    • Linux: ~/houdini21.0/packages
    • macOS: ~/Library/Preferences/houdini/21.0/packages
  6. Install P4Houdini for Houdini

    Development

    To install the P4Houdini plugin, follow these steps:

    1. Clone the P4Houdini repository and note the installation directory.
    2. Copy the P4Houdini.json file from the repository root to your Houdini user preferences directory: $HOUDINI_USER_PREF_DIR/packages/.
    3. Open the copied P4Houdini.json and update the $P4HOUDINI path to point to your local cloned repository directory.
    4. Configure your workspace by clicking the Set Workspace shelf button in Houdini, or manually edit the P4Preferences.json file and set the P4Settings variable.

    Compatibility: Officially supports Houdini 20.0 on Windows and Linux. Mac support is untested.

  7. Upgrade precautions for existing UE 5.1-5.3 projects

    Development

    Upgrading the SideFX Labs Unreal Plugin in an existing project (UE 5.1-5.3) can break the links between your Materials and the plugin's Material Functions due to the namespace change.

    Warning: Replacing the plugin in an active project may cause Material Function nodes within your materials to break. Manual restoration of these nodes is possible but requires extreme caution.

    Safe Upgrade Path for Scripted Asset Actions: If you only need to fix issues with right-click menu Scripted Asset Actions (e.g., applying texture presets) without breaking existing materials, perform the upgrade but do not overwrite the contents of the following folder:

    .../Plugins/SideFX_Labs/Content/Materials/

    Note: If you are starting a new project in UE 5.1-5.3, these warnings and precautions do not apply.

  8. Use P4Houdini features in Houdini

    Development

    P4Houdini provides several automated and manual workflows for managing Perforce assets within Houdini:

    • Automatic File Management:
      • .hip files can be automatically checked out or added upon saving.
      • .hda files can be automatically checked out or added via the Right-Click Menu (RMB) on the HDA.
    • Manual Controls:
      • Submit (partial) changelists using the shelf tool.
      • Edit pending changelists.
      • Revert .hip and .hda files to the latest depot version.
      • Check out files specified in any string parameter by using RMB Click > P4Houdini > Add/Checkout.
    • Advanced Automation:
      • Dependency Scanning: The plugin scans .hip files for files being written to (including $F expressions) to prevent permission errors during cooks.
      • ROP Post-Render Scripts: You can automatically add files to a changelist using Python expressions in ROP post-render parameters. See examples/manual_managing_files.hip for implementation details.
  9. Install and run Pyper widgets

    Development

    To use Pyper, clone the repository into a directory that is part of your Python path. Once installed, you can launch existing widgets (like simplelist) by calling their .run() method from a shelf tool or script.

    Installation

    cd /path/to/your/tool/folder
    git clone https://gitlab.com/brunoebe/pyper.git

    Quick Start Example

    To launch the simplelist widget:

    from pyper.widgets import simplelist
    simplelist.run()
  10. Build your own Pyper widget

    Development

    You can create custom widgets by using existing ones as templates. Follow these steps:

    1. Template Copying: Copy an existing widget directory from pyper/widgets to your project folder.
      cp -R pyper/widgets/simplelist .
    2. Renaming: Rename the directory to your desired widget name (e.g., myWidget).
    3. UI Design: Edit the myWidget/ui/widget.ui file using QtDesigner to modify the interface.
    4. Implementation: Update the logic in myWidget/ui.py to implement your specific functionality. You can refer to other widgets in pyper/widgets for implementation patterns.
    5. Execution: Launch your new widget using:
      import myWidget
      myWidget.run()
    import myWidget
    myWidget.run()
  11. Deploy SideFX Labs via Command Line

    Development

    For studio deployment, use the houdini_installer executable. You can install production builds, daily builds, or uninstall packages.

    Important: Houdini-specific environment variables (like HSITE or HOME) are not automatically recognized by the command line for installation. You must define them at the system or shell profile level. To use custom paths, define a system environment variable (e.g., MY_SIDEFXLABS) and reference it in your commands.

    ### Windows (Command Prompt / hcmd.exe)
    "C:\Program Files\Side Effects Software\Launcher\bin\houdini_installer.exe" install-package --package-name "SideFX Labs 21.0 Production Build" --installdir "D:\studio\sidefxlabs"
    
    "C:\Program Files\Side Effects Software\Launcher\bin\houdini_installer.exe" install-package --package-name "SideFX Labs 21.0 Daily Build" --installdir "D:\studio\sidefxlabs"
    
    "C:\Program Files\Side Effects Software\Launcher\bin\houdini_installer.exe" uninstall-package "D:\studio\sidefxlabs\SideFXLabs21.0.json"
    
    ### Linux (Terminal)
    ~/houdini_launcher/bin/houdini_installer install-package --package-name "SideFX Labs 21.0 Production Build" --installdir "/studio/sidefxlabs"
    
    ~/houdini_launcher/bin/houdini_installer install-package --package-name "SideFX Labs 21.0 Daily Build" --installdir "/studio/sidefxlabs"
    
    ~/houdini_launcher/bin/houdini_installer uninstall-package "/studio/sidefxlabs/SideFXLabs21.0.json"
    
    ### macOS (Terminal)
    /Applications/HoudiniLauncher.app/Contents/MacOS/houdini_installer install-package --package-name "SideFX Labs 21.0 Production Build" --installdir "/studio/sidefxlabs"
    
    /Applications/HoudiniLauncher.app/Contents/MacOS/houdini_installer install-package --package-name "SideFX Labs 21.0 Daily Build" --installdir "/studio/sidefxlabs"
    
    /Applications/HoudiniLauncher.app/Contents/MacOS/houdini_installer uninstall-package "/studio/sidefxlabs/SideFXLabs21.0.json"