Variable intensity of interior lighting

Willkommen in der OMSI-WebDisk!
Als Gast kannst du nur Inhalte in deiner ausgewählten Sprache sehen. Registrierte Nutzer können die Sichtbarkeit anderer Sprachen in ihrem Kontrollzentrum aktivieren, weitere Infos hier.
Alle Themen sind in den Foren mit einer Sprachflagge gekennzeichnet: = Englisch [EN], = Deutsch [DE], = Französisch [FR]. Wenn du die angegebene Sprache nicht beherrschst, schreibe auf Englisch!
  • Hello, guys!

    As the title suggests, I would like to know if one can change the intensity of a given [interiorlight] tag dinamically in-game through a switch/knob. I would like to script a three-stage dimmable driver's cabin light, but due to the limitations of the [illumination_interior] tag (i.e. maximum 4 light sources that can illuminate a given mesh) I can't create separate [interiorlight] tags for each intensity stage.

    Thanks!

  • As for the limitation of 4 light source coupling per mesh, there are two tactics that can, in isolation or combined, to an extent, serve as a workaround (assuming that offloading some of the desired effects to [matl_lightmap] / [~nightmap] / [~allcolor] presents no viable alternative).


    For one, you may re-declare a [mesh] as many times as necessary (with mutually-exclusive [visible]-setting) for all permissible combinations of active light sources to be enumerated. IIRC, this technique is employed for the first row of seats in one of the vanilla M+R SDs (potentially depending on frame rate, while cycling through the state of interior lighting, one might catch a glimpse of said object disappearing / reappearing).


    For two, you may introduce "synthetic" [interiorlight](s), grouping together multiple physical light sources with the intent of bringing their number of combinations down.


    An example based on the original interior lighting scheme of the Citaro: Suppose that you'd like the steering wheel to be illuminated by the driver's light alongside 4 of the fluorescent tubes arranged longitudinally, so by 5 light sources total. Suppose additionally that all 5 sources shall still remain individually controllable, so as to be able to e.g. simulate defective units. Here's how you could go about it:

    1. As usual, have one [interiorlight] for each of the 5 sources as-is.
    2. Introduce one further [interiorlight] for the first two (first on the left and first on the right) tubes represented jointly (so positioned between the two and with a radius sufficient to enclose the originals).
    3. Duplicate the steering wheel [mesh] declaration; add a [visible] constraint to each.
    4. Script the mesh visibility transitioning, ideally striving for balance between performance (avoiding unnecessary reassignment of the visibility variable) and aesthetics / immersion.

    Skeletal implementation:

    Einmal editiert, zuletzt von Unorthodox Paradox () aus folgendem Grund: Bugs n' typos

  • [matl_allcolor] is for modifying material color attributes; it can be attached to a [matl] or [matl_change] / [matl_item] tag.


    Quoting its syntax from "OMSI SDK DEU_02_2011 0514.pdf" (to be found under "OMSI-SDK_2DEU_0.02.zip", retrievable here) :

    Its prevalent application is brightening up key meshes in (user-unfocused) AI vehicles' interiors at times of their interior lighting being active, in lieu of the dynamic [interiorlight]s which OMSI refuses to apply in this context (curiously it still applies them to any passengers within such vehicles... go figure).