Sign in to follow this  

Using blender as a map building tool?

This topic is 2548 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

I use blender and I'm using the FBX SDK in my game engine to import a scene. The FBX format seems to support everything I need and blender seems fast enough to build a full sized level without any problems. Also after I import the scene from the FBX file I can then save it out to my own format so when I actually use it in a game the game won't take forever to load.

I know it is missing a few things that most map editors have height map tools but I don't plan to save terrain in height maps and I plan to just directly create the meshes for the terrain. I also know it does not support binary space partitioning but I don't think this is necessary with todays GPUs and if my geometry becomes to complex I will just manually brake it into separate meshes and display them when the player walks to an area where the mesh with be visable.

Now I have to ask myself why not just use blender to build my game's maps?

[Edited by - SteveDeFacto on December 27, 2010 9:58:22 AM]

Share this post


Link to post
Share on other sites
Quote:

The only thing is that blender does not support mesh instances


Not sure what you mean by 'support', but I'm pretty sure that all objects in blender are mesh instances. If you look at all objects they have a 'mesh name' and an 'object name'.

Share this post


Link to post
Share on other sites
I think he may have been referring to something like object placement in the level editor. If this is the case, it's like placing specific objects at specific positions, and having his game know that this is the spawn point of an enemy. What Blender is doing for him now is the level geometry itself, and though you can place objects, (which do indeed instance themselves off of one mesh), Blender exports this as geometry, not as gameplay objects.

I could be wrong, but I think that may be what the OP is looking for.

Share this post


Link to post
Share on other sites
Actually I was talking about what karwosts said. I googled "blender object instances" and found nothing and I tried for an hour to figure out how to reassign a mesh. I just now figured out the operation is called linking and was able to create an instance of a single mesh.

This only makes blender seem like an even better level building tool.

Share this post


Link to post
Share on other sites
Quote:
Original post by SteveDeFacto
Actually I was talking about what karwosts said. I googled "blender object instances" and found nothing and I tried for an hour to figure out how to reassign a mesh. I just now figured out the operation is called linking and was able to create an instance of a single mesh.

This only makes blender seem like an even better level building tool.



It does, Alt-D will make a link copy of a mesh.

I'm just starting to write scripts for my engine so I can use Blender as my level editor/designer. I would recommend you learn Python and make your own exporter. It only took me a few days to write one and I'd never used Python in blender before. I wanted to support LOD objects inside blender among other things.

Good luck and can I follow your progress somewhere?

Share this post


Link to post
Share on other sites
Everyone is just reading the part where I thought blender didn't support instances and leaving replies about that so I just removed it. The question was about using blender as a map building tool not if blender supported instances though I'm glad someone said something I don't think I need to hear it more than once...

Share this post


Link to post
Share on other sites
Quote:
Original post by SteveDeFacto
Everyone is just reading the part where I thought blender didn't support instances and leaving replies about that so I just removed it. The question was about using blender as a map building tool not if blender supported instances though I'm glad someone said something I don't think I need to hear it more than once...
Then what else do you need to know?

There is a custom data property sheet for every object and instance you create. You can attach any kind of data to those if you need it for your level building purposes.

eg: You can place down a box, and mark it as the player's starting position. Then you can add data to specify orientation, or anything else you need.

Share this post


Link to post
Share on other sites
Quote:
Now I have to ask myself why not just use blender to build my game's maps?


If it's doing everything you need it to do, do it. You can certainly build levels easily enough with Blender. I've worked in professional studios that used Maya for level creation, and it worked out fine.

There are definitely reasons studios choose not to go this route. Here are some of those in case they sway your decision:

(1) What you see isn't necessarily what you get. Blender isn't going to be using your renderer, and as such if you do things like custom lighting models, there may be some differences between what Blender shows and what your game shows. If you use some of Blender's more advanced modeling techniques and don't support that in your game, your art may appear broken game-side.

(2) It's super hard to tie this in with your game engine for things like rapid iteration. This kind of integration comes more naturally when creating your own tools.

(3) FBX is not game specific, which means it's likely going to contain data you don't need or not preprocess data in a way that's good for games. Most of these issues can be solved with custom export plugins though - meaning you'll still be able to work within Blender, but there will be a bit of extra lifting involved. It sounds like you're already doing something like this.

(4) Adding onto #2, there's work involved in letting Blender know information about your game-specific entities. In a fully fledged level editor, you may want to be able to set character stats or object physics data right there in the editor, which you don't get for free. Most modelers (I'm less familiar with Blender) have methods to bake custom data in with your assets.

(5) You can't fix Blender if something breaks. Well, technically you can since it's open source, but learning the workings of a codebase as large as Blender is a job unto itself. I don't know what Blender's support/community is like, so if you run into a wall they may/may not be able to help you.

Quote:
I also know it does not support binary space partitioning but I don't think this is necessary with todays GPUs


Is your game supporting physics? Spatial partitioning is still extremely helpful for collision detection. I honestly don't know the state of current physics libraries though - it's possible they do some of this for you, but a precompiled structure will be faster to load and use.

All that said... if Blender works for you now, and you have a reasonable belief that it will work for you as your project evolves, go with it. Creating a good level editing tool is a LOT of work and not something you want to jump into half-heartedly.

Share this post


Link to post
Share on other sites
Sorry then, I mis-interpreted what the OP could have said.

I don't see anything wrong at all with using Blender for level creation, unless it truly doesn't/can't support something you really need. I too recommend though that you learn some python and create your own exporter. This way, you get your own file format, without anything you don't need. For example, the other posters above mentioned how in Blender you can add extra data for your game, for example, player starting position, using a box. If you are doing your own exporter, you can easily take that farther. Just create an object, maybe a 3d diamond, or tetrahedron(or something like that) and then in your exporter, instead of exporting the geometry, you export to however your file format is the player start, and the position and orientation you can get it from the object itself. You could also do this for enemies locations, using a low detail version of the enemy model, so it is easy for you to know what you have. It also works of course for items, powerups, and you could apply it to health zones, or whatever.

But, all of that depends on you creating your own exporter, and having a defined file format. A good idea would be to look at other file formats for 3d models, and see how they define headers, and how the headers define how many of each object there are. Then you could apply the same logic to your game objects, along with the vertices and geometry.

Share this post


Link to post
Share on other sites

You can use shaders in almost all of today's 3d modeling tools. So you can have the same lighting in effect in blender. You can write glsl shaders, and test them right in the view port. Example (This is way out of date...)

Blender also has a great game engine. It CAN be as easy to iterate as making changes and pressing play to see the effect. While obviously you won't be recreating your whole game in the BGE, you can copy the logic of some objects to a python script just to make small on the fly tests.

There is nothing stopping you from having any space partitioning in Blender. In one game editor I used long ago, A sector (the manually placed kind) was just a box with a special material. On export, a list of sectors was made, and all data that was inside those boxes was split up and processed into those sectors. Very easy to do. You can do any kind of spacial partitioning at export time.



Share this post


Link to post
Share on other sites

This topic is 2548 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