# Flickering Lights ## General Workflow A flickering light source object is composed of several components.
Object Type |
Naming Template |
Description |
---|---|---|
Base RendInst | industrial_lamp_steel_wall_a.lod**.dag | This is the model used as the base for creating a flickering lamp. In some cases, it may not be required, especially if you are designing a lamp from scratch with built-in flickering functionality. |
RendInst without Emissive | industrial_lamp_steel_wall_a_base.lod**.dag | A detached part of the object without any emissive properties, exported as a separate render instance. This is necessary for: - Casting shadows (render instance shadows are significantly computationally cheaper than dynamic models shadows). - Destroying the light source (lights disappear when the render instance whose bounding box contains the centers of the light sources is destroyed). - Visually destroying the object (render instances are easily [destroyed via destructors](../about-assets/customizing_asset_destructions.md). Dealing with dynamic models is more complex, so we make them disappear following the light source rules – their pivots must fall within the bounding box of the destroyed render instance). Simply put, when the render instance is destroyed, the dynamic model disappears, the light source is removed, and the render instance breaks apart via the destructor. |
DynModel with Emissive | industrial_lamp_steel_wall_a_flicker_dynmodel.lod**.dag | A detached part of the overall model, exported with a dynamic glowing shader. Essentially, this is the part that will glow and flicker. |
AnimChar | industrial_lamp_steel_wall_a_flicker_char.animChar.blk | A simple .blk file that contains references to the dynamic model and its skeleton. Technically, this is necessary because we cannot place a dynamic model directly on the map, as it's not a static object. However, placing an animChar is possible. Example: - dynModel:t="industrial_lamp_steel_wall_a_flicker_dynmodel" - skeleton:t="industrial_lamp_steel_wall_a_flicker_skeleton" |
GameObj (Flickering Light) | industrial_lamp_steel_wall_a_flicker_8m_light.gameObj.blk | A .blk file containing the
name of the light source template from lights.blk file in the
|
GameObj (Flickering DynModel) | industrial_lamp_steel_wall_a_flicker_8m_mesh.gameObj.blk | A .blk file containing the
name of the light source template from lights.blk file in the
|
Composite | industrial_lamp_steel_wall_a_flicker_8m_cmp.composit.blk | This composite.blk file includes: - The base render instance: industrial_lamp_steel_wall_a_base.lod**.dag - The flickering light game object: industrial_lamp_steel_wall_a_flicker_8m_light.gameObj.blk - The flickering dynamic model game object: industrial_lamp_steel_wall_a_flicker_8m_mesh.gameObj.blk |
Flicker and Light Source Templates
(All templates are located in lights.blk file in the |
industrial_lamp_steel_wall_a_flicker_8m_template | Flicker Template. Defines the flicker parameters. |
industrial_lamp_steel_wall_a_flicker_8m_light | Flickering Light Source Template. Links the light source to the flicker behavior (you can use a ready-made light source or make your own). The file has the same name as the industrial_lamp_steel_wall_a_flicker_8m_light.gameObj.blk file. | |
industrial_lamp_steel_wall_a_flicker_8m_mesh | Flickering Dynamic Model Template. Links the dynamic model to the flicker behavior (via AnimChar). The file has the same name as the industrial_lamp_steel_wall_a_flicker_8m_mesh.gameObj.blk file. |
Render Instance |
Dynamic Model |
Render Instance Dynamic Model Destruction |
Render Instance Dynamic Model Destruction DMG(optional) |
---|