Jump to content

  • Log In with Google      Sign In   
  • Create Account


3D Level Editor?


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
4 replies to this topic

#1 Mehar   Members   -  Reputation: 100

Like
0Likes
Like

Posted 20 March 2011 - 10:05 PM

Hi,

I've recently begun working on a 3D level/WYSIWYG editor for an XNA engine, instead of running inside XNA the XNA portion of the editor will run inside a Windows Form. I've been able to get the form work done and even get an XNA window running inside the form that can import content files (courtesy of samples on the XNA site although the rendering hasn't been optimized for the engine yet).


Now I'm a bit stuck here, I don't know how to proceed! I've been looking for books/tutorials that can point me in the right direction in regards to getting WYSIWYG editor type features implemented but they all seem to be dedicated to 2D editors, does anyone know of any resources that I can turn to for further information (manipulating objects, having multiple objects available at once in the world, etc) on 3D editors?


Thanks.

Sponsor:

#2 Buckeye   Crossbones+   -  Reputation: 4059

Like
1Likes
Like

Posted 21 March 2011 - 05:43 AM

further information (manipulating objects, having multiple objects available at once in the world, etc)

Unfortunately, as you realize, there isn't a lot of specific information on creating 3D editors.

However, in general, manipulating objects in an editor, with regard to specific techniques, doesn't differ significantly from how it's done in a game - picking, dragging, etc. I'm not an XNA person, but the SDK should have examples which illustrate (at least) moving the eyepoint location, picking objects, etc. Those activities, for a starting point, are easier to do in 2D than 3D. You may want to consider, similar to many editors, multiple windows - several orthographic views and a 3D view. As a first step, translate and rotate an object in a 2D view, and render it in both 2D and 3D views. The math for that type of interface, similar to the Hammer editor, for instance, is much simpler than picking, translating and rotating in a 3D view.

With regard to WYSIWYG aspects, at least for a 3D view in your editor, use the same rendering engine as you do in your game, or, at least, those aspects of the rendering that are important - shaders, textures, etc.

To get ideas for interfaces, user manipulation of objects, etc., you may want to try out several open-source 3D editors (if you haven't already) to decide on what type of interface you want. Then take a look at the source code for that editor to see how it's done.



Please don't PM me with questions. Post them in the forums for everyone's benefit, and I can embarrass myself publicly.


#3 Dawoodoz   Members   -  Reputation: 294

Like
1Likes
Like

Posted 21 March 2011 - 09:39 AM

One way is to make the game itself very dynamic and just start it in editor mode with flying camera and some tools. I prefer using 3D tiles for roleplay games, voxels compressed using axis aligned boxes for first person shooters and GPU accelerated multi resolution heightmaps for any outdoor game. A lot of the code for the editor can often be reused in the game for dynamic destruction and building things as a part of the game.

My open source DirectX 10/11 graphics engine. https://sites.google.com/site/dawoodoz

"My design pattern is the simplest to understand. Everyone else is just too stupid to understand it."


#4 solenoidz   Members   -  Reputation: 517

Like
3Likes
Like

Posted 21 March 2011 - 11:42 AM

Writing an WYSIYG level editor along with the game engine is a wise step, IMHO.
It could accelerate your development, by exposing the 3D world in a visual way.
It requires a bit of effort to write and maintain, but at the end of the day it pays every single hour you spend working on it. You could start by setting up a viewport and moving the camera around. Then load objects, implement picking and selecting objects or set of objects, move, roatate , scale, clone etc,. Having a rich GUI tool-set fo RAD applications is a handy thing. Everyting in the world could be made visual and tweakable - materials, shader parameters, transformations, physics etc.
Your editor could be uber editor and do everything you can think of, or you could have a set of small editors to edit particle systems, physics systems, GUI interface etc.
Writting a 3D editor that uses you engine could force you to implement the interface to your graphics engine in a usable way. You will feel the need to make it usefull, simple and will think about every function and parameter you export from your engine , test it and debug it right away in the editor. Writting an editor that uses the engine is similar to writting a game that uses the engine. You could even write and play your game using the editor. When tested, make an exe that call the same functions and you could release a game demo. You could attach your dll engine process to the editor.exe and step into and debug your engine code.



#5 Mehar   Members   -  Reputation: 100

Like
0Likes
Like

Posted 21 March 2011 - 08:46 PM

Hi,

Thanks for all the responses!

For the time being the editor will mainly focus on scene editing and if there is a need for other elements I'll consider adding them in later on. I figure for the time being I should work on implementing a free form camera into the XNA window, that way when an object is loaded you can move around it.

At the very least, this should make level design somewhat easier since you can see the maps better than if it were all hard coded into the game.

I forgot to mention in my original post that I did find this tutorial,

http://www.innovativegames.net/blog/blog/2009/03/25/editor-tutorial-1/

Unfortunately, it doesn't look like it made it past two posts but it might serve as a good starting point for those stuck in a similar boat.

Thanks again for the tips!




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS