OpenSimulator · EN

Physics engine and mesh caches

ubOde, MeshCache, sculpt maps, meshing and verified physics-related settings.

Reference: OpenSimulator 0.9.3.1. Check the actual loaded engine. ScriptEngines files and persistent assets are not necessarily disposable caches.

Physics mesh caching is not Flotsam

The physics engine converts some prims, meshes and sculpts into collision shapes. Reusing computed meshes or shapes avoids repeated processing. This cache is separate from authoritative assets stored by ROBUST and from Flotsam asset copies.

ubOde: MeshCache on disk

In ubOdeMeshing/Meshmerizer.cs, file caching defaults to enabled (doMeshFileCache = true), using MeshCache. The module can reuse or store generated mesh data for some sculpted objects. It does not store the RegionStore database, original terrain or authoritative assets.

Settings under [Mesh]

MeshFileCache enables mesh-file caching, MeshFileCachePath specifies the folder (MeshCache by default), MeshFileCacheExpireHours controls lifetime (48 hours in code), and MeshFileCacheDoExpire controls cleanup. These values are verified in ubOde 0.9.3.1 code and need not apply to every other physics engine.

Expiration and checks

The ubOde mesh worker calls ExpireFileCache during initialization. The mesh cache uses a control file and checks file age. Do not assume deleting MeshCache while running is harmless: rebuilding many shapes can consume CPU and increase loading time.

Meshmerizer: decoded sculpt maps

The general Meshmerizer includes CacheSculptMaps and DecodedSculptMapPath (j2kDecodeCache by default in source). It can keep decoded sculpt images on disk and calculated meshes in a shared in-memory dictionary. These serve meshing, not Firestorm texture rendering.

ubOde, BulletS and different meshers

BulletS has its own collision-shape logic and calls into a mesher. The same disk-cache settings must not be attributed to BulletS without verification. Behavior depends on the selected engine and mesher. This guide documents parameters verified for ubOde rather than inventing a universal MeshCache.

Console commands and safety

Reviewing the physical mesh-cache code did not establish a general meshcache clear console command analogous to fcache clear. Do not invent one. Before touching MeshCache or j2kDecodeCache, confirm the active mesher, actual path, relevant backups and a controlled maintenance window.

ubOde example: mesh cache settings

Example based on defaults read in ubOdeMeshing/Meshmerizer.cs. Check your actual loaded mesher before using.

[Mesh]
MeshFileCache = true
MeshFileCachePath = MeshCache
MeshFileCacheExpireHours = 48
MeshFileCacheDoExpire = true

Managing this cache: practical steps

Managing the mesh cache in practice

Check the active physics engine and mesher, plus [Mesh]. Measure only the configured MeshFileCachePath directory; inspect [MESH CACHE] log messages and expiration settings. ubOde can inspect files on startup. No universal MeshCache-clearing console command was verified. Prefer controlled downtime to deleting files during simulation.

Sculpt maps and alternative meshers

For Meshmerizer, inspect CacheSculptMaps and DecodedSculptMapPath on the actual component in use. j2kDecodeCache is a default example, not a folder found on every installation. Other physics engines can use different paths. Do not blindly apply ubOde [Mesh] settings to BulletS.

OpenSimulator source references

Related guides