Intuitive World Editor (Yet another Editor) [+ Source code]

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Alexiss
Halfling
Posts: 74
Joined: Wed Aug 10, 2011 2:11 pm
x 11

Intuitive World Editor (Yet another Editor) [+ Source code]

Post by Alexiss »

Hi,

[Scroll down to check out the screenshots and skip the blabla]

This is a world editor I've been working on for a few months now. I took a long break, but recently started working on it again, as I currently have more free time.
Its main goal is to be very intuitive and easy to use. Eventually, I'll be using it to work on a small game (probly RPGish).

Features :
  • Supposedly intuitive (as the name suggest)
  • Entities management
    • Drag&Drop from Asset menu
    • Move / Scale / Rotate
  • Undo/Redo (almost finished - just need a quick fix)
  • Properties manager
  • Full fledged terrain editing
    • Shape editing
    • Texture splatting
    • Color painting
    • Brush system useable with all editing features
  • In-editor material/shader editing (Yaose), reload and preview
  • Lots of shortcuts to make your life easier
  • Dockable panels
  • [WIP] Voxel terrain editor
  • [WIP] Online asset repository
  • [WIP] Easy asset importing
Special thanks :
  • The Ogitor team for their open source editor, which helped me a lot for the terrain editing features
  • Ruud v A for his awesome material editor - Yaose
  • The Polyvox team for their voxel library
  • DragonSnail, Vigdis and Nauk from the Artifex Terra team for their really nice models
  • Dylan (zarfius) for his Glue Editor which inspired me while working on this editor

Screenshots :

None shall pass :-)

Image


Custom game engine integration

Image


Some more random editing fun

Image


Random terrain shape editing

Image


Random terrain texture editing

Image


Creating a Voxel Volume

Image


Testing voxel terrains (WIP)

Image


Some more voxel terrains testing with fake shadows - idea stolen from MadMarx Triplanar shaders (WIP)

Image


Entity editing

Image


Material editing/reload/preview

Image


Project/Asset management

Image


Sound editing

Image


TODO List :

Image

[Edit 19/01/12 : Added TODO list]
[Edit 25/11/11 : Added special thanks for the models, and a few more pictures]
Last edited by Alexiss on Sun Mar 28, 2021 11:33 pm, edited 5 times in total.
User avatar
amigoface
Greenskin
Posts: 132
Joined: Mon Oct 13, 2008 3:01 pm

Re: Intuitive World Editor (Yet another Editor)

Post by amigoface »

look promissing !

now :

- what for the licencing?, free/opensource/commercial ?
- does it handle the new ogre terrain component with paging ?
- how about terrain data import ?
- what the state of the project ?
- any usuable version ?
Alexiss
Halfling
Posts: 74
Joined: Wed Aug 10, 2011 2:11 pm
x 11

Re: Intuitive World Editor (Yet another Editor)

Post by Alexiss »

Thanks !
amigoface wrote:- what for the licencing?, free/opensource/commercial ?
Free, I don't know yet about open source.
amigoface wrote:- does it handle the new ogre terrain component with paging ?
Not yet, I have a few other features to implement first. But this is definetly on the TO-DO list :-)
amigoface wrote:- how about terrain data import ?
Nop, but this should be fairly quick to implement. I don't need it for my own use, but I'll add it for the next release if this is something important for other users.
amigoface wrote:- what the state of the project ?
I suppose you could call this a BETA of the first version.
amigoface wrote:- any usuable version ?
Not as of yet, it still needs some tweaking until I'm satisfied enough to make a public release :-)
I suppose you can expect a release in a upcoming weeks.
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Intuitive World Editor (Yet another Editor)

Post by jacmoe »

Really nice editor.
Competition is good! :)

Looks like .NET, is it?
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
amigoface
Greenskin
Posts: 132
Joined: Mon Oct 13, 2008 3:01 pm

Re: Intuitive World Editor (Yet another Editor)

Post by amigoface »

jacmoe wrote: Competition is good! :)
maybe but I would have preferred one Official Ogre World Editor and adding features to that single editor
to prevent reinventing the wheel each new editor project
Alexiss
Halfling
Posts: 74
Joined: Wed Aug 10, 2011 2:11 pm
x 11

