Docs

Kindling docs

Guides for building games with Kindling, Borrowed Torch's in-house engine.

Kindling is in active development, so these docs are a work in progress. Articles marked Draft are still being written.

Getting started

ECS

Audio

UI

Randomness

Camera

Transform gizmo

Scene gizmo

Shaping functions

MonoInput

Input binder

Ray tracing

Frame rate counter

Fabric simulation

Quick start guide

Set up BorrowedTorch.FabricSimulator and the build of its shaders, hang a first sheet of cloth in the wind and draw it, and find your way around the fabric simulation pages.

The sheet and the step

Building the sheet, what it reads when it is built, rebuilding by itself, its sizes as built, the fixed step and what one does, several sheets, and driving the solver without a Fabric.

Drawing the cloth

The vertex shader that reads the particles, what to bind every frame, the triangles, three rules a shader keeps, drawing between steps, texture coordinates, the particle record and the headers' version.

Placement and pins

Where the sheet hangs, in which plane and at what angle, the starting ripple, pin presets and pins of your own, pinning and letting go on the live sheet, long-range attachments, and moving pins.

Settings

The settings read every frame and the ones read at a build, rates stated per 1/120 s, the solver, bending and creases, mass and gravity, the sheet's own settings, what costs the most, and going back to the defaults.

Wind and air

The wind as the air's velocity, gusts computed every frame, wind that varies across the sheet as an HLSL function of position, drag, and aerodynamic pressure for sails and parachutes.

Collisions and rest

The sphere and the ground and their friction, self-collision and the cloth's thickness, the pairing of thickness and slack, the spatial hash behind it, and how settled cloth comes to rest and stays exactly still.

Cuts and tears

Cutting the live sheet along strokes on the flat cloth, what a cut does, single threads and mending, clean lips from the cut mesh and how to draw it, the awkward cases, and the damage as data.

Cutting what you see

Capturing a pose of the sheet to pick against, recording a knife's drag with a stroke, how a stroke joins and breaks, the layers under one ray, scissors through a pile, and surfaces across rebuilds.

Diagnostics

Reading the sheet back once for every check, how much of it rests and how much is held, how close it comes to outrunning its contacts, what self-collision lost, penetration and creases measured on the CPU, and checks of your own.

Tour of the solver

An illustrated walk through the solver's source, layer by layer, from the particle record and the step loop to the kernels, the cuts and the demo.

Glossary

Every type and HLSL file of the fabric simulation library with its members, one page each.

Capabilities

Systems

Tools