About Poseidon

What is Poseidon?

Creating dynamic spaces in games can be tricky. When our team first started working on games, we kept running into the age-old problem: How do I connect this area to this other area? We’d created a nice mesh for an area in our 3D Modeler, but we hadn’t punched holes in it. Sigh… back to the modeler we go.

If we wanted to be more modular, reusing that area in different ways, we’d constantly run into the issue of having to make “possible” holes. Who knew how we’d want to reuse that space later, and where we’d need to connect a tunnel or something else that we hadn’t even anticipated yet. Our 3D models grew increasingly more and more complicated with lots of holes/walls that we could toggle on and off depending on our needs… and those holes were baked into our models and could never change.

That’s how Poseidon started – we wanted to be able to iterate and create dynamic levels for our own purposes. We wanted to create 3D environments in our modeler of choice, and not worry about HOW those areas could be used when brought into Unity. We’ve gone through many, many iterations of level design tools over the years, and Poseidon is the simplest, cleanest, and most elegant solution we’ve been able to find.

Poseidon is useful if you want to be able to connect 3D spaces to each other dynamically, allowing you to create the meshes you want, and not have to anticipate every possible way they could ever be used by a level designer. Poseidon allows a level designer to make subtle tweaks to levels without having to send a mesh back to an artist. Poseidon allows you to create modular levels with very few pieces but without everything feeling repetitive. Poseidon allows you to create unique geometry. Poseidon does not force you to use it for everything, unlike other level design tools. You can delete it when you’re done if you don’t want it anymore.

Why is it called Poseidon? We have no idea. It was a code name that stuck. We toyed with other names like Intersect CSG or Welder but we ended up sticking with Poseidon.

Ready to try it? Head over to Getting Started.

How does it work?

At its core, Poseidon is a geometry intersection tool that allows you to take two meshes in Unity, intersect them together, and then, magic happens. It works something like this:

  1. We detect that something has changed in the scene (A carver was moved, rotated, scaled, enabled/disabled, had its mesh changed outside of Unity, etc.)
  2. We analyze all of the Poseidons in the current scene to figure out which ones need to be updated, and how they need to update.
  3. We rerun our algorithm across each dirty Poseidon and its sisters (the ones it’s intersecting).
  4. We slice the meshes by each other.
  5. We take any polygons from one mesh that are inside of the other and discard them.
  6. We bake out a final output mesh and store it in a scene-copy.
  7. We repeat the operation until all affected Poseidons have successfully carved each other.

Clearly, it’s a lot more complicated than that, but that is the general overview. This approach is the result of many years of iteration and slow improvement until we’ve created something that is both performant and clean (in most circumstances).

All of this runs asynchronously in the editor: carving is frame-divided, so even a huge carve won’t freeze Unity. You keep working while Poseidon computes in the background. The same frame-budgeted engine powers Runtime Carving, if your game needs to carve while it’s running.

Technical Requirements

  • Unity 2022.3 LTS or newer (this is our officially supported baseline; Poseidon also runs fine on Unity 6, including 6.4+).
  • Any render pipeline (Built-in, URP, HDRP).
  • Meshes used by Poseidons need Read/Write Enabled (the inspector will warn you and offer a Fix button if they don’t).

Since 2.1, Poseidon has been source-available: the entire tool ships as plain C# in two assemblies (Cinderflame.PoseidonCSG.Runtime and Cinderflame.PoseidonCSG.Editor), no pre-baked DLLs. If you’re curious how it all works, or need to step through a carve in a debugger, it’s all right there in your project.

Technically, Poseidon may still work on older versions of Unity, but we only officially support and test against 2022.3 and later. If you’re stuck on something older and hit trouble, get in touch and we’ll see what we can do.

What is CSG?

Constructive Solid Geometry is a way of combining simple meshes together in order to make more complicated ones. In the world of game level design, it used to be the way people made levels… way back when. You assume the world is completely filled in, and you add empty space by defining the few places in the world that aren’t filled in.

That’s sort of how Poseidon works. The difference is that we don’t assume the world is filled in, but, when a character is walking around inside of an indoor area - you have no idea what’s behind the walls.

Poseidon is our kinda-CSG - where we attempt to recapture the old-school way of making levels (defining all of the negative space), but allowing people to work with Unity the way they’re already used to Unity. This hybrid approach is what we think is the most fun way of making levels.