Reinventing Blender for level design

A level editor should be a mesh editor, much like Blender but also very different. This mesh is not for rendering; it’s polygons will never go to OpenGL and will never have a texture. In a rendering, polygons almost always have a clear front and back, but for level design a polygon will represent things like a wall in a building and so both sides are equally important. Blender has very limited capacity for assigning meanings to polygons, edges, and vertices, but in level editing we want to declare that certain polygons are walls, certain polygons are doors, and other polygons are portals to other parts of the world. We want these parts to be color-coded so we can see the structure of the world we’re building at a glance. We want to be allowed to view cross-sections of our meshes so that we can work on interior details without anything getting in the way, but Blender models don’t usually have any interior details.

Even with all the ways that Blender fails to serve our purposes, it’s still a wonderful mesh editor. Trying to make a level editor is frustrating because so much of it is mesh editing and the best I can hope for is a weak imitation of Blender’s mesh editing facilities. It feels like reinventing the wheel, but what choice is there?

Actually you can easily work on interiors with blender, with Shift+F you can toggle an fps-style camera and in object mode → N menu → View → Clip you can tweak the viewport clipping if needed.

I’m not sure what you mean here.

You could use custom properties for that.

This might require you to write some custom addon for blender.

1 Like

Great tip. Thanks!

It’s just a difference in philosophy between the kinds of meshes that Blender is expecting you to make and the kinds of meshes you’d really want to make in level designing. I’m saying that non-manifold geometry would be in practically every mesh. On the other hand, I guess that Blender doesn’t really have any problems dealing with nonmanifold geometries, so it’s not a real issue.

Custom properties seem more like an object thing than a mesh thing, but now that you mention it I’ve found some references suggesting that we can set custom properties on polygons, edges, and vertices through python. Even if there is no UI interface for it we might create one with a custom addon.

Is that something you can do in Python? Blender allows us to give each face of a mesh its own material, so we could use that to color code the faces, but what about edges and vertices? I wouldn’t want custom data on a vertex or edge if I can’t see it in the editor, but perhaps lack of custom data on vertices and edges is a non-critical problem.

But even if we can get Blender to do all these things, what about portals? We wouldn’t want to do an entire level as a single vast scene. We’d want to assign a polygon in one scene to be a portal into another scene’s matching polygon. Can an addon ensure that the portal polygons fit together? Can an addon show us the scene on the other side of a portal so we can visualize how the two scenes fit together while editing?

So you want to make the entire scene a single mesh? Why?

Can an addon ensure that the portal polygons
fit together? Can an addon show us the scene on the other side of a
portal so we can visualize how the two scenes fit together while

It might in some hackish way, but i think it would be overly complex with poor results.

The mesh is supposed to serve as a representation of the level for the game to use to generate the actual polygons that will be rendered and for telling the game where the player can go, so the mesh needs to represent the logical structure of the level. Assuming that the floors are connected to the walls and the walls are connected to the roof, surely the best way to represent that in the mesh is by having the polygons that represent those structures share vertices. Otherwise it will be harder for the game to figure out that the separate roof object actually closes the room from above.

Of course it would be impractical to make the entire level one huge mesh, so that is why portals are important, so that two disconnected objects can be connected by custom data and that the game reads and uses to connect the objects at runtime.

That is unfortunate. Perhaps there is some way to work around the need for that. I love the idea of using colored materials to tell the game what each face represents, so I’m back to seriously considering using Blender for level design, but it seems there will still be considerable challenges, so it may still be better to create something from scratch in jME.

Then you don’t want a mesh editor at all. You need an editor that understands the more abstract concepts of “Wall Here” “ceiling is 5 units above the floor” etc. More like a home design architectural suite, with a broader focus?

Does the game even need to figure this out? If your character jumps and bangs its head on the roof, why does the game care if there is an infinitely thin seam between the roof geometry, and the wall geometries?

Perhaps I don’t want a traditional mesh editor in the sense of a tool for generating meshes that will be sent to a GPU, but whenever I try to imagine what I do want it always looks very much like a mesh editor as it allows me to arrange floors and walls represented by polygons. So many of the features I would want for this kind of level editor are exactly like the features supplied by Blender.

