Loading…
gathering yarn balls…
Cat Game Research
Frontier
Dev-log transmissions from the expedition

Spherical Portals, Dark Energy, and the Dromed Brush Hierarchy

A companion guide to optozorax's 'Spherical portals explain dark energy?' that maps the physics of space-bending portals onto the Dark Engine's Dromed editor — its CSG brush hierarchy, portalize/BSP build, and object hierarchy — and sketches a high-level blueprint for a portalize CSG/BSP level system in CatGame, including how it reshapes the cat character controller.

Source: Spherical portals explain dark energy? by optozorax (Ilya) · used as the primary text for this companion

optozorax's Spherical portals explain dark energy? is a physics simulation video about what happens when a portal is no longer a flat doorway but a closed surface — a sphere. The claim is that a spherical portal can only stay stable if you allow a specific distribution of negative energy around it, and that the self-force this produces looks suspiciously like dark energy. This companion does two things with that idea. First, it walks through the physics as carefully as a transcript-locked video allows. Second, and more usefully for us, it uses the spherical-portal mental model as a lens onto a very different kind of portal: the ones the Looking Glass Dark Engine generates every time you press Tools → Portalize in the Dromed editor for Thief II: The Metal Age. The mapping is not literal — one is curved spacetime, the other is constructive solid geometry — but the structural analogies are strong enough to seed a blueprint for a portalize/CSG/BSP level pipeline in CatGame, and to force a rethink of how the cat character controller should query the world.

The thesis in one sentence. A portal is a cut that makes two distant regions adjacent; whether the cut is a flat doorway, a sphere of bent spacetime, or the shared polygon between two BSP leaves, the connectivity is what matters and the surface shape is a rendering detail — and the work needed to keep that connectivity self-consistent is the "energy" of the system.
2
Portal families mapped
10+
Dromed brush types
4
Build passes (terrain/room/light/AI)
roadmap
CatGame pipeline status

What the video is actually about

optozorax (Ilya) is the author of Portal Explorer, an open-source web ray-tracer for "mind-blowing portals" — monoportals, Möbius portals, Hopf-link portals, and the recursive "portal in portal" case. His earlier videos establish the framework the spherical-portal video builds on, so they are worth stating before the spherical case:

The spherical-portal video extends this to a closed portal surface. Instead of two paired flat portals, you have a single sphere whose interior is glued to somewhere else (a pocket dimension, or back onto itself). The simulation shows that to keep such a sphere from gravitationally diverging — collapsing or exploding — you need a shell of negative energy (the video frames this as Zero Point Energy) distributed in polar coordinates around the surface. The residual self-force the configuration exerts on itself then mimics the cosmological constant: it looks like dark energy pushing things apart. The punchline is the analogy in the title — spherical portals "explain" dark energy because the stabilization cost of a closed portal and the observed accelerating expansion have the same sign and shape.

A Dromed primer, for people who never carved a void

The Dark Engine is the runtime Looking Glass built for Thief: The Dark Project (1998) and Thief II: The Metal Age (2000). Dromed is its level editor. The single most important thing to understand about Dromed is its inversion of the usual "add geometry" mental model:

The world starts solid. You do not build rooms by stacking walls; you carve them out of an infinite block of stone by painting fill-air brushes into it. Even the outdoors is just a big cave with a sky texture on the ceiling.
Paraphrased from the Dromed beginner guides

This is constructive solid geometry (CSG) with a sign convention. A brush is a convex primitive (cube, cylinder, pyramid, corner-apex pyramid) tagged with an operation. The documented brush family includes: fill solid, fill air, fill water, flood, evaporate, solid→water, solid→air, air→solid, water→solid, and blockable. Fill-solid adds mass (a pillar); fill-air subtracts it (a room); the conversion brushes flip the medium at an existing boundary. Crucially, order matters:

1
fill-air cuboid carves a room out of the solid world.
↓
2
fill-solid cylinder drops a pillar into that room.
↓
3
fill-air brush through the cylinder drills a hole through the pillar.
↓
4
Portalize evaluates the ordered brush list and emits the final rendered world: a room containing a pierced column.

If you swap steps 2 and 3 you get a different world. Dromed lets you reorder the brush list after the fact, because nobody authors in the perfect evaluation order. The command that does this evaluation is literally called portalize — "make a 3D world out of brushes" — and optimize is the production-quality variant that reduces poly count. After terrain comes a cascade of dependent build passes, each consuming the previous one's output:

