#vfx #graphics #gamedev #houdini

hapi-rs

Rust bindings to Houdini Engine API

6 releases (breaking)

0.9.0 Jan 11, 2023
0.8.0 Nov 20, 2022
0.7.0 Nov 8, 2022
0.6.0 Nov 2, 2022
0.1.0 Aug 3, 2021

#269 in Game dev

Download history 1/week @ 2022-10-11 22/week @ 2022-10-18 5/week @ 2022-10-25 30/week @ 2022-11-01 28/week @ 2022-11-08 25/week @ 2022-11-15 15/week @ 2022-11-22 6/week @ 2022-11-29 8/week @ 2022-12-06 3/week @ 2022-12-13 8/week @ 2022-12-20 3/week @ 2023-01-03 36/week @ 2023-01-10 10/week @ 2023-01-17 10/week @ 2023-01-24

59 downloads per month

MIT license

405KB
12K SLoC

Rust bindings to Houdini Engine API

Cargo Documentation MIT/Apache 2.0

SideFX Houdini Meets Rust!

SideFx Houdini is a world leading software for creating stunning visual effects for movies and games. Apart from the main graphical interface written in C++ and Python, Houdini also provides a C interface called Houdini Engine or HAPI for short. Its goal is to bring the power of Houdini to other DCCs (Digital Content Creation) software and game engines.

This crate aims to provide idiomatic Rust interface to Houdini Engine and is built on top of hapi-sys.

❗ A valid commercial Houdini Engine license is required to use this crate

Example

use hapi_rs::Result;
use hapi_rs::session::quick_session;
use hapi_rs::parameter::*;

fn main() -> Result<()> {
    // Start a standalone engine process
    let session = quick_session()?;
    // Load a Houdini Asset and create a node
    session.load_asset_file("otls/hapi_geo.hda")?;
    let node = session.create_node("Object/hapi_geo", None, None)?;
    // Set the "scale" parameter
    if let Parameter::Float(parm) = node.parameter("scale")? {
        parm.set(0, 3.0)?;
        node.cook(None)?;
    }
    // Get a reference to the node's internal geometry
    let geometry = node.geometry()?.expect("geometry");
    // Save it to one of the supported geometry formats
    geometry.save_to_file("/tmp/output.fbx")?;
    Ok(())
}

Building

Check the documentation building section

HAPI C Documentation

More Examples

Dependencies

~0.5–5.5MB
~81K SLoC