Re: Intuitive World Editor (Yet another Editor)

Post by Alexiss »

jacmoe wrote:Really nice editor.
Competition is good! :)

Looks like .NET, is it?
Thanks ! :-)

It's 100% C++, I use MFC for the GUIs. Though, I'm thinking about using some C# for future tools GUIs.
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: Intuitive World Editor (Yet another Editor)

Post by duststorm »

amigoface wrote:maybe but I would have preferred one Official Ogre World Editor and adding features to that single editor
to prevent reinventing the wheel each new editor project
I was also thinking the same.
It does include nice extra features like voxels and material editor that would be cool to have in ogitor. Maybe these can be backported into ogitor if they're not platform dependent. :)
Developer @ MakeHuman.org
User avatar
spacegaier
OGRE Team Member
OGRE Team Member
Posts: 4304
Joined: Mon Feb 04, 2008 2:02 pm
Location: Germany
x 135
Contact:

Re: Intuitive World Editor (Yet another Editor)

Post by spacegaier »

duststorm wrote:
amigoface wrote:maybe but I would have preferred one Official Ogre World Editor and adding features to that single editor
to prevent reinventing the wheel each new editor project
I was also thinking the same.
It does include nice extra features like voxels and material editor that would be cool to have in ogitor. Maybe these can be backported into ogitor if they're not platform dependent. :)
We are always looking for new additions/plugins for Ogitor. Just contact us over at the Ogitor forums and we will work something out!
Ogre Admin [Admin, Dev, PR, Finance, Wiki, etc.] | BasicOgreFramework | AdvancedOgreFramework
Don't know what to do in your spare time? Help the Ogre wiki grow! Or squash a bug...
User avatar
Jabberwocky
OGRE Moderator
OGRE Moderator
Posts: 2819
Joined: Mon Mar 05, 2007 11:17 pm
Location: Canada
x 218
Contact:

Re: Intuitive World Editor (Yet another Editor)

Post by Jabberwocky »

Nice work!
Image
User avatar
Nauk
Gnoll
Posts: 653
Joined: Thu May 11, 2006 9:12 pm
Location: Bavaria
x 36
Contact:

Re: Intuitive World Editor (Yet another Editor)

Post by Nauk »

Nice feature set, you put a lot of thought and effort to it! Specially like the random shaping, something I been thinking about since a while too. Also flattering to see our models finding their way into yet another project :)
Alexiss
Halfling
Posts: 74
Joined: Wed Aug 10, 2011 2:11 pm
x 11

Re: Intuitive World Editor (Yet another Editor)

Post by Alexiss »

Thanks for all the kind comments ! :-)

I added a few more screenshots, including a few to show what voxel editing looks like at the moment. It's still very WIP though.
Unfortunatly I haven't had any time to work on the editor this week. However, I have a few very cool additions planned for the next few weeks.

I will update this thread soon.
Brainshack
Greenskin
Posts: 118
Joined: Tue Feb 19, 2008 1:01 pm

Re: Intuitive World Editor (Yet another Editor)

Post by Brainshack »

How will the levels be saved and how can i load them in my game?^^
Image
Alexiss
Halfling
Posts: 74
Joined: Wed Aug 10, 2011 2:11 pm
x 11

Re: Intuitive World Editor (Yet another Editor)

Post by Alexiss »

Hi Brainshack,

When the first version is released, you will be able to export levels in .scene format.
However, I am planning on adding a plugin feature which will allow you (among other things) to export your levels using your own format.
Alexiss
Halfling
Posts: 74
Joined: Wed Aug 10, 2011 2:11 pm
x 11

Re: Intuitive World Editor (Yet another Editor)

Post by Alexiss »

Hi,

Some news about IWE :
I'm currently refactoring the whole editor to split it into different modules. Practically, here are the features this will introduce :
  • Integrate your own render engine in the editor.
  • Run your game logic from within the editor, simply by clicking on a button.
  • Create your own GUI, allowing you to run IWE on any platform you want.
  • Plugin system, allowing you to add your own features to the editor.
