Road-hog123 Avatar - a white bus on orange background Road-hog123 Text Logo - large white 'Road-hog123' text with tagline 'I should come up with a tag line...'
Twitter: @Road_hog123 Twitch: /Roadhog123 Facebook: Road-hog123 Developments Flickr: Road-hog123

Quick Reference: Render Order

Explanation of Rendering

Rendering is the process of converting the 3D world into a 2D image that can be displayed on your monitor. This is done by drawing each polygon in the world to this image one after the other as defined by the render order. For the pixels where the polygon is closer to the camera than what has already been drawn, the pixels are overwritten; where the polygon is behind what has already been written, nothing is drawn.

The OMSI Render Order

Each polygon is rendered in the order that it is defined within a mesh. Each mesh is rendered in the order that it is defined within an o3d file. Each o3d file is rendered in the order that it is defined within a model config file (either a dedicated model.cfg file or as part of an object.sco file). Each item within a particular group (e.g. cars) is rendered based on the order it was defined (e.g. the first car to be spawned is rendered first, and so on).
The groups are:

  1. Skybox, sun, moon, stars, etc.
  2. Objects with rendertype presurface
  3. Terrain
  4. Objects with rendertype surface
  5. Splines
  6. Objects with rendertype on_surface
  7. Wet road effects (both puddles and moisture)
  8. Objects with rendertype 1
  9. Objects with rendertype 2 (i.e. those with no rendertype defined)
  10. Objects with rendertype 3
  11. AI vehicles, and the user vehicle when it is viewed from outside
  12. Objects with rendertype 4
  13. User vehicle from the driver or passenger view
  14. UI

When to use which rendertype

  • Objects that have some part that is underground, e.g. the subway entrances in the default Berlin-Spandau map, can benefit from the presurface rendertype - by having a plane above ground level with a mostly-transparent texture you can prevent the terrain from rendering. The terrain is still there and can be collided with, but it won't be visible.
  • The surface rendertype should be used for all road surface objects like junctions.
  • The on_surface rendertype should be used for all objects that sit on the road surface, like road markings.
  • I guess maybe rendertype 1 could be used for backdrops? It's not used by any default object.
  • As rendertype 2 is the default value, there's no point setting this manually.
  • rendertype 3 is useful for objects that you'll see through vehicle windows and/or see other objects through.
  • rendertype 4 is useful for objects that you'll see vehicles through, like glass bus shelters. The inverse is not possible however, with vehicle windows cutting through the object.

Quirks of the Rendering System

There's no way for polygons to be rendered behind others that have been already rendered. This causes problems for translucent polygons, as you have to ensure everything you'll see through them is rendered before they are, otherwise the translucent polygons appear to cut through what's behind them. This isn't always possible.

This can be a very useful feature though, as it does allow you to visually cut through things like the terrain.