Skip to content

ProceduralModel

Not yet Class Other

Procedural models support edit-time procedural generation. Instead of manually constructing model content, a procedural model generates its contents automatically in response to parameter changes.

Not implemented yet

This class exists in the current Roblox API but is not implemented in Nova yet. Scripts that reference it will fail at runtime.

0 Nova members · 11 modern Roblox members not implemented yet

Description

ProceduralModel inherits from Model and supports edit-time procedural generation of its contents. Instead of manually constructing model content, a procedural model generates its contents automatically in response to parameter changes.

Generation is defined by a generator module, a ModuleScript referenced by the Generator property. The engine invokes the module's OnGenerate function to produce the model's contents.

A procedural model regenerates when any of the following inputs change:

  • The Size property of the procedural model, which defines a bounding box for the model to generate within.
  • Any attributes on the procedural mode, as defined by the generator module.
  • The generator's module sandboxing configuration (Sandboxed and Capabilities).
  • The source code of the generator module.

When any of these inputs change, the engine schedules regeneration. This scheduled regeneration is performed by calling OnGenerate and applying its results once it returns. In most cases, generation happens within the same frame, but can be deferred to maintain performance.

Inheritance

Object → Instance → PVInstance → Model → ProceduralModel

Properties

Member Signature Summary
Dirty Dirty: bool —
GenerationError GenerationError: string Stores errors that the generator module might encounter during generation.
Generator Generator: ModuleScript A reference to a ModuleScript that contains code which defines how the ProceduralModel generates its contents in response to parameter changes.
Size Size: Vector3 Defines the bounding volume used for generation.

Methods

Member Signature Summary
ForceGeneration ProceduralModel:ForceGeneration(): bool Immediately runs any pending generation instead of waiting for the scheduled regeneration.
WaitForGenerationAsync ProceduralModel:WaitForGenerationAsync(): bool Waits for generation to complete after making parameter changes.

Roblox reference: ProceduralModel

Generated from Nova's API dump and Roblox creator-docs. Nova-only members come from the engine's reflection metadata.