A
Portalize / Optimize → CSG → BSP tree + cell/portal graph (rendering, vis).
↓
B
Build Room Database → room brushes → sound propagation, AI perception volumes.
↓
C
Relight Level → lightmaps per cell (Dromed's is single-threaded and famously slow; community tools like KCTools Lightmapper replace it).
↓
D
Compute Pathfinding Database → AI cells + links; guards can now walk. Must be rebuilt whenever terrain changes or AI will walk into walls.

That cascade is the part most modern editors hide from you. In Dromed the dependency is naked: change a brush, forget to re-portalize, and the 3D view lies; change a room, forget to rebuild rooms, and sound goes dead; change terrain, forget to recompute pathfinding, and AI freezes. The brush hierarchy is the source of truth; everything downstream is a derived cache that must be invalidated by hand.

The object hierarchy: how you paint entities into the carved terrain

Carving the void is only half the level. The other half is populating it, and Dromed does this with an object hierarchy that is philosophically explicit about being Platonic:

So "painting entities into terrain" in Dromed is: carve the void with ordered CSG brushes, portalize into a cell graph, then drop concrete objects (descended from archetypes, decorated with metaproperties, wired with links) into the cells. The player character is just another concrete object descended from a player archetype, governed by the same property/link/stim machinery as a candle.

How mods actually work

Thief II modding survived because of NewDark, a community patch that became the de facto engine. Levels are .mis (or .cow) mission files; the gamesys.gam holds the archetype hierarchy. Original missions are OMs, fan missions are FMs. The elegant part is DML (Dark Mod Language) dbmods: instead of redistributing a patched mission, you ship a small miss20.mis.dml that is fingerprinted against eight object positions and applied as an overlay at load time. You can fix a broken FM without ever touching the original bytes. Tools like DarkDB read/write the mission tables directly; KCTools rebuilds lightmaps and exports .bin models. The whole ecosystem is built around treat the mission as a database, not a blob — which is exactly the stance a modern engine should take toward its level file.

The mapping: spherical portals ↔ Dromed portalize

Here is where the two threads meet. The mapping is analogical, not physical, but each row holds up structurally.

Closed portal surface
A spherical portal glues its interior to elsewhere. In CSG, a fill-air brush is a closed convex volume whose interior is glued to "walkable space" instead of solid. A room is a closed portal whose destination is the same manifold.
Surface-shape axiom
optozorax: the portal's behavior is independent of its cut surface's shape. BSP: the portal polygon shared by two leaves is an artifact of where the splitting plane landed; the adjacency between leaves is what vis/sound/pathing actually use. Render the portal as a triangle fan or a sphere — connectivity is unchanged.
Negative energy = stabilization
The sphere needs a negative-energy shell to not diverge. A CSG cell needs a consistent solid/air assignment to not leak. Brush ordering and the fill-type tags are the constraint that makes the sign field well-defined. A leak is the CSG analogue of gravitational divergence: the geometry fails to hold together.
Self-force = emergent graph behavior
The stabilized sphere exerts a self-force that mimics dark energy. The portalized cell graph exerts "self-force" too: vis culling, sound occlusion, and AI pathing all emerge from the topology without being explicitly authored. You did not place a visleaf; the portalize pass grew it.
Velocity through a moving portal
Moving portals transform object velocity. A cell graph that supports moving portals (doors, trains, rotating sectors) must transform the player's velocity on cell transition, not just relocate them — the same rule the physics video derives.
Gravity on curved space
Poisson's equation solved patch-wise on glued space. Sound propagation in Dromed is literally solved on the room graph: each room is a patch, portals are the glue. Gravity-through-portals and sound-through-portals are the same math in different units.
Figure 1 — The same shape, two readings
PHYSICS: spherical portalinterior gluedelsewherenegative-energy shell→ self-force ≈ dark energyCSG: fill-air brush in solid worldair cellbrush order + fill tags→ cell graph (vis/sound/AI)same structureclosed cut → graph

The deepest shared claim is the surface-shape axiom. In the physics video it says the portal cut's geometry is irrelevant to the physics; only the gluing matters. In a BSP/portal renderer it says the portal polygon's exact triangulation is irrelevant to visibility; only the leaf adjacency matter. Once you accept that, "spherical portal" stops being exotic. A spherical fill-air brush is just a cell whose boundary is a sphere instead of an axis-aligned box, and the portalize pass treats it identically: it becomes a node in the cell graph, connected to its neighbors by portal cuts wherever the sphere intersects other brushes. The rendering mesh is a detail; the graph is the truth.

A high-level blueprint for a CatGame portalize/CSG/BSP pipeline

Status: roadmap / concept. Nothing below is shipped CatGame behavior. This is a design sketch spawned by the companion, intended to seed plans and ideas — not a description of an existing system. Treat every "we would" as "we could."

Stated cleanly, the goal is a level pipeline where the source of truth is an ordered list of CSG brushes (signed convex primitives) plus an object hierarchy, and everything else — render mesh, vis graph, sound graph, lightmaps, AI nav, collision — is a derived cache produced by a portalize-style build pass and invalidated on edit. Concretely:

1
Brush list as source of truth. A level is an ordered list of signed convex brushes (fill-solid, fill-air, medium-conversion tags) plus optional spherical/non-convex primitives. Order is editable after authoring, Dromed-style. No hand-authored render meshes; the mesh is always a build product.
↓
2
Portalize pass → sign field + cell graph. Evaluate the ordered brushes into a solid/air sign field, then extract a cell graph: each maximal air region is a node, each shared boundary is a portal edge. Cells may be spherical, not just boxy. This is the "negative-energy stabilization" step: a consistent sign field is what stops the geometry from leaking.
↓
3
BSP for spatial query, graph for connectivity. Keep a BSP tree for fast point/segment queries (where is the cat? what cell is this light in?) but drive vis, sound, and AI off the cell graph, not the tree leaves. The graph is the self-force: emergent, authored only indirectly.
↓
4
Object hierarchy paints entities into cells. Archetypes → concrete objects, with metaproperty-style tags and link-style relationships. Entities are placed into cells, not into raw world space; a cell reference is part of an entity's transform. This is the Dromed "paint into terrain" model.
↓
5
Derived caches, explicit invalidation. Room/sound graph, lightmaps, AI nav cells, collision acceleration — all rebuilt from the cell graph on demand, with the Dromed-style rule that editing terrain invalidates downstream caches. A level file is a database (mission-as-DB, the NewDark lesson), not a blob.
↓
6
Optional: real portals as first-class cells. Because a cell is already "a closed region glued to elsewhere," a gameplay portal (the optozorax kind) is just a cell whose gluing is non-trivial. The same graph supports it; the controller just has to apply the velocity-transform rule on transition.

The payoff of treating the cell graph as the truth is that the spherical-portal video's two hardest problems become features rather than special cases. Gravity through a portal is "solve the field on the graph" — which is what Dromed already does for sound. Velocity through a moving portal is "transform velocity on cell transition" — which a graph-native controller does naturally where an AABB-sweep controller does not.

How this reshapes the cat character controller

Status: roadmap / concept. The controller implications below are design speculation drawn from the mapping, not a description of the current CatGame controller.

A controller written for an axis-aligned, box-cell world asks three questions every frame: am I on the ground, am I hitting a wall, am I hitting a ceiling — answered by sweeping an AABB against brushes. That model breaks the moment a cell is spherical or a portal is non-trivial, because "ground," "wall," and "ceiling" are no longer aligned with the cell's boundary. The graph-native reframing:

The short version: the cat stops being a physics body loose in a box world and becomes a graph citizen whose locomotion, perception, and momentum are all defined against the portalized cell graph. That is the real lesson both optozorax and Dromed are teaching — the connectivity is the world; the surfaces are just where you chose to draw the cuts.

Companion glossary

  1. CSG (Constructive Solid Geometry) — Building shapes by union/intersection/subtraction of solid primitives. Dromed's fill-air/fill-solid brushes are signed CSG operations.
  2. BSP (Binary Space Partition) — A tree that recursively splits space by planes; gives fast point/segment queries and yields convex leaves. The leaves' shared faces are the portals.
  3. Portalize — Dromed's command to evaluate the ordered brush list into a renderable 3D world plus its cell/portal structure. "Make a 3D world out of brushes."
  4. Cell / visleaf — A maximal convex air region in the portalized world; the unit of visibility, sound, and AI navigation.
  5. Room database — Dromed's secondary build that groups cells into rooms for sound propagation and AI perception.
  6. Object hierarchy — Dromed's archetype tree; concrete objects inherit properties from archetypes, editable en masse.
  7. Metaproperty — A reusable bundle of properties attachable to any object.
  8. Link — A typed relationship between two objects (patrol, watch, contains), resolved by scripts via selectors.
  9. Stim / Receptron — Dromed's event system: a stim hits an object's receptron and triggers a response.
  10. NewDark — The community engine patch that became the standard Thief II runtime and enabled modern FM modding.
  11. DML / dbmod — A fingerprinted overlay applied to a mission at load time, letting mods patch without redistributing the mission.
  12. Monoportal — optozorax's term for a single portal surface that glues a region to itself or elsewhere, as opposed to a paired two-surface doorway.
  13. Space-bending axiom — optozorax's claim that a portal's behavior is independent of its cut surface's shape; only the gluing matters.
  14. Self-force — In the video, the residual force a stabilized spherical portal exerts on itself, argued to mimic dark energy. In CSG, the emergent behavior (vis/sound/AI) the cell graph produces without being authored.

Caveats and limitations

This companion sits on top of two layers of uncertainty. The first is the video itself; the second is the analogical mapping. Read both before treating any claim as settled.

Video-content caveats
  • Sourcing. The video's transcript was not available for direct quotation; the physics summary is reconstructed from optozorax's documented body of work (the Portal Explorer README/scene list, his "Portals must bend gravity, actually" and "What happens if you put a portal in a portal?" videos) and third-party summaries of the spherical-portal simulation. Specific phrasings should be treated as UNVERIFIED-via-direct-access.
  • "Negative energy in polar coordinates" and "self-force mimics dark energy." These claims are consistent with optozorax's framework but were not confirmed against this specific video's transcript. They are the kind of claim a grill pass correctly flags without a primary source.
  • Do not conflate with the Ashton Forbes stream. A separate 4ORBS-analyzed video ("Breaking Spacetime & Spherical Portals," ID S6noGwFjJic) by Ashton Forbes features optozorax's simulation but wraps it in MH370/zero-point-energy conspiracy claims. This companion is about optozorax's own video (F1W6zVJ7Yow), not the Forbes framing. The MH370/suppression claims are out of scope and not endorsed.
  • "Dark energy explained" is a strong claim. The video's title is a question. The analogy is provocative; it is not peer-reviewed cosmology. This companion uses it as a structural metaphor, not as physics endorsement.
Mapping and blueprint caveats
  • The physics→CSG mapping is analogical. Negative energy is not brush ordering; a self-force is not a vis graph. The rows in the mapping table share structure, not mechanism. Useful for ideation; not a derivation.
  • Dromed's "portalize" is not idTech4 visportals. The Dark Engine's portalize is the CSG/BSP build; The Dark Mod (idTech4-lineage) uses explicit visportal brushes for leaf separation. This companion refers to the Dark Engine/Dromed meaning throughout. Do not import idTech4 specifics uncritically.
  • The CatGame blueprint is concept/roadmap. No claim here describes shipped CatGame behavior. It is a high-level design sketch to spawn future plans and ideas; source code and implementation details are intentionally omitted.
  • Brush/object limits are Dromed's, not ours. The ~7000-brush and 2400-object limits cited from the Dromesday Book are Dark Engine constraints, cited for context only.
  • Controller claims are speculative. "Cell-relative framing" and "ground from the graph" are design proposals, not measurements. They would need prototyping against the real controller before any performance or feel claims are made.

Where this points next

The companion is deliberately high-level so it can spawn follow-ups rather than close them. A few directions worth keeping alive: a spec for the brush-list level format (mission-as-database, with DML-style overlay patching); a prototype portalize pass that emits a cell graph from ordered signed brushes, including spherical primitives; a graph-native locomotion experiment that re-expresses the cat controller against cells instead of AABB sweeps; and a sound-propagation pass solved on the cell graph as a direct nod to both Dromed's room database and optozorax's "solve Poisson on the glued space." The unifying bet is the one both sources make: get the connectivity right and the surfaces take care of themselves.

Related transmissions

If the "connectivity is the world" argument lands for you, the ECS-architecture post is the same idea at the component level, and the oscilloscope-renderer companion is a sibling case of "let one primitive generate everything." The Vulkan tile-rendering post is the rendering-side counterpart to the vis-graph story here.

Watch the source video →
← All transmissions