Celestia/3D Models/CMS File

CMS File Reference edit

The CMS model format is deprecated. This means that its usage is discouraged and that it is likely to go away in a future version of Celestia.

What's a CMS file? edit

"Celestia? Model? Simple?" files define simple shapes by deforming a sphere. Although deprecated, they are still used for a few generic objects such as asteroids, minor moons and the like.

They lie in the "models" directory of the Celestia root, or in an add-on's root subdirectory (itself in Celestia's "extra" directory).

They are plain text files, and can thus be modified with your favourite text editor.

# edit

The pound sign begins a comment: whatever lies after this sign up to the next carriage return is ignored by Celestia.

"SphereDisplacementMesh" { ... } edit

All of the cms stuff is within this block. The parameters appearing within the accolades are:

"Size [ x y z ]" edit

When a model is placed in a circular orbit around a parent body without rotation settings (so it is tide-locked) and with a mean longitude of 0,

  • x is the radial axis (running from the parent body to the model and through it: near-far)
  • y is the polar axis (running perpendicular to the orbital plane: north-south)
  • z is the orbital axis (running parallel to the orbit: forward-backward)

It defaults to [1.0 1.0 1.0].

"NoiseOffset [ a b c ]" edit

This is some kind of implementation of Perlin noise, and NoiseOffset (probably) moves the origin of the noise.

It defaults to [10 10 10].

"FeatureHeight f" edit

This controls the height of the bumps. Small numbers like 0.2 define a body that is roughly spherical with low hills, while larger numbers like 1.0 define a body with large hills.

It defaults to 0.0.

"Octaves i" edit

This defines the bumpiness of the model. Small values like 1 define a body with a fairly regular distortion, whereas large values like 9 define a very bumpy body. A value of zero gives a spherical body.

It defaults to 1.

"Slices i" edit

The Slices parameter controls the number of longitude lines. Together with Rings, this defines how much detail there is in the mesh. The default value of 20 defines a blocky mesh, while 200 defines a much smoother mesh that can take several seconds to render when displayed for the first time.

Setting Slices to a low value and Rings to a high value gives a mesh that is shaped like a peeled orange.

"Rings i" edit

The Rings parameters controls the number of latitude lines. Together with Slices, this defines how much detail there is in the mesh. It also defaults to 20.

Setting Slices to a high value and Rings to a low value gives a mesh that is shaped like a pile of doughnuts of varying thicknesses stacked on each other.