Light

Bald ist es soweit: Unsere nächste Leitstellenfahrt findet statt. Weitere Informationen findet ihr hier.

  • The light in Omsi is very complex and extensive. There are several types of light that can be set individually. Only an interplay of all variants results in a harmonious overall lighting. This tutorial explains the individual variants and possibilities, the purposes and implementation.

    The light in Omsi is very complex and extensive. There are several types of light that can be set individually. Only an interplay of all variants results in a harmonious overall lighting. This tutorial explains the individual variants and possibilities, the purposes and implementation.

    1. Basic information about light

    Light is a very complex and elaborate subject in Omsi. While in reality a light source (point of light) causes a light shine and thus illuminates or brightens up objects and the same objects also cast shadows, in Omsi these connections have to be created individually and adjusted exactly. This means that you cannot simply set a light source, but you have to set the light, shadows and the light sources and shades belonging to the object separately. Moreover, there is also the possibility to create light textures. Every single variant has its advantages but also its disadvantages.

    The big advantage, with the light in Omsi, is the high quality of the lighting, which can be achieved in Omsi. The disadvantage, however, is the considerable effort. The higher the quality you want to achieve, the more effort you have to invest. Only the right interaction of the individual possibilities results in the right and almost real lighting atmosphere in and on the vehicle. A 100% implementation is still not possible. One can only try to adjust the light as real as possible.

    In this tutorial, it should be primarily about the lighting possibilities in vehicles. For the object lighting, there are again different forms. Only the basics are the same. A certain basis for the scripts are unfortunately indispensable for this tutorial. Also, the creation of 3D objects can not be discussed here. Therefore, the handling of a 3D program is assumed to be given. Therefore, this article is limited to the light types and the settings, as well as the implementation of the light.


    There are several possibilities to bring light in or on a vehicle. All together result in a relatively original light behavior. The entries for the light can be found in the respective model.cfg of a vehicle. The light control, i.e. when a light should go on or off, can be found in the scripts. There it is defined when a light variable has the state zero (light off) or the state one (light on). Furthermore, you can also equip a light type with a dimmer. For an adjustment of the light, the use of a 3D program is not mandatory. However, depending on the object construction, it may be necessary to change the 3D objects if the light behavior is to be adapted or changed.

    1.1. Thedifferent types of light

    For the vehicles in Omsi there are 5 different ways to implement light. In detail these are:


    Light textures - these are put on or changed,

    Light points - these are the light sources that do not produce any shine but are visible,

    Light shine - the light generated independently of light points and only brings the light shine, i.e. only the light effect,

    Spotlight - This light belongs to the vehicle, only produces the light beam, but can only illuminate foreign objects that do not belong to the vehicle (map objects, AI vehicles, passers-by).

    Object Illumination - This is used to illuminate objects with their daytime textures regardless of the actual brightness of the game environment, and then create the appearance of being illuminated.


    Every single variant is implemented individually and independently from others. Together, they form the complete vehicle lighting. The effort for one of the possibilities is still manageable. The complexity increases, however, if the individual lighting options are to be adapted to each other.

    1.2. Basics ofthe individual lighting variants

    The individual lighting variants can be implemented quite easily. However, there are limits in Omsi, which mean that one light variant alone can be used, but only an interplay of several variants can produce a satisfactory result. The easy implementation of the individual variants, but does not make the composition in a vehicle easy. In reality, there is a light source that emits a light beam, directly and straight from the light source. However, these light rays cannot penetrate objects if they are not transparent or the light rays cannot penetrate the density of the objects properly. Thus, objects create shadows. Furthermore, light rays reflect from objects. The brighter the surface of an object, the more light rays reflect from the objects and illuminate other objects indirectly. In Omsi all objects are penetrated. Therefore, no real shadows are created in Omsi and no light rays are reflected. These shadows and light reflections have to be implemented by textures. Therefore an interaction of all possibilities is essential for the quality, which unfortunately also makes the effort considerable. Since several light sources from different directions also influence the shadows of the objects, there are limits in Omsi that influence the shading. Further disadvantages are the allowed number of assignments of light sources to an object or the unique spot light.

    2. LightTextures

    Light textures can be found in and around the bus in many places. On the bus, for example, they serve as indicator lights, or for light sources such as interior lights or lights on the bus, such as headlights or taillights. Light textures are usually found in places that are intended to illuminate one or a small group of light points or illuminated objects.

    Here, an object is mapped with so-called day textures, which the object shows when it is switched off. By changing the associated variable, a night texture is either applied or replaced. The conversion is the same for both, only the corresponding command changes. The change of the command causes an object to behave as if it would be illuminated directly or indirectly. During the day all objects are illuminated by the Omsi-Sun. At night these objects are no longer illuminated. With the help of the texture change, another texture is placed or exchanged on an object. This texture will be displayed so brightly that this texture appears as shining. The brighter the night texture is, the brighter the object shines. A dark light texture gives the impression of indirect lighting.

    2.1. Advantagesand disadvantages of light textures

    Light textures are the easiest to implement of all other lighting variants. Due to the brightness of the changing texture, the brightness can be controlled very easily via the texture. In addition, the brightness can also be made dimmable by script. This implementation is a bit more difficult, but still feasible. In addition, light textures can be set in color by the textures. And also textures can be displayed brightly.

    The three biggest disadvantages of light textures are on the one hand that light textures can't be switched on and off slowly (afterglow of the light bodies). There is only the state on or off. Furthermore, light textures have no light effect, so they cannot illuminate other objects in the bus. The last disadvantage is the point of overluminescence. Not always the luminous fields are shielded in such a way that the light underneath does not light up neighbouring light fields a bit. This is not possible with light textures.


    Also the implementation of light textures is not very easy, because light and shades can or should appear together. Here, a clean work with an appropriate image processing program is important. One must not forget that most of the illuminated objects, like control lamps, are controlled by a light bulb or a diode. So there is a bright center point that loses some brightness to the outside.


    Advantages

    Disadvantages

    Easy to implement

    no slow switching on or off possible

    Texture brightness determines the luminosity

    Light textures do not produce any light

    Night textures are applied differently

    No transmission to adjacent objects

    Objects can be made dimmable

    Battery dependent brightness can only be controlled via scripts (few levels)

    Quality determines appearance

    no blasting possible

    Some of the disadvantages can be reduced by combining the other types of light. For example, you can use the colours to simulate the difference between an incandescent lamp or an LED. The design of light bodies also allows differences between simple incandescent lamps, halogen lamps, LEDs or fluorescent tubes. The biggest disadvantage is the gradation of brightness. So you can't make light textures dependent on the capacity of the battery. The less battery capacity there is, the darker the light becomes. The maximum brightness is only reached when the engine and thus also the alternator is running and a maximum on-board voltage of 26 volts (charging voltage) is applied. Without the engine running, the battery has only a theoretical value of maximum 24 volts. In real values the charge voltage is 26.8 volts and the maximum battery voltage is 21.6 volts. This difference cannot be realized with light textures in Omsi alone. The difference between running and stopped motor can be adjusted with the scripts. Here, too, the amount of work is decisive for the final result. Theoretically you can use many gradations, but no slow extinction of the light textures with decreasing battery capacity.

    2.2. Applicationsin vehicles

    Light textures can be found in vehicles in many places. Among other things, they are used to implement indicator lights in the dashboard, outer light caps and headlights, interior light bulbs, display, matrix, roll tape or target sign lighting. Indirect lighting is of course also possible, such as the lighting of round instruments, buttons and switches or the lighting of the rear registration plates on the vehicle. These can also be used to illuminate the interior. Since the vehicle light in Omsi cannot create shadows, you can also create shadow effects with appropriate shadow textures.

    The more light variations you create together, the better the light in the bus becomes. But desdo also the required amount of work becomes bigger. And this can become considerable. On the other hand there are also limits. These limits can be seen best in the shadow textures. If several light sources shine on an object from different directions, the shadows cast and the illumination of the areas under the object change. Here, several different shadows can be created using textures, but there are some disadvantages: Omsi works better with fewer textures than with many and the effort to set the different shadow textures is out of proportion to the final result.

    2.3. Implementation of light textures

    The implementation is very simple. On the one hand you need at least two textures. When building objects in a 3D program, each object is provided with a switched off texture (the so-called day texture). This should not have pure black (color code 0, 0, 0). By using pure black, the object cannot appear bright during the day. A grey scale is sufficient. The second texture may have black areas all over again, so that the things that should not shine later do not shine. For example a small box in black or a bright stop request indicator. All areas on the night texture that should not glow later, such as the housing of a light box, must be made black on the night texture. So later only what should glow, while the object body itself does not glow.

    To create night textures, it is helpful to use the day texture. This texture is copied and made black, but only the areas that should glow later will not be black. These later glowing areas are then illuminated and converted to look as if they would glow. The only important thing is that the illuminated areas do not change their position in the night texture, but stay where they are on the day texture. Otherwise the position changes in the game will be visible later, which makes the textures twitch. But at the same time you can for example display symbols inverted or change characters.

    Finally both textures are copied into the texture folder. If the object was inserted in the model folder, you create the necessary entries in the model.cfg.


    Sample image:

    ?thumbnail=1On the left side you will find the daily texture. This is how the indicator lights are displayed during the day when the indicator lights are switched off. Herewith you can assign a texture to 10 different objects. The same texture exists twice. The right side shows the texture a second time. This is used as night texture. If the respective variable is active to activate the texture change, Omsi switches and the texture cutout on the right side is placed on the object. It doesn't matter if it is light or dark in Omsi, the applied night texture always glows, because it has to be designed as a direct light. If you would set it as indirect light, you would see the effect only at night.


    Texture examples come from the add-on MAN city bus families from Chrizzly92 and have been slightly modifi



    2.4. Entry of the light texture in the model.cfg

    These entries are also made quickly. Here are the standard commands that control the texture change and two commands that can be used optionally, depending on the effect you want to achieve:

    Entry in the model.cfgDeclaration of registrations
    [mesh]
    Object name.o3d
    Command that adds an object File name and file extension of the model file
    [matl_change]
    Daily texture.jpg
    0
    Activation variable
    Command to do something with the texture Texture name and file extension, the day texture with which the object was mapped Texture layer to be changed Variable to activate the texture change
    [matl_item]Command that the texture layer should be changed
    [matl_nightmap] or [matl_lightmap]
    Night texture.jpg
    Command that and how to use the following light texture File name and file extension of the night texture

    The rest is controlled by the script. If the variable to activate is 1, then the texture is changed. The entered variable then decides when the implementation of the lighting effect is used. Here the application possibilities are manifold.

    The entered variable "zero" corresponds to the selected texture layer.

    [errorbox]Important! The entered texture name under the command [matl_change] MUST be identical to the file name of the mapped texture

    were in agreement. Otherwise the texture change will not work and Omsi will report this error in the log file. This error makes

    is noticeable in Omsi by the fact that many script variables no longer work.[/errorbox]

    2.5. Direct or indirect light

    To make an object glow directly, use this command:

    [matl_nightmap]


    This makes the light texture very bright, so that you can see the glow even at high brightness (during the day in sunlight). So the light has its own luminosity, because you can see the light body in a certain way. This can be found with light sources with semi-transparent light caps, such as control lights or flashing lights.


    If you want to illuminate an object, i.e. achieve the effect that the object is only illuminated (indirect illumination), use the command

    [matl_lightmap]

    With the command [matl_lightmap] it does not matter if the texture of the light area is snow white or has a colored night texture. Because here the texture is not changed, but the day texture is overlaid by the night texture and brightened. This variant is useful for indirectly illuminated objects, such as license plate illumination, target or roller strips or round instruments that are not backlit and not partially transparent.


    The difference between the two textures is striking. While the direct light texture [matl_nightmap] illuminates at night as well as during the day, the light effect of indirect illumination is only visible at night. During the day the difference is hardly noticeable. In strong sunlight, there is hardly any noticeable difference. At night there is a difference again. Compared to the [matl_nightmap] command, where the texture is very luminous, the luminosity is much lower with indirect lighting, with the [matl_lightmap] command.

    3. Light points

    Light points simulate the presence of light sources that can be seen directly. In reality, this corresponds to what you see when you turn on a light bulb while you can see the bulb directly. In Omsi, this makes the presence of a light source visible. But light points have no further function in Omsi. While textures are only light, light points can also have an optical light effect for the player. So you can give a light source a certain Beldeffekt, which creates a light corona for the viewer.

    3.1. Advantages and disadvantages of light points

    This list is very short. You can make light sources visible and you can put several light points in the same place to create them with different intensity and / or color. The large number of setting options allows you to make the light point visible in a certain direction, to shine out of objects and much more. Apart from that this light variant has no other function in Omsi. It does not produce any light shine and therefore has no light effect on objects.


    3.2. Use of light points

    In vehicles, these light points can be found in many places, but mainly outside the bus. One area of application is at the front of the headlights. A normal headlight can produce up to three different bright lights. Parking light, low beam and the high beam. While the parking light is best realized with one light texture, the low beam and the high beam can be realized with different light points. However, this means that these light points do not cast any light on the road. These light points only have the purpose to represent a light point.

    Furthermore, light points can also be found on the additional lights, rear lights and position lights. Inside the vehicle, you can use these light points on the interior light (halogen spots, door lights, interior lights or indicator lights.

    Due to the high number of possible settings, the use of a light point is very variable and can be used in many different ways. Further advantages can be explained in the section Registration of light points in the model.cfg. When such a light point becomes active is again decided by the variable whose state is calculated in the script.

    3.3. Conversion of light points

    Light points can be implemented very easily. For this purpose you only have to enter the light points in the model.cfg. With the help of the given variable to activate, you can control the light point specifically. For a light point there is a command, once without and once with a prefix.


    [light_enh]

    [light_enh_2]


    The difference lies in the number of strings to be read under the command. Without the prefix _2, the scope is smaller.

    Important note! Basically it does not matter where the light points are entered in the model.cfg. But the light points must never be entered under [mesh]-entries with animations, if they should not be animated. Because you cannot give light points a separate animation, it is possible to assign light points to an entered animation. For this purpose the light points are entered below the animated object. If light points are erroneously entered under an animated object, although the light points are supposed to be immobile, then the light points will move with it. In the following example, the light points of the rear lights were entered under the steering wheel.


    ?thumbnail=1?thumbnail=1As these light points are entered under the steering wheel, use the

    the light points not only animate the steering wheel, but also

    the object origin of the steering wheel, for the animation origin In

    in this example picture the animation is unintentional. At others

    examples, an animation may be desired, for example if

    the rear lights are located on an animated tailgate, such as

    can be seen in the second example picture.



    Otherwise, the light points are entered under a non-animated object. For the non-animated object, the [mesh] entry must not have an inherited animation assignment [animparent].

    3.4. Coordinate system in Omsi

    The coordinate system in Omsi, is explained in detail in the article Blender: Import/Export 3D models.

    3.5. Entry of light points

    This section will be somewhat extensive. Because there are two different commands to enter light points. The selected command decides the amount of settings. For simplicity, the long command is explained here.


    [light_enh] with 11 following strings (lines to read).

    [light_enh_2] with 25 following strings.


    [light_enh_2]

    1. Position on the X axis
    2. Position on the Y axis
    3. Position on the Z axis
    4. Direction on the X axis
    5. Direction on the Y-axis
    6. Direction-on-the-Z-axis
    7. Vector of the light cone on the X axis
    8. Vector of the light cone on the Y axis
    9. Vector of the light cone on the Z axis
    10. Alignment of the light spot
    11. Rotation Alignment
    12. Colour value red
    13. Green colour value
    14. Colour value blue
    15. Size of the light spot
    16. Angle of the inner light cone
    17. Angle of the outer light cone
    18. Variable for activating the light spot
    19. Brightness variable
    20. Multiplication factor
    21. Alignment to the player's view
    22. Light effect
    23. Light cone
    24. Time constant
    25. Effect Texture

    The explanations of the individual strings (lines) now follow.

    3.5.1. Position on the X axis

    This defines where the light point is located in relation to the X axis (lateral alignment), referred to the center of the bus. The X-axis extends from the front of the bus to the back and divides the bus into a left and right side. A positive value, shifts the light point to the right (front view) and all values are set in meters.

    With a vehicle width of 2.50 meters, there is one light point that should be on the right side, so at maximum 1.25. A negative value shifts the light point to the left. For this purpose, the position value is only preceded by a "minus".

    3.5.2. Position on the Y-axis

    With the second string, the light point is positioned on the longitudinal axis of the bus. The Y-axis is in the middle of the bus and divides the bus into a front and a rear half. A positive value shifts the light point forward, while a negative entry shifts the light point backward.

    3.5.3. Position on the Z axis

    The third entry then corresponds to the alignment of the light point in height. However, the Z-axis is not at the horizontal height of the bus, but at the lowest point of the entire bus, i.e. at the lowest point of the wheels. Therefore, the Z-position of an object or light point can usually only have a positive value. If the value is negative, the light point is below the road.

    3.5.4. Direction on the X axis

    The direction indication, controls the alignment of the light point to the vehicle. However, no degree values of an angle are entered here, but the alignment is entered as a variable with a fixed maximum value. For the X-axis, this means that a positive value aligns the light point to the right and a negative value to the left. Here applies:


    0 = no alignment on the X-axis

    1 = maximum alignment to the right (corresponds to 90°)

    -1= maximum alignment to the left


    Values greater than one are therefore not necessary. However, values between zero and one are possible. To align a light point to the right front, the value must be matched with the next two strings.

    3.5.5. Direction on the Y-axis

    On the Y-axis, the light point is directed forward or backward, corresponding to the Y-axis in Omsi. Here applies:


    0 = no alignment on the Y axis

    1 = maximum forward orientation

    -1= maximum alignment to the rear

    3.5.6. Direction on the Z axis

    As in the previous two sections, here the light is aligned on the Z-axis in Omsi. The Z-axis corresponds to the alignment up or down. The following applies here:


    0 = no alignment on the Z-axis

    1 = maximum upward orientation

    -1= downward orientation


    A combination of the 3 values for the alignment causes a direct change of the alignment in two or three directions. To align the light to the right front, the alignment value is set to 1 on the X-axis and 1 on the Y-axis, aligning the light point to the right front with a direct line of sight. Half values (0.5) can be used to minimize this alignment. All other values from 0.1 to 1 are also possible to limit the alignment of the light.


    Please pay attention:

    The values of the alignment, correspond to the percentage values of an angle. The maximum value 1 corresponds to 100%,

    which corresponds to a 180° angle. A reduction by half, corresponds to a value of 0.5 and thus an angle of 90°.

    3.5.7. Light cone vector on the X axis

    With the alignment of the light cone, the visible main direction of the light spot is determined. With the vector, the visible angular width of the light spot is now defined. Unfortunately, also here no angle values are entered in degrees, but numerical values. While zero does not specify an angle size, the one stands for an angle of 90° (100%) and the two for a maximum angle of 180° (200%). The basic direction is given with the previous values. The angle width can be set precisely with decimal values.

    • 0 = smallest angle
    • 1 = angle of 90°
    • 2 = angle of 180

    3.5.8. Light cone vector on the Y axis

    The angles for the angular width on the Y axis are entered here. The same values apply as for the vector alignment on the X axis.

    3.5.9. Light cone vector on the Z-axis

    The values for the angular width on the Z-axis can be entered here.


    Please pay attention:

    The numbers here represent a percentage value, where one corresponds to 100% and two to the maximum

    Alignment of 200%. Thus, the 0.5 represents an angle of 45° and the 1.5, corresponding to 150%, sets the angle

    to 135 degrees.

    3.5.10. Alignment of the light spot

    The above values determine the visibility of the light spot from certain directions. However, if a light spot should be equally visible in all directions, the values entered above are all set to zero. The omnivector is then set to one. This would make the light point visible from all directions that are not obscured by non-transparent objects. Here, however, the rendering order of the bus own objects must also be taken into account. If a light spot should remain visible through a glass pane because the light spot is behind it, the light spot must be entered in Model.cfg under the corresponding glass pane. If, for example, a door moves over a light point when it is swung open, the glass, which is an Omsieigenes object, would cover the light point behind it. This limits the visibility. This has the advantage that the light spot can be greatly reduced if the pane has a strong tint or the color value of the glass makes the light spot almost invisible or changes the color value. For this purpose, a first light spot is placed above the mesh entry of the pane. To do this, you create a second light point which is weaker and gets the corresponding change values. This is entered in model.cfg under the target. So without the disc you will only see the bright light point that covers the dark one and through the disc you will only see the dark, changed light point because the disc filters the bright light point. There are only two values that can be entered here. With the value one, the entries for the light cone direction and the vector orientation are neutralized.


    0 = Directed light by the values entered above

    1 = Light in all directions.

    3.5.11. Rotation alignment

    The rotation alignment is directly related to the set values for the alignment of the light point and especially the vector size. Again, there are three variables that control the behavior of the light spot towards the camera (player view).

    • 0 = The light cone points only in the directions of the set vectors
    • 1 = The light cone rotates around the set vector axis in the direction of the camera
    • 2 = The light cone always appears in the direction of the camera (field of vision of the player).

    3.5.12. Color value red

    With the color values it is possible to select the color of the light point. There are 16,581,375 colours to choose from, ranging from white across the entire colour spectrum to the invisible colour black. However, only the colour of the light spot is set, not the luminosity. This is also referred to as the colour temperature. Thus, with the colour values, one can emit warm white or also cold white light.

    The first color value controls the color intensity of the red color, from 0 for no red to 255 for maximum red.

    3.5.13. Green colour value

    The second color value controls the color intensity of the green color, from 0 for no green to 255 for maximum green.

    3.5.14. Blue color value

    The third color value controls the color intensity of the blue color, from 0 for no blue to 255 for maximum blue.


    Together the 3 color values result in a selection of over 16 million colors. In order to be able to set a suitable colour quickly, it is advisable to set and read out the RGB colour value with an image processing program. Example programs with link, can be found under file formats used for Omsi.

    3.5.15. Size of the light spot

    This does not adjust the light intensity, but only the size of the light spot. The value refers to the size of the light spot in meters. A value of a few millimetres corresponds to a single light emitting diode (0.003, 0.005 etc.) or a clear bulb. Values of about 5 centimetres correspond to a matt bulb. However, it is not possible to simulate fluorescent tubes or lines of light with this, because the light spot always has only one round source, whereas with a fluorescent tube the light source is always elongated.

    3.5.16. Angle of the inner light cone

    Starting from the light point, you can specify an inner angle for the light cone. In an incandescent lamp, the light point corresponds to the tungsten filament. The inner light cone corresponds to the glass body of the bulb. The set value is reached at full light intensity. The angles are entered in degrees.

    3.5.17. Angle of the outer light cone

    The outer angle of the light cone then determines the range of the corona generated by the light spot. The corona is an effect of atmospheric optics. The corona becomes particularly visible when the eyes are very humid. Since the light intensity on a monitor is too low, a slightly real light effect can be achieved and the light seems to have a glare effect. Together with the adjusted light cone vectors, the simulated light intensity can be extended to other surrounding objects. This angle is also indicated in degrees.

    3.5.18. Variable to activate the light point

    The variable refers here to the script variable from the bus scripts. If the variable reaches the value one, the light spot is activated. If the value is zero, the light spot remains inactive. The correct variable is determined from the scripts and entered here.

    3.5.19. Brightness variable

    Here the strength of the light spot, i.e. the brightness, is adjusted. This is important if several light points are on top of each other. This way you can simulate step-dimmed light. The brightness is again directed into a percentage form. So here, zero corresponds to an extremely dark light (for example that of a black light lamp) up to two, which corresponds to twice the luminosity, as for example of a halogen spotlight. Thus, values from 0% to more than 200% are also possible.


    0 = strongly attenuated brightness variable

    0.5 = half luminosity

    1 = normal luminosity

    2 = double luminosity


    *If half a light intensity is invalid because the variable changes too fast (stroboscope light), then the constant value 1 is automatically assumed. Values above two, on the other hand, make less and less difference, because 200% is actually a maximum value. With large headlights, however, it may be necessary to increase the brightness slightly. Values of more than 3 are no longer visible and therefore do not show any difference. The monitor is not an active light source like a lamp. It is therefore only indirect light.

    3.5.20. Multiplication factor

    In order to make a bright light appear even stronger and more radiant (high-pressure lamps or large halogen lamps), a multiplication factor can be set here. The higher the multiplication factor, the lower the effect, as a monitor can only produce indirect light.

    3.5.21. Offset value to the player

    The offset value of a light point to the player's view (camera view) is the value when the light point is in an object, but the effect of the light point should exit the object. If the light point is inside a solid object (e.g. the light bulb under a light cap), this parameter can be used to make the light point and the light cones visible. If the radius is doubled, the light spot will shine out of the cap. The light cap does not have to be made transparent. The direction from which the light spot is visible is set in the upper parameters. You can, for example, double the radius of the light spot to the size of the object using a two. The decisive factor is not the exact size of the object, but the ratio of the light spot, how far the light spot should shine out of the object.

    3.5.22. Light effect

    Every light produces a certain effect, the corona, which is usually influenced by the eye moisture and a light cap. This parameter creates the shape of the light effect (corona). There are four values that add up to get both effects.

    • 0 = no effect
    • 1 = Star effect
    • 2 = No fog effect (circular corona)
    • 4 = both effects together

    The last parameter creates a circular effect, slightly overlaid by a star-like effect.

    3.5.23. Light cone

    Every light creates a cone effect if this effect is not filtered under a matt light cap. The cone effect depends on fog and ambient brightness and only if it is not omnidirectional light (see Alignment of the light point in all directions). So here only the values zero and one are possible.

    3.5.24. Time constant

    If a light point should slowly reach full light intensity, a time value in seconds can be set here. Especially with older vehicles, the electronics become a little sluggish. If you set a value of 5 seconds, for example, the light spot needs 5 seconds to reach an intensity of 63%. The full 100% is then only reached with 7 to 8 seconds. This corresponds to a light that is controlled by a capacitor so that the light does not suddenly become bright like an LED. Thus, sluggish light bulbs or even energy-saving lamps can be simulated. When switching off, it takes another 5 seconds until the light reaches an intensity of only 27%. The increase in luminosity is constant.


    The many older vehicles you can see this effect very well with the flashing light. The light does not go out completely, but only becomes weaker and stronger again.

    3.5.25. Effect texture

    With reference to the light point, a texture (with file extension) can also be entered here. This texture should have the shape of the light cap. So it is round or square. Thus the whole light body appears illuminated. With a simple light texture, which is illuminated by changing the commands [matl_nightmap] or [matl_lightmap], there are no light effects or slow switching on and off. There is only the function on or off. Here a simple light texture is used which adapts to the settings of the light point. All other light point parameters are retained and are not lost when the texture is changed.

    3.6. rotating beacons

    Rotating beacons are an intensified light effect. This means that this light should not be completely limited by the restrictions of alignment, but also that it should not be seen from all directions simultaneously at all times. The viewing direction of this light should rotate around a fixed axis. To achieve this effect, there are several possibilities, which will now be described.

    3.6.1. Rotating point of light

    Probably the most difficult variant is to provide the light spot with a contradictory setting.

    Under the point Alignment of the light point the value one is set, which means that the light point can be seen from all directions. At the same time, the following point Rotational alignment of the light point is set to the value 2. The contradiction now is that a rotating light that can be seen from all directions at any time does not need to rotate, because this rotation would not be visible. To prevent the light from being seen from all directions at the same time, the direction that serves as the axis of rotation must be set to zero, as must the vector angles for the light point.

    • X-axis = Alignment to the left or to the right
    • Y-axis = alignment to the front or to the back
    • Z-axis = alignment to the top or bottom

    Vehicle rotating beacons are usually located on the roof and rotate around a vetical axis to be visible in all horizontal directions. So the alignment of the light point on the Z-axis is set to zero, as are the light cone vectors of the X- and Y-axes.

    3.6.2. Flashing light spot

    If the above procedure seems too complicated, the light point can alternatively be set in all directions with parameter 1 under Light point alignment. In the script, the light is then set to blink (for example at one-second intervals) and the time constant is set to half a second (value 0.5). This is how it was done for the ambulances on the Spandau map. Even modern signal bridges of emergency vehicles work this way. The stroboscope effect is created by a fast flashing. If you slow down this rapid flashing and control the light so that it quickly becomes brighter and darker, it appears as if the light is turning.

    3.6.3. Rotating object

    The last possibility is of course the role model. In a transparent light cap a bright spot of light is placed centrally. This should shine in all directions simultaneously. In addition, you create a mesh that rotates around this light point (on the Z axis). The visible rotation effect can be intensified a little bit if you give the side of the object facing the light a very bright texture. Together with an alpha channel, this surface can then be mirrored (similar to a chrome effect). How this works exactly is explained in detail in the car SDK in the section Reflection Textures. The mirror effect is small, but it looks good.

    4. Light Shine

    Since a light point has no effect in Omsi, the light must be adjusted separately. This separation of light point and light is due to the fact that Omsi separates bus own objects and non bus own objects. This separation is necessary so that certain objects are only illuminated by certain light sources. In reality there are no differences. A light source illuminates all objects that the light can reach. Either directly from the light source or indirectly through reflections. In Omsi, however, this separation is necessary because the light in Omsi does not take into account the shape of the light source or the housing of the light source, or other objects. Basically there are two types of light. The light for non-bus objects is called spotlight. This spotlight can only shine in one direction and Omsi can only entertain a single spotlight. The spot light is only discussed in the following section (section 1.5). This section deals with the light for the bus own objects, i.e. all objects that are on the bus and that are also entered in the bus own model file (model.cfg).


    This section, which deals with the internal light sources, is very extensive, because there are dependencies in some other files. Because the light in the bus should not only illuminate some bus own objects, but also tickets, money and of course the passengers. Omsi distinguishes between sitting and standing passengers who are travelling with the bus, and running passengers who are walking through the bus or waiting to get off. That means passengers who have reached a certain point and passengers who still want to reach a certain point.

    4.1. assets and drawbacks

    The light can only be active in the vehicle that is used by the player. AI vehicles that should have a bright interior must be created with a LOD texture or a LOD mesh. The biggest disadvantage of the light is the interaction with other objects. A light shines and thereby illuminates all object surfaces that are facing the light. The brighter the texture of the object surfaces, the brighter the object appears. Unfortunately, this is the case for all objects that were installed on the bus. It does not matter if the light hits the object directly or if it passes through other non-transparent objects. This means that for example the wheels can be illuminated by the interior light, although the floor actually prevents this. A further disadvantage is the shadows in the vehicle that this causes. While an object in the bus is illuminated, like a seat that is illuminated directly, the area directly under the seat is illuminated with the same brightness as the distance to the light source. So the seat does not create a shadow. In the same way the backrest does not create a shadow on the seat surface if the light source is at the back of the backrest. The driver's area, for example, is illuminated by the interior light, even if a non-transparent partition wall should actually prevent this. Of course, it is also possible to separate objects from certain light sources and to create indirect light and shadows. In this case, you have to pay attention to how the light should behave later on, already during vehicle construction. This contradicts a little bit what was described in the section vehicle SDK under the tip about vehicle construction (exterior model).

    This big disadvantage, however, is opposed by a special advantage. The brightness of the objects decreases with the distance to the light source. From a certain distance on the object is in shadow because the range of the light source is limited. This advantage can create really nice effects in a bus. For example, the door light appears stronger near the source and weakens with increasing distance. In addition, you don't have to create extra textures to make this effect clear or visible. So you can use the light to create shadow effects. This can be achieved by working with different light ranges.

    ?thumbnail=1

    In the left picture the surface of the cash register, the cash register light and the door light is illuminated. The stronger door light, creates a slight shadow on the upper edge of the cash desk. The surface of the cash desk is completely and evenly illuminated. In the right picture, the door light is inactive and only the cash register light illuminates the surface of the cash register. The weak light, decreases rapidly with increasing distance on the checkout counter. The door area is illuminated too weakly in this example. If it were really dark in the screenshot, the door area would only be illuminated very slightly.


    Another disadvantage is the small number of light sources that can be assigned to an object. There are only a maximum of 4 light sources that can be assigned to an object. For some objects it is easier, for others it is extremely difficult, if there are 5 light sources in real distance to the object, but these 5 light sources can be switched differently.

    Another point is the behaviour of the light sources towards the passengers in or in front of the bus. On the one hand, you can set a lot of light sources in the bus, which can have a really nice effect on the objects. Because you can't set the light sources to the passers-by who are moving in the bus or waiting to get off, too many light sources can have a very negative light effect on these passengers. Passengers who are sitting in the bus or have taken a standing seat for the journey can be assigned these light sources again. Since you can't assign these light sources to the other passengers, ingame unfortunately also has some very unpleasant and negative effects, which can be especially noticeable at night. If you stop a bus at a bus stop where a passenger wants to get on, he immediately goes to the next possible point of boarding. As long as the future passenger is in front of a glass door, he is not illuminated by the interior light. If the door is opened and the door light is switched on, the passenger is not illuminated by this light either. Only when the passenger enters the first path point of the entrance in the bus, he will be detected by the 4 approaching light sources and will be placed in the light accordingly. This effect can be seen with a group of boarding passengers as well as with the group of disembarking passengers who are immediately standing in the dark as soon as they have left the last path point of the exit. If there are too many light points in the bus, passengers will be partially mislit when they walk through the bus. This is particularly noticeable if there are path lights in a coach at the bottom of the aisle. Since these may be closer to the people than the ceiling light, the legs of the passers-by are illuminated, but their heads remain in the shade, even if they walk directly under a bright ceiling light. But as a bus usually has more than 4 light sources, which are also switched differently, some difficulties arise. But these can be reduced by other means, which in turn means more work. There are also some tricks that can be used to reduce this disadvantage.


    Position of the light sources must be

    be observed (object separation)

    AdvantagesDisadvantages
    Light sources can be used with many Settings can be adjustedLight source, which is the light is created, is invisible
    Decrease in brightness when- increasing distance from the light sourceObjects do not create shadows
    Animated objects are also displayed during of the animation correctly illuminatedPer object only four Light sources are assigned
    Very many light sources can be installedPassengers are only illuminated when they have entered the first path point
    Objects can be assigned to certain Light sources are adaptedcurrent passengers only use the four nearest light sources
    Light source, which is the light is created, is invisible
    Only visible in the player car. No effect in AI vehicles.


    The light sources that produce a light beam are invisible. This is both an advantage and a disadvantage. Because of the invisible light sources you always have to set a light point or a light texture as source. You have to take care to adjust the brightness of the texture or the strength of the light spot exactly, which is not easy. On the other hand, you can combine several small light points and place the origin of the light over the bus. This light source is not visible, but the light shines on the objects that should be illuminated by it. So you can combine light sources that are close to each other, so that you can adjust several light sources to objects.

    4.2. Use in vehicles

    In vehicles, light sources that produce a light beam are used wherever a light source is to illuminate objects and passengers. The interaction of the positions of the individual light sources, different brightness and the position in relation to other objects, can create a beautiful light effect in the vehicle. For example, all ceiling lights in a bus must be provided with a light beam. Other objects can be provided with light points as a source of light, which makes the light effect better than with a light texture. So you have the choice to provide the rear license plates with a light and shadow texture or with light points as light sources and with a light shine on the license plate. There are many examples where light shine can be used, such as matrix lighting. These light effects are sometimes better than light textures. The creation of high-quality light and shadow textures, on the other hand, can be very labor-intensive and requires good use of an image editing program.

    4.3. Conversion of the light

    The range of strings (lines) to be set is very clear and quite simple. But please do not be fooled. For a use you need something more. But first it is only about creating the light as a source. Again you start with the command. The structure has a completely different order than all other light points. Directly after the command, first the variable for switching follows and at the end the position is entered:

    [interiorlight]

    1. Variable
    2. Range in meters
    3. Colour value red
    4. Green colour value
    5. Colour value blue
    6. Position on the X axis
    7. Position on the Y axis
    8. Position on the Z axis
    • The variable corresponds to the variable from the script when the light source should be activated.
    • The range of the light, indicates how far the light intensity reaches up to 63%. The range cannot be defined exactly, because the luminosity decreases continuously. So you can reach white objects in 6 meters if the light range is set to 2 meters. On the other hand, objects with dark textures do not appear very bright when the range is set to 3 meters. But these objects do not appear black. Coloured light, has a different range. So blue light has a lower range than green or red light, with the same light intensity.
    • The color values are to be set exactly the same as with the previous light types
    • The position also corresponds to the settings of the other lights.

    As already mentioned, you can set as many light sources as you like. But how many light sources make sense, you will only see at the end, when the passengers walk through the bus and how the objects were divided. This will be discussed in a later section. But the order of the entries is important. You can enter these light sources in the model.cfg where you want. but the order is very important later. Like many other objects in the bus, the order is zero based. So the first light source entry has the sequence number zero, the second entry has the number 1. When adjusting the light sources you should note the sequence. For a really good result, later in the vehicle, you should also make a sketch. This makes the work easier later, when you assign the right light sources to the objects in the bus.

    4.3.1. Assigning the light sources to objects

    To assign one or more light sources to an object, there is only one command.

    [illumination_interior]

    This command appears not only in the model.cfg, but also in the Passangercabin.cfg. For more details, please refer to the article Passenger Routes in section 3.1.10 Light Assignment.

    This is followed by a maximum of 4 light sources from which the object is to be illuminated. These light sources are then entered one below the other, whereby the assignment of the sequence indicates the numbering numbers of the light sources. To clarify the whole thing I explain it with an example.

    As an example we take a simple car body with two doors, where the entrance door is in the front and the exit doors in the back. The light above the doors, which only switch on when the doors are open, is entered first. So they have the numbers zero and one. Another light source is located above the driver's seat and has as third entry the number 2. Finally there shall be 3 more light sources, which are located as ceiling lights in the first third of the body, in the middle and in the last third of the body. As these light sources are in fourth, fifth and sixth position in the order, these light sources have the number 3 for the front, four for the middle and five for the rear.

    Furthermore we take the seats for the light assignment. In this example we assume there are 9 rows of seats in the bus and the driver's seat. Objects which should be illuminated by the same lights can be combined as one object. In the example, each row of seats is kept separately as a single object.

    For the assignment of the light to the driver's seat, there are already some restrictions. If there is an opaque partition wall behind the driver's seat, the driver's seat will only be illuminated by 2 to a maximum of 3 light sources. In the order in which the light sources are listed, these are the first door lamp and the driver lamp. The first ceiling lamp may be added. Accordingly, the light sources are assigned to the driver³s seat object:


    [infobox][illumination_interior]

    0

    2

    3

    -1[infobox]3883-81-82-gif


    Example picture, for the front ceiling light in the Ikarus 250.59 coach.


    Here you can see the difference when the front ceiling light is switched on and off. The rear lights remain on. The difference is particularly noticeable in the driver's seat. The first light hangs right next to the curtain, with the side of the driver's seat illuminated. And the front rows of seats are also illuminated.


    The front door is illuminated by the light sources of the first door light, driver's seat and the two ceiling light sources, because there is no opaque wall here. So the assignment is:

    Code
    [illumination_interior]
    0
    2
    3
    4


    ?thumbnail=1

    Sample image of the light separation:

    For the rear door you can now take the rear door light and the 3 ceiling lights






    Code
    [illumination_interior] 
    1
    3
    4
    5 

    There are various possibilities for the rows of seats, depending on the structural conditions. While the first two rows of seats are illuminated by the door light and the ceiling lights (following example on the left), the driver's light can illuminate the rows of seats on the door side, but not the rows of seats behind the driver's seat (following example on the right), if an opaque wall has been installed. For this purpose, the first two rows of seats should also be separated for the respective sides.


    For the row of seats on the door side, the light sources 0, 2, 3 and 4 can be used; for the doorless side behind the driver's seat, the light source (2) for the driver's seat (0, 3, 4, -1) is not used.

    3884-87-88-gif

    Here you can see the difference when switching the front ceiling light and the driver's light. The effect is intensified by the fact that the remaining lighting is inactive. This example best illustrates the difference between correctly divided rows of seats. While the front ceiling light illuminates the first rows of seats behind the driving position, the seats remain in the dark when the front light is missing and only the driving light is active. The first row of seats on the door side, is also illuminated, but is only slightly lit by the distance.

    The rows of seats on the doorless side are illuminated only by the front door light, the first ceiling light and the front light circuit. So there are only 3 light assignments for these seats. The fourth light assignment is excluded by -1.


    As a replacement, you can use the second light circuit, which can have a negative effect because it is far away and the backs of the seats on the doorless side could appear brighter than the seats on the door side that are not illuminated by the rear light circuit.

    For the third and fourth row of seats the three ceiling lamps are generally used. Optionally, the first door light can be added here (0, 3, 4, 5). For the seat rows five to nine, instead of the front door lamp, only the rear one is assigned (1, 3, 4, 5).


    3885-85-86-gifExample for the middle and rear light circle. Both light circuits are switched alternately here. With the correct allocation of light, there is a clearly visible interaction on the seats.

    However, the assignment does not have to be rewritten for each row of seats, because the command [illumination_interior] remains valid for all following objects until it is changed by a new assignment.


    In this example sequence, objects A, B and C are illuminated by the light sources on the first door, the driver's seat and the front and middle ceiling lamps. The object D and all following ones are detected by the second door light and the 3 ceiling lights.

    If an object is to be detected by less than 4 light sources, the remaining digits can be written with -1, or the above numbers can be repeated. However, this does not change the light behaviour on the objects.


    ?thumbnail=1Example of front and rear door light.









    Since the light shines through objects, the wheels, for example, would also be illuminated. To exclude this, a light assignment without light source number is created.

    Code
    [mesh]
    Objekt_RadVL.o3d
    
    [illumination_interior]
    -1
    -1
    -1
    -1

    However, if an object is to be illuminated by more than 4 luminaires, this is not possible. For example, the floor cannot be illuminated by all light sources if the entire floor is used as a single object in the bus. This is where you should cut the floor. The same applies to the entire interior of the body.

    3886-alle-zusammen-gif




    Sample image for full illumination. Here the different light circuits are switched through one after the other.

    Allocation of the light to passengers

    These light sources need only be assigned for sitting and standing positions. For this purpose the same command [illumination_interior] is written under the places in the passengercabin.cfg No assignments need to be set for passengers walking through the bus or waiting on the bus (for example, waiting for a free ticket office, free canceller or for getting off). Driving customers focus on the 4 activated light sources that are closest to them. A more detailed description can be found in the article Passenger Routes.

    4.3.2. Allocation of the light to money and tickets

    A special way of light allocation is the money given by passengers, tickets and change. These objects are not entered in the model.cfg. The object files and textures are located in separate folders and the positions are entered in other files. The positions for the issued tickets, as well as the passengers' money and the given change, are entered in the file Passengercabin.cfg. The light assignment commands do not apply to these objects. The positions of the tear-off blocks (for giving tickets) are written to the bus file. But there a light assignment is not recognized.

    For this OMSI takes over the light assignment of the last object from the model.cfg. Accordingly, the last object should be an object that is located at the same position. You can enter the cash register last or another object that is illuminated by the same light source. Alternatively, you can choose an unlit object that is located so far from the light sources that it is not illuminated, or whose object surfaces are averted from the light. This object is entered last and gets the light allocation for the money and the tickets.

    5. Spotlight

    The spotlight is a light that produces even a single beam of light. But in contrast to the light for bus objects, the spotlight is only for non-bus objects and illuminates all scenery objects such as streets, houses and other map objects that have been installed, but also the passers-by and all AI vehicles in circulation. However, there is also a major disadvantage. Omsi can only create one single spotlight in the game. In real life, headlights produce a light beam, not only from your own vehicle, but also from all other vehicles. In the same way, tail lights, brake lights, indicators or reversing lights also produce a light beam. Only the vehicle you drive yourself can be equipped with a spot light. Furthermore, you can only specify one direction and one color. If you would give the rear lights a spot light, you would have to do without the front spot light. But this means that the road in front of the vehicle is no longer illuminated.

    But in the model.cfg several spotlights are set. For example, there is a spot light for the low beam with a lower brightness and range. The high beam gets another point for the spot light, is then brighter and has an increased range. It is also possible to set additional spotlights in the front. This allows the use of additional spotlights that integrate auxiliary and fog lights. These must then be adjusted to include the individual or combined switching options. These individual spotlights will be explained in more detail in a moment.

    Again, the order in which Model.cfg is entered is decisive. Afterwards the corresponding spot light can be activated.

    5.1. assets and drawbacks

    As already mentioned, you can only create one spot light in Omsi at a time. This is the biggest disadvantage of spotlighting. You can again set several variants. In Omsi you can switch through these different spotlights one after the other, so the front light can be designed differently, depending on whether you switch low beam, high beam, with or without auxiliary headlights. The order is defined in the mdoel.cfg and set in the script. How exactly this works will be explained in detail in a moment.


    AdvantageDisadvantages
    Many setting optionsOnly a single spot light can be used
    Different spotlights can be switched through one after the otherOnly visible on the current player vehicle
    independent of other lights and objects.Spotlight does not create shadows.

    5.2. Converting the spotlight


    The settings are very easy and quickly explained. First the command follows again, followed by 12 strings (lines) which receive the corresponding values.


    [Spotlight]

    1. Position on the X axis
    2. Position on the Y axis
    3. Position on the Z axis
    4. Alignment on the X axis
    5. Alignment on the Y axis
    6. Alignment on the Z axis
    7. Colour value red
    8. Green color value
    9. Colour value blue
    10. Range of the light
    11. beam of light inside
    12. outer cone of light


    Here too, the individual strings are simple and clear. The first three lines define the positions in the bus. Since there is only one spot light, it is not possible to create it for two front lights separately. So a spot light in the middle of the bus is defined and set (X = 0). The Y value should be at the front of the bus. This should not be too far in front of the bus, but also not too far inside the bus. If it is not placed far enough forward, the spotlight illuminates the shadow of the bus, under the vehicle and exits at the side of the bus. Set too far forward, the light will appear wrong. The same applies to the height. Set too low, it does not illuminate the street properly and the light falls off polygon by polygon. If set too high, the spotlight looks fake again. It should therefore be about 50 cm to one meter above the headlamp level.


    The alignment is simple. Since the light should not shine sideways, the X-value for the alignment is always zero. For the forward direction, the Y value is always set to one. The Z value can be adjusted according to the switched light. Since the dipped beam light should not shine too high, the Z-value of the alignment is set slightly downwards. A negative value between zero and one is set. Zero means that the spot light is shining straight forward, the value -1 means that the light is tilted downwards. A value of about -0.3 is best for this. This value can still be adjusted a little bit. Since the main beam is not limited, the angle on the Z-axis should be smaller here than on the dipped beam, or set to zero.

    The colour values are again set in colour according to the other lighting options. Halogen lights shine slightly yellowish, xenon lights shine white and LED lights shine slightly blue.


    The range of the spotlights again depends on the type of light switched. Dipped beam alone has the smallest range. The information shall be entered in metres. A value of 200 meters should be sufficient. Dipped beam with auxiliary headlights, such as the front fog lights, on the other hand, gets a slightly higher value. About 300 to 350 meters should be enough. And the high beam gets the longest range, with 500 meters being realistic. Here it does not matter whether the fog lamps are switched on or not, as these are usually below or at the same height as the main beam headlamps. But the illumination changes.


    The last two values are the illumination of the spotlights. There is an inner circle that illuminates the main part of the spotlight. This value should be lower than the external illumination. It means how far the spotlight falls out to the side. Lower values are appropriate for the low beam and high beam, and higher lateral illumination is appropriate for the spot light with auxiliary headlights. These are then entered in angular degrees.


    These were already the settings for the spotlight. Since these entries do not have a switching variable, the variable (S.L.Spot_select) is assigned a numerical value in the script. If the numerical value is below zero, i.e. the value is -1, then no spotlight is switched. Since Omsi starts the numbering order with zero, the first entry of a spot light, the spot light, is 0, and all further entries increase by one digit. With further variables the value can then be further increased until all spotlights can be switched. The variable Spot_select is not fixed on the Omsiside, but is still one of the fixed Omsi variables. The [Spotlight] command is unchangeable and only one of these command sequences can be read out at a time.


    The implementation of the individual front lighting is also simple. In the Model.cfg the spotlights are entered one below the other. In most buses, the first entry is for high beam and the second for low beam. For this purpose, the variable (spot_select) is set to the value zero - for the first entry, or to the value one, which stands for the second entry.

    The following applies to the high beam: maximum range, average lateral illumination and direct forward beam. For the dipped beam light, these values are slightly adjusted: lowest range, not so bright, directed slightly downwards and smallest lateral illumination. After that you can enter the spotlights for the front lighting with the additional headlights. The following applies to main beam with auxiliary lamps: maximum range, highest lateral illumination, directed directly forwards and maximum brightness. For dipped beam with auxiliary headlamp, the following then applies: medium range, medium to high lateral illumination, not so directly forward and medium brightness. If you want, you can also add the auxiliary headlamp, a separate spotlight entry, which then works without dipped or main beam and is only switched with the parking light or without parking light.


    - Tabelle fehlt/folgt

    6. Object illumination

    Since Omsi, alone only the player car correctly in light, the light is ineffective for AI vehicles. With the variables, you can activate the light objects, but all objects remain in the dark. If a player sits down as a passenger in a vehicle with interior lights, the interior lights are reactivated, which also makes the lights work. Now you have the possibility to illuminate the interior walls and seats with light textures, but only if the textures were not tiled onto the objects. The amount of work involved is very large. But this makes the lighting in the bus look real and looks very realistic.

    The other option is the object illumination. The objects in the bus receive the command [matl_allcolor] with 14 strings. Thus the objects in the bus appear illuminated, but have the disadvantage that the objects are generally illuminated and are not aligned to the light positions. The light range is also ignored here. However, the disadvantage is not important here, since the lighting effect cannot be precisely recognized in AI vehicles anyway. Without this entry in the model.cfg, the interior remains dark, even though the AI bus has activated the interior light.

    6.1. assets and drawbacks

    The object illumination takes no account of the actual position of the interior lights. The objects are only illuminated in general, so they only make sense in AI vehicles, or if there are more light points than can be assigned to the objects. In player vehicles the object illumination can be used if you have a large circle of light and the interior should be completely illuminated. This makes the lighting behavior in the vehicles look very unrealistic. Only by working together with the light sources and assigning the light to them can an acceptable light behaviour be achieved.


    - tabelle fehlt/folgt

    6.2. Lightening function

    In Omsi, when the natural light is missing in the game (sunset or sun is obscured by a thick cloud cover), objects are no longer illuminated. These appear dark on the bus. With the command [matl_allcolor] the colors are restored. Apart from that, you can make objects in other colors glow or shine. More detailed information can be found in the Omsi SDK, in section 1.7 (Material Properties) and in section 2.2 ([matl], [matl_change] and [matl_allcolor]).


    Entries in the model.cfg

    It is not easy to implement if you want to work very precisely. It was therefore advisable to adopt the standard values from other vehicles. If you still want to make changes and adjustments, you should experiment with the values.


    - tabelle fehlt/folgt


    This allows the interior objects to be adjusted according to the color of the light. Smoothly painted objects can therefore reflect light strongly, optically speaking. If the interior lighting changes colour (e.g. night lights in coaches), the settings change the colour of the objects with the corresponding coloured lighting. The last value, POWER, then determines whether an object is matt or very shiny. Values from 0 to over 50 are then possible here. For all other values, the numbers again indicate the percentage value between 0 = 0 % and 1 = 100 %. Intermediate values, are again specified with one decimal place, whereby the decimal places are set with a point.

    6.3. Entry in the model.cfg

    In the model.cfg you can then use several variants. With the command [matl_item] the variables are then changed.


    - Code folgt

    7. General information on light

    The whole light theme is on the one hand very extensive, but on the other hand it also offers a very large possibility of adaptation. The interplay of all given possibilities, such as light and shadow textures, interior light points and light shine, can create a special and very real looking interior lighting. Together with the correct settings for the light points and the spotlight, Omsi provides a really real looking illumination of the player's vehicle. You just have to decide how much work you want to do with it. Anyone who deals with the subject of light for the first time will only see a huge mountain of work ahead of them. For experienced users, who have dealt with it properly, it is still a lot of work, but it is manageable and the whole game scenery can be put in the right light. Especially for older vehicle models, the extra work is very worthwhile if they do not yet have pure white fluorescent tubes, but have been equipped with old and small light bulbs. Here the entire light can be set in scene.

    8. Acknowledgements

    Of course you can't know everything and there is a lot more to say about light. The support from Marcel has become very deficient. Therefore my special thanks go to Rüdiger Hülsmann, who explained a lot about light to me and also to Busfanat, iTram and NL202Fan, who took the time to show and explain a lot to me. Thanks also go to Darius Bode, for his support on how to light tickets and money, as well as the implementation of dimmability, and to Chrizzly92, who brought this omsi-wiki back to life and gave the opportunity to give this tutorial a place.


    This tutorial is intended to give a precise overview of the entire lighting theme, although it is not complete.

Teilen

CC BY-SA 4.0

Sämtliche Inhalte unseres OMSI-Wiki sind unter Creative Commons Namensnennung & Weitergabe unter gleichen Bedingungen (CC BY-SA 4.0) lizensiert.