Jump to content
  • Advertisement
Sign in to follow this  
QQemka

External Level Editor?

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

Hello. I got to a point in my engine development where I can do most "stuff" required for a basic game. I've got several concerns I'm going to ask about here.

 

First of all - level editor. I cannot imagine creating one myself, especially when there are tools like Blender which may come in handy. I am a programmer, and so I would like to ask someone who's been around if Blender can be used to create and export entire scene with my (detailed) requirements?

I want to have a 512x512 quad heightmap split in 256 32x32 chunks (for frustum culling). Then, information about all used mesh objects (model information with vertex xyz, tex uv,normals, and simplified collision mesh), instances of each mesh on the scene (xyz location, yaw pitch roll). That would do for the very beginning, from what I read I'd have to write a python script to convert it into my engine format. Is that doable only in Blender?

 

Second thing - shadows. My engine supports dynamic lighting (nothing too fancy) but I've got problem with shadows. Lighting goes through walls and lits the objects that are hidden behind something and shouldnt get the light. I'm going to have only one "sun", so I would like to "calculate" all the lit areas and shadows during "scene compilation" precisely, and just load it without calculating it every frame over and over - as i said the sun will be static. And again - is Blender capable of doing so? I did not find any d3d11 tutorials on shadows, so I'm kinda green when it comes to that topic... :)

 

Thanks in advance

Share this post


Link to post
Share on other sites
Advertisement

To your first question: if you're writing the export script for your level file format in python yourself, you can include any information you want from the scene, so I'd say it's certainly possible.  That would let you do all "level building" directly in Blender, and then hit your custom export button.

Second: I'm pretty sure there are a large collection of cast-shadow tutorials for d3d11 out there, but to your question about using Blender the way you want, someone more savvy with lighting and pre-baking in Blender specifically could probably answer that part more comprehensively than I.  My experience with it is limited to modeling/animation.

Share this post


Link to post
Share on other sites

I had the same dilemma for a level editor for my game engine ( http://opengine.io )

 

What I ended up doing was using the Three.js editor: http://threejs.org/editor/

It's convenient in that it's already put together with the translate/scale/rotate gizmo, groups, model loading etc. Also since it's in javascript it's fairly easy to export a json representation of the whole scene. Or using javascript you can write out a binary file and create your own scene format.

 

I took it a step further and used the source code for the Three.js editor and wrapped it inside an Electron app, which gives me access to the file system.

 

Screenshot of my editor using threejs: https://pbs.twimg.com/media/Cm3xQC2VMAASaOM.jpg:large

 

The downside to this approach is it uses a different rendering engine than my own, but it works as a stop gap until my engine is ready for it's own scene editor ( aka I have time to make it ). However, since it's all WebGL wrapped in Chrome, it's cross-platform.

Share this post


Link to post
Share on other sites

Whenever you get to this stage in an engine, you have to make a choice from the two most basic approaches.

 

1) Write your own editor.                                               [ Unity, Unreal, etc    ]

2) Write an export script for an existing editor.              [ Most game studios ]

 

It really just comes down to that choice.

 

Most designers like an interface they know, so writing an export script for Maya / Blender / Zbuffer  is the approach they will usually force down your throat. This isn't always the best approach though and can require a lot of programming effort. You also have to maintain it. A simple update of the tool can break everything and stop development in it's tracks until you fix it.

 

Writing your own has a lot of advantages. It's your own renderer so things look the same in the editor and in game. All the file types are the ones you want to use. It's infinitely expandable and can grow as you need it to. (Some call that a good thing, others call it feature creep and swear at you)

 

Getting your own editor started is a lot of work though.

Share this post


Link to post
Share on other sites

If you are familiar with DOM and C#, take a moment to look up Sony ATF. The library also includes a demo level editor that is open sourced and completely usable. Mind you, that you'll need to do some implementation yourself to get it to work. I'm currently working with the library to build my own editor tool set from scratch. And so far... it's very easy to use. Even when you're combining it with code from C++. Be sure to skin it though... as the default skin looks like crap.

 

XLE Engine from a few devs of Archage also open sourced their stuff. The have a very unique terrain editor that's capable of producing very interesting shapes and makes use of a pixel shader to do all of the brush work.

 

Also, I wouldn't use Blender on it's own to create a heightmap under your specifications. You can edit it's code to add features to it, or make python scripts to do so. You'll find that the base program of Blender is actually very well written and structured. If you don't go that route, you an probably use it to generate one super massive height map and break it apart in a photoediting program. But it's probably best to build your own tools.

Edited by Tangletail

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!