Coder Social home page Coder Social logo

hapi-rs's Introduction

Rust bindings to Houdini Engine API

Cargo Documentation MIT/Apache 2.0

SideFX Houdini Meets Rust!

SideFx Houdini is 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

HDA Viewer Demo

ogl-viewport-demo.mp4

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(None)?;
    // Load a Houdini Asset and create a node
    let lib = session.load_asset_file("otls/hapi_geo.hda")?;
    let node = lib.create_asset_for_node("Object/hapi_geo", 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

hapi-rs's People

Contributors

alexxbb avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.