EffectModel#
An effect model: a representation and how it simulates and renders (engine code, like a surface model). A project effect datablock composes elements, each built on one model with values for its Parameters and a look: a material whose shader uses the model's Look surface model.
public sealed record EffectModel(string Id, string Name, IReadOnlyList<EffectParameter> Parameters, SurfaceModel Look)Record properties#
| Property | Type | Access | Constructor default |
|---|---|---|---|
Id | string | get; init; | required |
Name | string | get; init; | required |
Parameters | IReadOnlyList<EffectParameter> | get; init; | required |
Look | SurfaceModel | get; init; | required |
Members: All · DefaultLook · Find · Medium · Parameter · PressureWave · Splats · Streaks
All#
public static IReadOnlyList<EffectModel> All { get; }Initial value: new[] { Streaks, Splats, Medium, PressureWave }
DefaultLook#
public Material DefaultLook { get; }What an element without a (valid) look draws with: the look model's built-in shader and its defaults.
Find#
public static EffectModel? Find(string? id);Medium#
public static readonly EffectModel Medium;Participating media raymarched in the volume buffer. Procedural for now: each particle is a ball of fire and smoke, a sphere whose surface billows with pyroclastic noise, growing fast then slowly, rising and cooling; hot at its core (blackbody glow through the look) and cooling into smoke. Later sources: flame shapes, sparse brick volumes (simulated or baked).
Parameter#
public EffectParameter? Parameter(string name);PressureWave#
public static readonly EffectModel PressureWave;An expanding refractive hemisphere or ground ring, clipped by opaque depth. It belongs to the effect, starts and stops with its occurrence, and applies no physical impulse.
Splats#
public static readonly EffectModel Splats;Anisotropic Gaussian puffs (smoke, dust, steam, impact clouds): their density is integrated in closed form along each pixel's ray and clipped to the scene's depth, so they meet geometry softly and work with the camera inside; lit by the sun through their own cloud, sky and per-puff point/spot light estimates. Births can use an outward radial ring; puffs rise, swirl and grow through the normal simulation.
Streaks#
public static readonly EffectModel Streaks;Points with velocity (sparks, embers, rain, tracers, debris glints), simulated on the CPU and drawn as analytic capsules along their motion. Emitted from the object's position within a cone around its local up (+Y).
Related types#
EffectParameter · Material · SurfaceModel
Source#
- EffectModel.cs