Home > Game Developement, Maya / .mel > Maya as a level editor (OVERVIEW)

Maya as a level editor (OVERVIEW)

I realised in my last post about this I just jumped into creating a material system in Maya. Lets take a step back and list all the major components that are required to really do the job right.

Maya has some strengths and weaknesses as a world editor. A major strength is that its pretty flexible and using mostly .mel scripting you can make it do most things you need. A major weakness is that is meant for working on individual models and it takes some work to make it effective at creating worlds.

OK onto the components you need.

Geometry Exporter: This needs to be done as a plugin. Typically I like to separate the geometry export (or model export) process from a level export. The reason being is that when you use Maya as an editor it really has two functions. 1. creating and exporting of models or instances. 2. the layout and design of levels. They are really two different things. The layout mode is merely a placement mode where you are creating terrain and placing the models you have already created and exported.

I always make the geometry exporter an automatic process. meaning that the system should handle the data management as well as checking in/out of perforce. You can also generate a openGL preview of the model for use later in the design/layout phase.

Level Exporter: This is also a plugin. It exports all the design layout and tagging in a usable level file. Depending on what the programmers want to do this can be the exact same export as the geometry exporter. But from the Maya tool side its good to treat this process differently so that your system can handle all the data automatically.

Instancing : Maya’s instancing sucks rocks. It can easily break and causes a ton of clutter in your level. In the past my solution has been to have the modelers create a special “Icon” of their model that gets tagged as the instance icon. This is merely a single mesh with a special attribute on it to signify that it is an icon. So then when it comes time to import the model into your level the system imports the object and throws out anything that is not an “Icon”. So what you are left with is one single mesh that is representing the whole model. This mesh can now be duplicated around your level. Then when it comes time to export the level exporter can see from the special attribute that it is an instance and it can then take the proper steps to handle it.

Material System: I already covered this in an early post HERE

Tagging: Tagging is what designers and artists add to levels an models trigger game functions. These can be volumes, splines, material properties, etc… Typically a plug in gets created to handle this case. The reason being is that you want special openGL icons for these functions. They show up better in the level and the exporter can easily handle them. Then you can create a series of .mel editors to handle the filling out of their properties.

Decorators : is the term I use to describe things such as grass, garbage, pebbles, etc… Anything that needs a special render pass to handle their sheer multitudes. There are a few ways to handle them, You can have spawners that you place in your level that have attributes on them which direct the “growing” of decorators, you can designate them using materials, or you can paint them directly onto the surfaces using your instancing pipeline. The last option is a bit troublesome bit is also very powerful because your artists and designers have explicit control over where the objects render. You will have to create a system to merge them into large groups tho because Maya begins to choke when there are too many objects in the scene.

Portaling: If your game requires portaling you need to support in the editor. Now I have found that because of the sheer size of today’s levels, they need to be broken up into their individual portals. A typical process would be to lay out the level as basic geometry. Decide that you like the layout then break the level up into its portals and export each piece into a separate file. Then you can work on these separate files without having to load them all into Maya. Then have your level exporter stitch them back together for your engine to read.

Nebs Game Developement, Maya / .mel

  1. No comments yet.
  1. No trackbacks yet.