Skip to content

Flow Graph Engine with Bifrost: Python sample demonstrating how to leverage the Bifrost executor to scatter trees on a plane.

License

Notifications You must be signed in to change notification settings

autodesk-platform-services/aps-flowgraphengine-bifrost-python-sample

Repository files navigation

Scatter trees sample (Python)

Python Platforms Applications

MIT

This sample app let you scatter trees on a given object using the Flow Graph Engine API. To do so, this sample use the bifrost executor to execute the provided bifrost graph. This what the graph looks like when loaded in Maya.

thumbnail

Setup

Prerequisites

  1. APS Account: Retrieve your app's client_id and client_secret from the Developer Portal.
  2. Python basic knowledge.
  3. Maya (optional) to view/edit the Bifrost graph being executed

Setup

Install the required packages using pip install -r ./requirements.txt.

Set the following environment variable with your APS app client id and secret

APS_CLIENT_ID={YOUR_CLIENT_ID}
APS_CLIENT_SECRET={YOUR_CLIENT_SCRET}

Running

By default, this Flow Graph Engine Job sample execute this bifrost graph file with the following inputs:

  • a usd file in which the first mesh prim will be used to scatter on
  • An amount of trees to scatter. Set to 1000 in the code.
  • A usd output file name where to write the output scattered trees

To execute the code, run python fge_addtrees.py --trees 1000

Further Learning

License

This code is licensed under the terms of the MIT License. Please see the LICENSE file for more details.

About

Flow Graph Engine with Bifrost: Python sample demonstrating how to leverage the Bifrost executor to scatter trees on a plane.

Topics

Resources

License

Stars

Watchers

Forks

Languages