You will be able to interact with the different modules through C++ interfaces class (I inspired myself from the Source engine which left me a good impression).

I've been playing around with WPF to create a GUI. Not sure if I will use it for IWE yet.

Image

Also, here is the TODO list I've been keeping up-to-date since I started the editor :

Image
lordDominus
Gnoblar
Posts: 3
Joined: Wed Apr 13, 2011 10:59 pm

Re: Intuitive World Editor (Yet another Editor)

Post by lordDominus »

I've been following this post for a while, and I must admit that I like your idea very much :) it is very good looking, with a bunch of useful functions put together. I see you have made a rather long to do list, well I hope you will keep doing this, cause I would like to see the project finished :D so don't give up and keep up the good work.
May I ask, when can we hope to see a release? I wouldn't mind even a buggy very WIP release :)
Alexiss
Halfling
Posts: 74
Joined: Wed Aug 10, 2011 2:11 pm
x 11

Re: Intuitive World Editor (Yet another Editor)

Post by Alexiss »

lordDominus wrote:I've been following this post for a while, and I must admit that I like your idea very much :) it is very good looking, with a bunch of useful functions put together. I see you have made a rather long to do list, well I hope you will keep doing this, cause I would like to see the project finished :D so don't give up and keep up the good work.
May I ask, when can we hope to see a release? I wouldn't mind even a buggy very WIP release :)
Hey !

Thanks I really appreciate your feedback and it definetly makes me want to keep working on bringing IWE out to the Ogre community ;-)

I am not sure when I can release an "alpha" version but if you're interested, pm me your GTalk or Skype username and I'll keep you posted.

As I mentionned I started a rather big refactoring, so I need to finish this first before releasing anything. I'm trying to make the plugin system as easy and documented as possible so that the community can contribute its own features and quickly make IWE a fully-fledged editor !
User avatar
zarfius
Gnome
Posts: 367
Joined: Wed Jan 03, 2007 12:44 pm
Location: Brisbane, Australia
x 13
Contact:

Re: Intuitive World Editor (Yet another Editor)

Post by zarfius »

Alexiss wrote:* Dylan (zarfius) for his Glue Editor which inspired me while working on this editor
Wow. I can't believe I didn't notice this thread before. You've done a very imressive job.
btw, those screenshots look surprisingly similar to the ones in Glue Editor ;)
Alexiss wrote:I am not sure when I can release an "alpha" version...
As I mentionned I started a rather big refactoring, so I need to finish this first before releasing anything. I'm trying to make the plugin system as easy and documented as possible so that the community can contribute its own features and quickly make IWE a fully-fledged editor !
If I learned anything from developing Glue Editor it's that you should release early and often. If I was to do it again I would start with the most basic features first, implement them and release. Then repeat with the next set of features and release. Refactoring is important to make the code easier to work with, but only if it helps getting the next feature in.

Anyway, it's good to see someone tackling this problem once again. It's a big job. I wish you luck.
Craftwork Games - hand crafted entertainment.
http://www.craftworkgames.com/
Alexiss
Halfling
Posts: 74
Joined: Wed Aug 10, 2011 2:11 pm
x 11

Re: Intuitive World Editor (Yet another Editor)

Post by Alexiss »

Thanks Zarfius !
btw, those screenshots look surprisingly similar to the ones in Glue Editor ;)
This is probably because the grid colour and layout is the same as in your editor :-)
[s]The Move/Scale/Rotate buttons icons on the Home ribbon panel are also the same as yours.[/s] ==> Edit: Thought they were, but they aren't
If I learned anything from developing Glue Editor it's that you should release early and often. If I was to do it again I would start with the most basic features first, implement them and release. Then repeat with the next set of features and release. Refactoring is important to make the code easier to work with, but only if it helps getting the next feature in.

Anyway, it's good to see someone tackling this problem once again. It's a big job. I wish you luck.
I'll try to follow your advices, thanks ;-)
Alexiss
Halfling
Posts: 74
Joined: Wed Aug 10, 2011 2:11 pm
x 11

Re: Intuitive World Editor (Yet another Editor)

