Presentation and Visual Events
The simulation decides what happens. Presentation shows it. Presentation is everything that exists only to be seen or heard: actors and meshes, animation, particles, sound, widgets, camera moves. It reads the simulation and never writes to it, so any machine can render a match differently, at its own frame rate, in its own language and on its own hardware, and still agree on the result.
Three pieces connect the two sides, and each runs in one direction only:
- The entity bridge puts an Unreal actor on each simulation entity and moves it to match.
- Visual events tell presentation what happened, so it can play the effect.
- View models let widgets read the simulation. They are covered in UI and View Models.
The entity bridge
Section titled “The entity bridge”Every unit, building and projectile is a Blueprint of Sein Actor. It has a SeinARTS Entity Bridge component, which holds the entity’s authored data and links the actor to its entity in the simulation.
The link works like this:
- The simulation spawns an entity and queues an Entity Spawned visual event.
- The Sein Actor Bridge Subsystem spawns the Blueprint actor recorded for that entity and gives it the entity’s handle. The actor’s On Entity Initialized event fires.
- Each frame the bridge keeps the actor’s transform in step with the entity’s.
- When the entity is destroyed, the actor’s On Entity Destroyed event fires, and the actor stays for three seconds so a death animation can play. To change that for one unit type, call Set Life Span in its On Entity Destroyed handler.
Actors you place in a level are not spawned this way. The match build turns each one into an entity, in a fixed order, and the actor is the entity’s presentation from the first frame.
Some entities have no actor at all. The Player State and Game State are Is Abstract: they exist only in the simulation. So does anything else that tracks other entities without being one in the world. Abstract entities have no actor to receive events, and widgets read them through view models.
Interpolation
Section titled “Interpolation”The simulation ticks 30 times a second at the default. Your game may render at 60, 144 or more frames a second. Showing the actor only at tick positions would look like stepping.
The bridge keeps two snapshots of the entity’s transform, the previous tick and the current one. Each frame it blends between them by how far the frame is into the current tick, and sets the actor’s location, rotation and scale. Motion stays smooth at any frame rate. The price is that the picture lags the simulation by up to one tick, 33 ms at the default.
When the simulation runs many ticks in one frame, as it does while a returning player catches up or a replay seeks, there is no tick to blend across, so the actor snaps to the latest state.
Two settings on the SeinARTS Entity Bridge component control it, both under SeinARTS:
| Setting | On | Off |
|---|---|---|
| Sync Transform | The actor follows its entity every frame. | You position the actor yourself, for example a projectile that arcs on its own. |
| Interpolate Transform | Smooth motion between ticks. | The actor jumps to each tick’s transform. |
Skeletal mesh and ray tracing cost
Section titled “Skeletal mesh and ray tracing cost”A battle can have hundreds of animated actors. Under SeinARTS > Rendering, the bridge sets sensible defaults: Skeletal Mesh Performance Policy is RTS Visual Mesh, which skips physics updates that gameplay does not need, and Ray Tracing Geometry Policy is Exclude Skinned Meshes. Change them for a unit only if you need ragdolls or ray-traced skinned meshes.
Visual events
Section titled “Visual events”A visual event is a one-way message from the simulation to presentation: something happened, here is what and to whom. The event type names what happened: damage applied, an entity died, an ability activated, production finished, an entity left the map, the match paused. Each event also carries a Primary Entity, a Secondary Entity, a Value, a gameplay Tag and a Location. The meaning of those fields depends on the type, and the Sein Visual Event page lists them.
Delivery works like this:
- The simulation adds events to a queue as it ticks.
- Once each rendered frame, the bridge subsystem takes everything in the queue, in order.
- For each event it first broadcasts On Visual Event Dispatched on the subsystem. Global listeners such as a kill feed or floating combat text bind there.
- Then it hands the event to the Primary Entity’s bridge, which broadcasts On Visual Event and calls the matching event on the actor.
Every machine plays every event the same way, from the same simulation, and the simulation never reads them back. Events are one-shot: a load or reconnect discards the queue, so effects that were about to play are skipped. Use the refresh path below to restore how things look.
Events an actor receives
Section titled “Events an actor receives”A Sein Actor Blueprint has these events, called from the matching visual event:
| Actor event | When |
|---|---|
| On Entity Initialized / On Entity Destroyed | The entity appeared or was destroyed. |
| On Damage Applied | The entity took a hit: Amount, Source, Damage Type. |
| On Heal Applied | The entity was healed: Amount, Source, Heal Type. |
| On Kill | The entity killed another entity: the one it killed. |
| On Death | The entity died. |
| On Ability Activated / On Ability Ended | One of the entity’s abilities started or ended: its Ability Tag. |
| On Effect Applied / On Effect Removed | An effect reached or left the entity: its Effect Tag. |
| On Attributes Changed | An effect changed the value of one of the entity’s fields. Read the new values and update, for example by swapping a weapon model. |
Everything else, such as a game-defined event, a production event or a construction change, reaches the actor only through the bridge’s On Visual Event. It gives the whole event, and you read its type and fields.
The Notify nodes
Section titled “The Notify nodes”The framework does not resolve damage. Your ability reads your own weapon data, runs your own formula and writes your own stat. The four Notify nodes then tell presentation what happened:
- Notify Damage Applied: the target, the source, the amount and a damage-type tag.
- Notify Heal Applied: the same, for healing.
- Notify Death: the unit that died and its killer. It also produces a kill event for the killer.
- Notify Event: a cue you define, named by a tag. Its Primary Entity’s bridge raises On Visual Event with the tag, so the actor can play the effect.
They are for ability and effect graphs only. Call a Notify node after the stat is written, and before Destroy Entity: an entity that is already gone cannot be notified, and the node returns false. Notify nodes never change simulation state.
To play a muzzle flash from a Notify Event with the tag SeinARTS.Event.Fire:
- In the unit Blueprint, on Event Begin Play, get the SeinARTS Entity Bridge component and Bind Event to On Visual Event.
- In the custom event, Break Sein Visual Event. Branch on Type equal to Game Event, and on Tag matching
SeinARTS.Event.Fire. - On true, spawn a Niagara system or play a sound at the weapon socket. In the demo’s Fire event the Secondary Entity is the target and Location is the target’s position.
The demo builds this in Add Combat.
Render components
Section titled “Render components”Some presentation needs entity context but is not a unit. Three components give it that, without the actor inheriting from a SeinARTS class:
- Sein Entity Binding gives any actor an entity. A pooled effect actor, a decal or a marker can be bound with Bind To Entity Actor. It raises On Bound Visual Event for the entity’s events and On Presentation Refresh to rebuild its look from current data.
- Sein Entity Presentation adds named visibility Groups to a stable actor. A group lists scene components, and optionally an actor class to spawn while it is visible. Set Presentation Group Visible shows or hides exactly that group. Nothing outside the lists changes.
- SeinARTS Construction Renderer is a Sein Entity Presentation with two groups, Finished and Construction, switched by the entity’s construction state. It raises On Construction State Changed and On Construction Stage Changed so you can drive a scaffold or a progress effect.
Add them from the Components panel’s Add menu. See the reference pages for Sein Entity Binding Component, Sein Entity Presentation Component and Sein Construction Render Component.
Refreshing after a load
Section titled “Refreshing after a load”A visual event reports a change. It cannot rebuild a look you missed. After a load, a reconnect or a seek, the bridge on every actor broadcasts On Presentation Refresh instead, and each binding component calls its Refresh Presentation event. Each reads current data and sets its look to match: the right construction group visible, the right weapon model, the health bar at the right level. Put “set my look from the data” in the refresh handler, and “play the effect for this change” in the event handler. Keep them separate and a load restores a scene correctly.
Animation state
Section titled “Animation state”Animation reads the simulation through nodes made for animation Blueprints:
- Get Animation Movement State takes the owning actor and returns its movement state: velocity, speed, ground speed, direction, and whether it is moving, reversing, airborne, near its destination, or following a move order. It is the one-node feed for a locomotion blend space.
- Get Active Ability Visual Target returns where the unit’s active ability is aimed, for aim offsets and turret rotation. It is false when no targeted ability is active.
- Get Movement Render Value reads a number the unit’s movement mode wrote for visuals only, under a tag you choose. It reads 0 when the mode wrote none.
Copy the result into animation variables in the Anim Blueprint’s update step, then use the variables in the state machine. Animation never feeds anything back. Animation that depends on game events, such as a fire montage or a flinch, reacts to On Ability Activated, On Damage Applied or a Notify Event, which every machine receives from the same simulation.
Worked example
Section titled “Worked example”A Soldier fires at an enemy. At 144 frames per second, about five frames render per tick.
- In tick 412, the Soldier’s attack ability applies 10 damage to the enemy’s health, then calls Notify Damage Applied and Notify Event with
SeinARTS.Event.Fire. - The two events wait in the queue. The simulation finishes its tick.
- At the next rendered frame the bridge subsystem flushes the queue. On the Soldier’s actor, On Visual Event carries the Fire event, and the muzzle-flash graph runs. On the enemy’s actor, On Damage Applied fires with Amount 10, and its graph plays a hit spark.
- Over the next five frames the Soldier’s actor moves between the previous and current tick positions. It never visibly jumps.
- The health bar widget reads the enemy’s health from its view model every frame and shows the new value. Nothing in steps 3 to 5 changes the simulation.
On a second machine with a different frame rate, steps 3 to 5 happen at different moments in real time, and the same events play for the same ticks.
Common mistakes
Section titled “Common mistakes”- Writing simulation state from an actor or widget. The nodes that change state work only inside the simulation. Called from an actor or widget, they return false and write nothing. Change state in abilities, effects and systems.
- Using an actor’s location as simulation data. It is an interpolated float. Read the entity’s transform from the simulation.
- Playing a one-shot effect from refresh code. A refresh runs after every load. Put one-shots in event handlers.
- Calling a Notify node after Destroy Entity. The entity is gone, and the notification is refused. Notify first.
- Expecting an event for a change nobody notified. Only the framework’s own events and your Notify calls produce events. A stat you write silently produces none, so call a Notify node for any change presentation should show.
- Leaving Sync Transform on for an actor you move yourself. The bridge overwrites your position every frame. Turn it off for that actor.
Related
Section titled “Related”- Deterministic Simulation
- UI and View Models
- Saves and Replays
- Add Combat and Build Production Buildings, which use events and render components
- Reference: SeinARTS Entity Bridge, Sein Actor, SeinARTS Event Library, Sein Visual Event Type