[quote=“sailsman63, post:6, topic:36443”]If your character jumps and bangs its head on the roof, why does the game care if there is an infinitely thin seam between the roof geometry, and the wall geometries?[/quote]It might be possible to use a disconnected roof without problems, but it wouldn’t make anything easier. Perhaps we want the way the walls are rendered to depend on the type of roof, like some crown molding or similar. Perhaps we want the lighting to change if a room is enclosed with a roof. If we don’t record that the walls are connected to the roof in the level design then we’re just setting ourselves up for headaches.

I used blender for level design with rules like :

  • use empty object to create group, eg ‘walls’
  • use object (not mesh) to define what will become game-object/entity in game
  • name convention to define entity type and sub-type (aka variation of the template)
  • use custom properties (float is available by default) to override sub-type attributes
  • use cube as placeholder (1x1x1 with scale)
  • use cube (1x1x1 with scale) to define area, zone, trigger,…
  • and others …
  • use a post-loader on jme to convert the loaded level with the conventions into the runtime level (entity, game-object, replace place-holder by the correct geometry,…)

Mainly I use Blender to set location, rotation, scale of object.

I’m doing it similar to David (and probably most of game makers):

  • make object Floor1 Floor2 etc roof1, wall1
  • give it pivoit in proper place
  • make UV, assign texture

All the rest is made in game code. It know that wall is wall (from object name) not roof and it just put it in the game scene.

If you need to tell your game that wall is connected to floor - you have wrong concept to do that or you making lvl builder that need to know which wall is to which room etc. Otherwise I don’t know why game need to know that this edge connect wall and floor. Even blender don’t know that - its just connected. Simple.

My game is Skullstone: Skullstone - a dungeon crawler game

I would love to see a more detailed guide to your technique for level design in Blender. It’s hard to exactly figure out from such rough descriptions.

Every game needs a special approach to level design. Another approach when you doing great, open, realistic world and another under the simple game platform. Write what type of game you are doing or what kind of problem you have in blender.

That’s no good. With all the trouble it takes to create a level editor, I will be absolutely sure that it can be used for almost any kind of game. All we need is a level editor with extensive capacity for custom data so that one level editor can serve the needs of many games, then we can put all the headache of level design behind us and just focus on making games.

I am aiming for a sprawling RPG exploration game with as many places to go as possible. To that purpose I want to put the absolute minimum of effort into creating each scene. Most of each scene will need to be procedurally generated based on just a floor-plan designed by me. So I map the game out, model some walls, floors, and furniture in Blender, and then the game puts those pieces together to create the scene graph at runtime. Obviously Blender is perfect for doing the ordinary modelling, but Blender isn’t designed for making maps.

I think problem is in Blender importer - it import only “raw assets” - you can’t move project 1:1. I even have problem with materials - I can’t force SDK to import from path (work with ogre not raw *.blend :frowning: )
It’s simple - blender don’t need to know that door1 is connected to door2 in other map. I remember Newerwinter Map Editor - you can set there where door should to lead, name of key object, its locked or no, scripts etc.
So I agree that you need editor but probably you need to write it yourself :wink:

If you want to know more about editor ask @FrozenShade

Probably a bit late to teh discussion but I know of this tool for blender:


I love it. Thanks @themiddleman, that looks like a wonderful tool. I just wish it were a bit more abstract. There’s no reason for a level design to lay out every single vertex and polygon. Generating polygons programmatically is not so hard and can be far less labor intensive. For example, we don’t need two polygons and a gap to represent a wall when a single polygon contains all the necessary information for rendering a wall. There’s no reason to waste an artist’s time with unnecessary vertices.

The frustrating thing is that I am absolutely in love with how he uses constructive solid geometry in that video. I was just getting a handle on creating a mesh editor and now I have a whole other kind of mesh editing to try to implement.

There are several way to use blender as level editor:

personnaly for 2D “square” /tiles based level, I used a spreadsheet and generate grid of int

There some tiles level editor, but I never tried it, I was too lazy to write the xml loader. And I though that spreadsheet is enough for simple level or fragment (for PGC) and for more complex I prefer the freedom of blender.

An other addon that could be use (30$):

Just read about it in Thought to share it here.

With upcoming version of blender, You can do Level Design/Prototyping.
You should definitely check it. It’s awesome.


Wow, that’s really cool and user friendly!