Post by Alexiss »

Hi,

[This is a rather long post, with lot of technical stuff, you can just scroll and check plugins for the most interesting part]

It's been a while since I posted any update, so here I go.
There have been so much changes that I will probably forget a lot of stuffs, actually most of the new features would deserve a whole post on their own.


1. Refactoring

As mentioned in my previous post, I wanted to refactor and split up IWE in multiple modules :
  • GUI - The editor interface
  • Render module - Implement all the render logic (also possibly the game logic) and expose some of it. The render module can be user-defined, but a default one is provided.
  • Editor module - Define base editor stuffs, it's sort of a glue between the modules.
  • Plugins - Every tool is defined in plugins. There are 6 of them at the moment.
All these modules communicate through C++ interfaces, and make extensive use of an event system (very similar to C# delegates - you'll see some of this if you keep reading).

Most of the refactoring work - apart from splitting everything up - went in GUI abstraction.
This is especially important for plugins. I wanted to make it easy to create new plugins, and interact with the GUI.

I'll go quickly through each of them :

Abstracted GUI parts

Image


a. Property grids

One of the most important part in a world editor, is editing object properties - (right panel on previous screenshot).
Therefore it is only natural that exposing an object's attribute should be convenient.

With the help of several classes and macros, I reached a result I am rather happy with. Here's a small snippet from the Light plugin :

Code: Select all

IWE_IMPLEMENT_PROP_OVERRIDE_BEGIN(CLight, CIWESceneNode)

  IWE_PROP_LEVEL_BEGIN("Light");

    IWE_PROP_COMBO_S("Type", "Sets the type of light:\n - Point light sources give off light equally in all directions.\n"
      " - Directional lights simulate parallel light beams from a distant source.\n - Spotlights simulate a cone of light.",
      m_vecLightTypes, m_sLightType,
      FastDelegate2<const std::string&, int>(this, &CLight::onSetLightType), false);

    // More properties

    IWE_PROP_LEVEL_BEGIN("Attenuation");

      IWE_PROP_FLOAT_S("Range", "Absolute upper range of the light in world units.",
        m_fAttenuationRange,
        [pInst](float f) { pInst->m_fAttenuationRange = f; pInst->refreshAttenuation(); }, false);

      // More properties

    IWE_PROP_LEVEL_END();
    
    // More properties

    IWE_PROP_BOOL_S("Lock Visual Helper", "",
      m_bLockVisualHelper,
      [pInst](bool b) {
        pInst->m_bLockVisualHelper = b;
        pInst->m_pVisualHelper->setVisible(b || pInst->m_bTargetSelected);
      }, false);

  IWE_PROP_LEVEL_END();

IWE_IMPLEMENT_PROP_END();
This snippet describe how to expose the properties of a CLight.
CLight itself derives from a CIWESceneNode (I am currently changing this hierarchy though as this is bad OOP) which also expose some properties (position, scale, orientation, ..).
Therefore it uses the IWE_IMPLEMENT_PROP_OVERRIDE_BEGIN macro which just appends the properties after those of CIWESceneNode.

The properties themselves are bound to a variable and can define a getter and setter. These can be either lambda functions or FastDelegate (http://www.codeproject.com/Articles/715 ... t-Possible).
The variables are wrapped in a class which automatically detects (most of the time) changes made to them, and update the property grid accordingly.

You can find more about how this works here.


b. Project files / Drag-Drop

The project explorer (left panel on previous screenshot) displays the available assets. Every plugin can register its own assets.
For instance, IWE_PluginEntities which deals with the .mesh files and entities (no kidding) register all the mesh files this way :

Code: Select all

IUIProjectTree*           pProjTree = GetUIManager()->getProjectTree();

m_pAssetsCat = pProjTree->addCategory("Assets");
m_pAssetsCat->addRegexFilter(".*\\.mesh");
As you can see, it is registering a regular expression matching all *.mesh files. The result can be viewed on the screenshot, every mesh files available are listed under the "Assets" directory.

Once the assets are displayed in the project tree, they can be drag-dropped in the scene. To do this, we register a delegate to handle drag-drop events :

Code: Select all

GetUIManager()->eventDragEnter +=
  FastDelegate3<const std::string&, IViewport*, const CIWEPoint<int>&, e_dropEffect>(this, &CPlugin::onDragEnter);
GetUIManager()->eventDragOver +=
  FastDelegate2<IViewport*, const CIWEPoint<int>&, e_dropEffect>(this, &CPlugin::onDragOver);
GetUIManager()->eventDrop +=
  FastDelegate2<IViewport*, const CIWEPoint<int>&, bool>(this, &CPlugin::onDrop);
GetUIManager()->eventDragLeave +=
  FastDelegate1<IViewport*>(this, &CPlugin::onDragLeave);
I'll skip the drag-drop handling as there is nothing exciting with it, but this demonstrate how easy it is to add and deal with project tree items.
Context menus are not yet abstracted, but I am planning on doing this very soon.


c. Main menu (Ribbon)

This is where most of the tools buttons and items are displayed (Top panel on the screenshot).
So far I have abstracted the following components : Button (small / Large), Separators, Gallery (image gallery) and Slider (numeric input).

There's nothing really special about this so I'll just paste a small snippet :

Code: Select all

IUIMainMenu* pMainMenu = GetGUI()->getUIManager()->getMainMenu();

IUICategory* pCat = pMainMenu->addCategory("Terrain", 1);
IUIPanel* pPanel = pCat->addPanel("Terrain Tools", 0);

int iPos = 2;
    
// Linear Height Button
m_pLinearHeight = pPanel->addButton("Linear Height", "HeightEditToolIcon.bmp", "Plugins", iPos++);
m_pLinearHeight->setLargeButton(true);

// [...]

// Separator
pPanel->addSeparator(iPos++);

// [...]
As a side note, simple tools with a single button can simply override an helper class which automatically deal with all the button registering, callbacks, mouse inputs, etc. process.


d. Scene objects [WIP]

This is where all objects in the scene can be viewed, searched, and filtered. It is currently WIP but will work mostly like Project Tree.


e. Tabbed Documents - CLI/C++

This is one of my favourite new feature. One of the main problem I saw with splitting up IWE was the ability to create new GUIs in plugins.

With CLI/C++ support, plugins can use C# WinForm components, and create interfaces. These can then either be dialogs, or User Controls.
User Controls can be tabbed in the main area as a document, much like files in Visual Studio or your favourite IDE.

A document is basically a tabbed window in the main area, for instance, the render viewport is a document.

Here is a GUI plugin I put together quickly using WinForm, for a future NPC editing tool I will be working on :

Image



2. Plugins

Another job that came with refactoring was moving all previous tools code to plugins. Hopefully that wasn't too hard as they were already coded in a modular fashion.

So far I have implemented 6 plugins :
  • Base Tools plugin - This adds the Move/Rotate/Scale tools, which apply their respective actions on objects that implement the ISelectableTarget. It also includes some other minor features.
  • Entity plugin - Create and edit entities
  • Terrain plugin - Create and edit terrains (Ogre::Terrain) - Same features as previous version
  • Light plugin
  • Sound plugin
  • NPC Editor plugin (WIP) - Will allow to edit NPCs in a somewhat generic fashion
The newcomers are the last 3 plugins, the other tools were already available in the latest version.
The terrain plugin went through some work though, and now support multiple terrain editing, which wasn't the case before.

Here's a screenshot showing some lights editing, rendered with a custom render engine I've started putting together for my game :

Image


Another feature which has been implemented (or at least finalized) is the full support for undo/redo in plugins.
I am not very happy with the way I deal with it as of now though, and would like to write some helper functions/macros to ease this process.

To conclude, a smaller but still cool feature, plugins can be embedded in their own .zip files, along with all their resources.
For instance, when I resume my work on voxels, and write the Voxel plugin, I'll embbed all shaders, materials and other resources in the plugin .zip file.
User avatar
duststorm
Minaton
Posts: 921
Joined: Sat Jul 31, 2010 6:29 pm
Location: Belgium
x 80
Contact:

Re: Intuitive World Editor (Yet another Editor)

Post by duststorm »

When you say "custom rendering engine", do you mean something else than Ogre? Or do you mean modified Ogre or something built on top of Ogre (game engine)?
Developer @ MakeHuman.org
Alexiss
Halfling
Posts: 74
Joined: Wed Aug 10, 2011 2:11 pm
x 11

Re: Intuitive World Editor (Yet another Editor)

Post by Alexiss »

Built on top of Ogre.

Basically, the GUI and Editor module are not linked against Ogre. This allows to use any version of Ogre without recompiling these modules.
Now, since they are not using Ogre, the render engine needs to wrap a few of Ogre's features (like creating a viewport/render window).

This is done through C++ interfaces, which the render engine implements.

In order to start building my game's render engine, I simply made a copy of the default render engine for IWE, which basically only implements the mentionned interfaces.
Then, I could start building on top of it, adding game logic, compositors and shaders, like you normally would for any game.

One of the most interesting feature will be to run your game logic directly in the editor, to test your scene as you edit it.

Also, I realise I haven't mentionned this in my previous post, but I have now decided for a while to make IWE a free and open source software.
I'll release the sources along with the first release. Meanwhile, if anyone wishes to use it as it is, or work on it, I will gladly share the sources.
User avatar
zarfius
Gnome
Posts: 367
Joined: Wed Jan 03, 2007 12:44 pm
Location: Brisbane, Australia
x 13
Contact:

Re: Intuitive World Editor (Yet another Editor)

Post by zarfius »

Alexiss wrote:Also, I realise I haven't mentionned this in my previous post, but I have now decided for a while to make IWE a free and open source software.
I'll release the sources along with the first release. Meanwhile, if anyone wishes to use it as it is, or work on it, I will gladly share the sources.
When do you plan the first release? Bitbucket is probably the way to go for open sourcing it.
Craftwork Games - hand crafted entertainment.
http://www.craftworkgames.com/
Alexiss
Halfling
Posts: 74
Joined: Wed Aug 10, 2011 2:11 pm
x 11

Re: Intuitive World Editor (Yet another Editor)

Post by Alexiss »

Sorry for the late answer, I've had a very busy week.

I agree, Bitbucket is the way to go for open sourcing.
I don't know yet about a release date. In fact, I'm going to be busy for a few weeks, so this will stall IWE development.

I can send the sources over to you if you're interested in checking them out ASAP.
User avatar
zarfius
Gnome
Posts: 367
Joined: Wed Jan 03, 2007 12:44 pm
Location: Brisbane, Australia
x 13
Contact:

Re: Intuitive World Editor (Yet another Editor)

Post by zarfius »

Alexiss wrote:I can send the sources over to you if you're interested in checking them out ASAP.
Nah, don't worry about it. I'm patient ;)
Craftwork Games - hand crafted entertainment.
http://www.craftworkgames.com/
Alexiss
Halfling
Posts: 74
Joined: Wed Aug 10, 2011 2:11 pm
x 11

Re: Intuitive World Editor (Yet another Editor)

Post by Alexiss »

Yeah, so 1 year later I'm still busy over my head and into problems so I decided to release the sources on GitHub the way I left them.
I still want to work on IWE and this is a temporary solution as I thought it might be more useful there than sitting on my hard drive taking dust.

I'm a total noob in regard to licenses, so if anyone felt like enlightening me as to what are my main options and how I should proceed to adopt one, I would appreciate it !

I'll try to add some documentation when I start working on IWE again, but meanwhile from the top of my head here's what you need to compile on Windows as it is :
* VS2012
* ./setup.bat
# Make sure the $OgreSDK var point to a dir with /lib/(debug|release)/(Win32|x64) and /include
# Make sure the $OgreSDKBoost point to a dir with /lib/(Win32|x64) and /boost (hpp includes)
# Adjust & run it
* Compile desired dependencies in ./Dependencies
* Main solution is in ./Solution

GitHub link : https://github.com/alexis-/iwe
I am uploading files on github as I am writing this and my connection is super slow (read 20-30kB/s upload) so it might take some time to appear online
Post Reply