Sign in to follow this  

Using a 3D modeling package as a level editor?

This topic is 3575 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Just like the title says, I was playing with the idea of using a modeling package (like Blender) to do everything that you would need in a level editor (I'm using Blender as an example here but I suppose this could very well apply to any modeling package). In fact I would like to avoid having to develop a level editor all together, if that's possible. For example, let's say I've finished modeling the terrain and now I would like to place entities in the world and assign certain properties to them. To give a concrete example, let's say I'm developing a FPS and I would like to have vehicles, boxes, doors, rivers, and checkpoints. Now it doesn't matter what the geometric representation of a checkpoint is, what's important is the data associated with it, as long as the game engine knows what to do with it. Things like rivers and doors are more complicated, because they're naturally tied in with the geometry of the level. I imagine I could represent a river as a group of "water nodes", and when the game runs it understands that each node contains a certain volume of water, or something similar. I'm not sure how I would handle doors, though. Can someone throw out any ideas or suggestions on how to do something like this? I suppose I could write a python script/plugin for Blender that provides some kind of a simple interface for the user to assign arbitrary data to different objects/entities defined in the world. Then I would need a way to export these objects (and the data associated with them) from Blender so that my game engine can read them in as a level file and instantiate a level. Blender would only be concerned with exporting the static terrain geometry and each object's data. I've never actually written a plugin (or exporter) for a modeling package before, so I don't really know how complicated it is. I'm not too familiar with 3D modeling packages, but as I understand it there's usually a way to associate names with certain objects in your scene. A simpler way to do this if I wanted to avoid writing a plug-in or add-on for Blender, then, would be to use some kind of naming scheme that the game engine can understand when it reads in the level data. I read somewhere else where the developers had used "blind data" in Maya to do something similar. Any thoughts? I'd be interested to hear what people have done in the past.

Share this post


Link to post
Share on other sites
I once worked on a project as a programmer, where the level-designers used 3DS Max for their levels. I designed a simple script and wrote an interpreter for it that allowed the level-desigers to attach functionality to named objects. For every named object, the game would check if any properties were associated with it in the levels script file.

Inspiration was taken from Half-Life: if you check a .bsp file in a text or hex editor, you'll notice that the game entities are stored as a sort of script that describes their names, properties and actions. You may want to check it out to get some inspiration. What I did was storing this data in an external file - it was simply less of a hassle for me (but more work for the level-designers, heh ;)).

So, whether you store this data in the level file itself or externally is merely a matter of convenience. A plugin can ease the process but isn't absolutely necessary.


However, there's another option, and that's using an existing level-editor, possibly writing a plugin or conversion tool for it, and reaping the benefits of using a specialized level-editor.

Share this post


Link to post
Share on other sites
I'm doing this as well, attaching a simple homebrew scripting language to each object in my scene. I have one model file as a database of the movable objects available, and another file with the static level geometry. This second file contains objects which are simply "placeholders" for an object from the database. On loading, I take the transformation matrix of the placeholder object, and load in the real object from memory.

The objects from the database also have scripts attached, describing what they do. Currently, the only information my "scripts" store is what shape they have in the physics engine, e.g. a television is a box with a sphere on the back, while a tin can is a single cylinder, etc. If an object is static it is labelled as such, and if it is interactive it will be loaded differently.

I'm using the editor AC3D because the file format is easy to parse and is human readable.

Share this post


Link to post
Share on other sites

This topic is 3575 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this