|
IVSmoke 1.0
|
AIVSmokeVoxelVolume is the central actor of the IVSmoke plugin. It is responsible for the simulation, management, and replication of physically aware volumetric smoke.
Unlike traditional particle-based smoke, this actor utilizes a voxel-based deterministic flood-fill algorithm. This allows the smoke to naturally expand into spaces, flow around corners, and be blocked by walls, creating high-fidelity tactical concealment without clipping through geometry.
The volume generates a 3D grid of voxels. Starting from the center, the smoke performs a Lazy Theta*-based pathfinding expansion.
VoxelCollisionChannel) against the world geometry.ExpansionNoise to the pathfinding cost, the smoke creates irregular, organic shapes rather than perfect spheres.To maintain high performance and low bandwidth usage, voxel data is never replicated.
Instead, the simulation is fully deterministic:
RandomSeed and a synchronized StartTime.CRITICAL: Network Determinism & Collision Channels The simulation is deterministic, meaning clients calculate the smoke shape locally to save bandwidth. However, they rely on the world geometry being identical to the server.
If you set the VoxelCollisionChannel to detect Dynamic Objects (e.g., destructible walls, moving doors, or vehicles), you MUST ensure those objects are perfectly synchronized (replicated) across the network.
ECC_WorldStatic or a custom channel dedicated to static level geometry.The actor operates on a state machine (EIVSmokeVoxelVolumeState) that progresses based on duration settings.
ExpansionCurve and ExpansionDuration.FadeInDuration.MaxVoxelNum limit). It maintains its shape and density.SustainDuration. If bIsInfinite is true, it remains in this state indefinitely.DissipationCurve and DissipationDuration.bDestroyOnFinish is enabled, the actor is destroyed. Otherwise, it resets to an Idle state.The visual fidelity and performance cost are managed by balancing the physical size of the voxels against the total number of voxels allowed.
| Property | Description | Impact |
|---|---|---|
| Voxel Size | The physical scale of a single voxel (in cm). | Visual Resolution. Changing this does not affect performance (CPU/GPU) directly. It simply scales the resulting mesh. |
• Large Value: Covers a large area cheaply, but looks "blocky."
• Small Value: Finer detail. To cover a large area with small voxels, you must increase MaxVoxelNum. | | Max Voxel Num | The hard limit on the number of active voxels. | Performance Budget. This is the primary factor for CPU simulation cost. | | Volume Extent | The grid index radius. | Memory Usage. Defines the maximum memory buffer size. Keep this optimized (e.g., 8-16) to minimize memory footprint. |
The overall shape of the smoke cloud is defined by the Radii and Noise settings.
Radii defines the relative shape ratio of the expansion per axis. These are not absolute units; they function as weights for the flood-fill propagation.
(1.0, 1.0, 1.0) : Creates a Sphere.(2.0, 2.0, 2.0) : Also creates a Sphere (since the ratios are identical).(2.0, 1.0, 1.0) : Creates an Ellipsoid that stretches twice as far along the X-axis compared to Y and Z.(1.0, 1.0, 0.5) : Creates a flattened "pancake" shape.Adds randomness to the pathfinding cost.
A common challenge with deterministic simulations is handling clients who join the game after the smoke has already started.
AIVSmokeVoxelVolume handles this automatically:
Generation count.The simulation relies on GetSyncWorldTimeSeconds() to ensure that the expansion animation plays at the exact same world-time timestamp on all clients, compensating for network latency.
This actor coordinates with helper components to handle gameplay interactions:
UIVSmokeHoleGeneratorComponent):**UIVSmokeCollisionComponent):**Interaction vs. Simulation Do not confuse
VoxelCollisionChannel(Settings) withUIVSmokeCollisionComponent(Component).
The class includes robust editor and runtime debugging tools located under Debug Settings.
StartPreviewSimulation to visualize the smoke expansion without entering Play Mode.Note on Checksums: The debug text displays a CRC32 Checksum. If you suspect a desync issue, compare this number between the Server and Client. They must match exactly.
You can control debug visualizations at runtime using the console (~ key). These commands affect all active AIVSmokeVoxelVolume actors in the world simultaneously.
All commands share the prefix: **IVSmoke.Volume.**
| Command | Arguments | Description |
|---|---|---|
**IVSmoke.Volume.Debug** | 0 or 1 | Master Switch. Toggles the entire debug system on or off. Setting this to 0 hides all visualizations immediately. |
**IVSmoke.Volume.ShowWireframe** | 0 or 1 | Toggles the lightweight wireframe cube visualization for active voxels. |
**IVSmoke.Volume.ShowMesh** | 0 or 1 | Toggles the Instanced Static Mesh visualization. Warning: Rendering thousands of meshes can be expensive. |
**IVSmoke.Volume.ShowStatus** | 0 or 1 | Toggles the floating status text (State, Voxel Count, Checksum) above the actor. |
**IVSmoke.Volume.SetViewMode** | Mode ID | Changes visualization color. Use **0** for Solid Color (default) or **1** for Heatmap (gradient based on generation order). |
Copyright (c) 2026, Team SDB. All rights reserved.