The DAZ Crowd Spawner is a custom DAZ Studio 4.24 scripting system designed for procedurally populating crowd scenes using precise marker/figure logic, a clean locked UI, and reproducible randomness.
This repository serves as the single source of truth for all canonical components of the DAZ Crowd Spawner system.
This project provides artists and technical directors with a consistent, non-destructive way to spawn randomized, yet controlled, character instances into complex DAZ Studio scenes. It aims to be highly deterministic, lightweight, and simple to use.
- Locked Logic: All spawn logic is defined and version-controlled. No implicit rewrites or regenerations are allowed.
- Locked UI: The UI is fixed using
DzBasicDialogwith strict geometry-based layout, no frills. - Reproducibility: Seeding is supported to produce identical crowd layouts.
- Minimal Assumptions: The spawner infers only what is explicitly defined in the configuration.
The following files represent the locked system definitions:
crowdspawnerui.dsa– The exact dialog script that collects spawn configuration from the user.crowdspawnerlogic.dsa– The logic that performs marker-to-figure placement, randomization, and instancing.crowdspawnerdesignguide.md– The full specification governing the UI layout, behavioral expectations, and design rules.
All changes to these files must be intentional and documented.
To use the DAZ Crowd Spawner:
- Open
crowdspawnerui.dsain DAZ Studio's script editor. - Run the script to configure your crowd settings.
- Hook the configuration output into
crowdspawnerlogic.dsafor placement.
MIT License unless otherwise specified.
This repo is not open to public contributions to ensure the integrity of locked components. Forks are allowed for customization, but must not be represented as canonical.
Actively maintained by the original author. Locked components are stable unless explicitly versioned.
| Function Name | Description |
|---|---|
readFileToString(path) |
Reads a file from disk and returns its full contents as a string. |
loadCrowdSpawnerJson(path) |
Loads and parses the crowd spawner JSON config file. |
getNodeByLabel(label) |
Finds and returns a scene node with a specific label. |
applySkinToFigureByLabel(label, path) |
Applies a skin material preset to the figure with the given label. |
applyHairToFigureByLabel(label, path) |
Applies a hair material preset to the figure with the given label. |
randomFromArray(array) |
Returns a random element from an array. |
weightedRandomGroup(obj) |
Selects a random key from a dictionary-style object (used for style groups). |
getHighestSpawnIndex(prefix) |
Returns the highest numeric index of figures with the given label prefix. |
spawnCrowdFigure(charConfig, actorFile, spawnIndex) |
Spawns a figure, finds the newly added node, sets its label, and selects it. |