Segment & Portals technique

From Simerge development wiki

Jump to: navigation, search

Contents

Segments

Base aspects of a segment

A Segment is something like a room and it's primarily defined by two properties:

  • It contains objects having a position and orientation
  • It may have an own coordinate system

Examples of Segments:

  • Room inside a ship
  • Railsegment

Example of Objects:

  • Ships, Stations
  • Planets, Suns and other celestial objects ...
  • ...
  • a lamp on the desk

Railsystem

A rail system is a special system generated by a root segment and a continuous subdivision into smaller rail segments by a limited amount of steps. This system is represented by a tree where each node has its own index. A second property is that there is a metric scale applied at each node depth. Nodes of a smaller depth are scaled up in relation to deeper nodes. Such scale technique is used to solve problems of numerical imprecision, because the property of a segment of having an own coordinate system is used. Therefore a rail system may have an arbitrary (also a size of whole universe) but a non infinite size. A rail system is threated as an object and can be attached to an arbitrary segment. If it is attached to a rail segment of another rail system (like planets are attached to starsystem rail segments) then there are additional functions activated.

An important feature of the rail system is to load and unload it's tree components when they are needed. A completely loaded tree doesn't fit into the RAM in common case.

Examples of rail systems:

  • Starsystem
  • Planet
  • Cluster, Galaxy or bigger celestial objects
  • Big capital ships

Terrain segmentation

Simerge uses Chunked LOD terrain at each surface (ground rail segment on a planet). Like the rail system too, this terrain is generated by a subdivision principle into chunks. These chunks are also loaded and unloaded dynamically. But unlike the rail segments they are provided by a thread pool and they are loaded at background. A terrain chunk is a segment and may contain each kind of content. Currently there are only heighmap based chunks available. Later there will be also voxel based terrain chunks.

Portals

Portals are special kind of "windows" which connects two segments. With the aid of portals a camera can be located at one segment and see a scene in another segment. Objects are able to travel through portals, too. The portal technique will be especially used to speed up FPS mode. They can serve as indoor-to-outdoor connections and as room-to-room connections inside a building, station or big capital ship.

Personal tools