v2.0

Scripting and the farm

Last updated 7 November 2026

FollicleFX grooms can be cooked, rendered and even built without opening Blender. This page is for a studio's technical directors: what runs where, what needs a licence, and the scripts to start from.

Everything here comes in the studio tools download, one zip per platform, with a Studio licence: sign in on the FollicleFX website and find it on your account page under Downloads. Use the zip with the same version as the add-on that made the groom:

  • Windows x86-64.
  • Linux x86-64: Rocky or Alma Linux 9 or newer (the VFX Reference Platform), or any Linux with glibc 2.34 or newer.

The same groom file gives exactly the same hair on Windows and on Linux, so a farm can mix both.

The render plugins for Arnold, RenderMan, V-Ray and USD are a separate download, the render procedurals zip, on the same page; see Rendering outside Blender.

What needs a licence#

What Licence
Rendering a groom file (the render plugins, ffx-cook, folliclefx_eval) none
Baking a groom's simulation on the farm (ffx-sim) none
Per-shot tweaks: seed, density, length, a modifier off, render percent none
Building or changing a groom in Python (folliclefx_author) a FollicleFX licence on that machine
Writing a groom file a FollicleFX licence

The rule is the one Blender follows: looking at what a licensed artist made is free; making or changing a groom needs a licence. Without one, a script builds a Community groom, with the same limits as Blender's Community edition.

The farm tools#

farm/ holds ffx-cook and ffx-sim and the engine beside them. Keep the folder together.

ffx-cook hero.ffxg --frames 1001-1240 --scalp shot_head.abc --out hair.abc
ffx-sim  hero.ffxg --frames 1001-1240 --scalp shot_head.abc --collider body.abc --out hair.abc
  • ffx-cook cooks each frame on its own, so frames can be split across nodes.
  • ffx-sim runs the simulation from the groom's start frame, in order, on one node. It writes the same file Blender's Bake writes.

The full option list is in the zip's README.

Reading a groom file in Python#

pip install folliclefx_eval-*.whl
import folliclefx_eval as fe

with fe.Groom("hero.ffxg") as g:
    g.set_frame(1001)
    g.cook()
    s = g.strands()               # positions, point counts, radii, root UVs, ids
    print(len(s["point_counts"]), "strands")

This is free, and it is what the render plugins use.

Building a groom in Python#

pip install folliclefx_author-*.whl          # Python 3.12 or newer

The scripting API is the same one the Blender add-on has, so a script written in Blender's Python console runs here too.

import numpy as np
import folliclefx_author as fa

host = fa.HeadlessHost()
host.use_licence()                       # this machine's licence (else Community)

# The scalp, as arrays: vertices and normals (n x 3), UVs (n x 2), triangles (3 per face).
host.add_scalp("Head", vertices, normals, uvs, triangles)

g = fa.api.add_groom(host, "Head", "HAIR")
with g.batch():                          # one undo step, one cook
    frizz = g.add("FRIZZ")
    frizz.params["magnitude"] = 0.2
    frizz.expressions["magnitude"] = "0.2 * u"

positions, counts = host.strands(g.uid)  # the cooked hair, as arrays
host.write(g.uid, "hero.ffxg")           # then render it anywhere

Batch work, such as applying a preset to forty characters or checking every groom in a show, is a loop over that.

What a script outside Blender cannot do:

  • Painted maps. A parameter painted in Blender has no image here. Drive it with an expression or a value instead, or build the groom in Blender.
  • Viewport tools and sculpting.

A call that needs one of these says so; it does not silently do nothing.

Licences on farm nodes#

Rendering and baking need no licence on a node. Only a script that builds or changes grooms needs one. On a workstation, that's the licence Blender already uses (host.use_licence()).

On a farm node, a script with a Studio licence takes one of its floating seats for the length of the job and gives it back at the end:

import os
import folliclefx_author as fa

with fa.ffx.licence.PipelineSeat(os.environ["FFX_STUDIO_KEY"]) as seat:
    host = fa.HeadlessHost()
    ...                                   # build, change and write grooms
# the seat is free again for the next machine

A pipeline seat is the same as an artist's seat:

  • It counts against the Studio's seats.
  • Its lease runs for 24 hours. A longer job calls seat.renew() within that time.
  • It shows in the seat list on your account page, under the node's name.

When every seat is in use, the script stops with the server's reason (SeatRefused) instead of quietly building Community grooms. Nothing is saved on the node.

Something wrong or missing on this page? Tell us on Discord or at support@folliclefx.com.