PLSM2 mapeditor thread - Questions/suggestions/remarks

Anything and everything that's related to OGRE or the wider graphics field that doesn't fit into the other forums.
Locked
User avatar
Lucky_Luciano
Greenskin
Posts: 136
Joined: Mon Feb 14, 2005 9:25 pm
Location: Belgium

PLSM2 mapeditor thread - Questions/suggestions/remarks

Post by Lucky_Luciano »

I've released the first, and highly incomplete, build (alpha 0.1) of the map-editor for the paging landscape2 plugin, so I decided to make a centralized thread for any comments/remarks/suggestions you might have.

I made two versions:
  • A pre-compiled binary version: which you can download here. I host this on my personal webspace so I'm not sure how long it will hold out. *fingers crossed*
    If you want to see the map-editor in action without the hassle/problems to get the application compiled, this is exactly what you are looking for (+/- 15 mb).
  • A source version: I included the necessary files to compile it out-of-the-box when using Visual Studio 7.1 and run a default Paging landscape map. You can find that version on the Ogre CVS. You can find more info on how to get the CVS here.
I also made a Wiki page that contains information on how to compile the map-editor, plus: I'm going to keep a list on the Wiki about which people are working on what features for the editor, so things can evolve in a (hopefully) orderly fassion :)

If you have questions that aren't covered in the readme file (or if I made a mistake) then this is the perfect place to ask your questions.

Of course I didn't release the source solely as a showcase for the editor. The main reason is that some people suggested to help me on the editor and I want to allow them (or other people) to work on features for the editor if they feel like it.
These are the current features on the TODO-list:
  • Real-time terrain deformation via different brush-sizes and brush-strengths (already implemented)
  • A modular GUI. Meaning: I tried to keep the GUI as flexible and "independent" as possible, so adding new functionality to the editor should be very easy. Different people can work on different parts of the map-editor independently and can simply "plug" their "module" into the main-GUI later when they are finished. (already implemented)
  • Real-time texture-painting in the terrain via different brush-sizes and brush-formats
  • Placing objects and items on the terrain via an easy to use drag-and-drop interface
  • A fog editor (partially implemented)
  • A water editor
  • A skyplane/skybox/skydome editor
  • Exporting the terrain as a .mesh object for easy importing in other Ogre applications
  • Loading/saving maps
  • Undo/redo functionality
  • Dynamically add new pages to an existing terrain (so the final terrain size doesn't need to be known from the beginning) (Should already work, though I don't have a GUI for it though)
If you think you can aid us in implementing one of them, please post here what you are going to add and I'll add you to the Wiki-page. The last thing we want is two people working on the same features independently ;)


Thanks and enjoy!

Image Image
Image Image

User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Post by jacmoe »

So very, very usefully cool ! :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.

User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1141
Joined: Tue Jul 06, 2004 5:57 am
x 148
Contact:

Post by spookyboo »

I like the movement of the cursor and raising abd lowering works smooth.
It is very unstable on my computer though (but I'm sure you know that already)

Bugs:
- The cursor and WSAD keys don't work.
- If you raise the terrain and keep the mouse pressed, the editor freezes at some point.

User avatar
Lucky_Luciano
Greenskin
Posts: 136
Joined: Mon Feb 14, 2005 9:25 pm
Location: Belgium

Post by Lucky_Luciano »

spookyboo wrote: - The cursor and WSAD keys don't work.
-Do you mean that the mouse cursor doesn't move?
-By default the camera is located rather high in the sky so pressing WASD might move the camera but it's very slow so you might not notice it. try pressing CTRL and/or SPACE while using the WASD keys...
- If you raise the terrain and keep the mouse pressed, the editor freezes at some point.
Do you move your mouse around while doing this?

User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1141
Joined: Tue Jul 06, 2004 5:57 am
x 148
Contact:

Post by spookyboo »

The cursor and WSAD keys don't work.
The mouse cursor works ok. It only concerns the keyborad keys.
If you raise the terrain and keep the mouse pressed, the editor freezes at some point.
I was not moving the mouse

tonyhnz
Greenskin
Posts: 101
Joined: Fri Feb 25, 2005 3:54 am
Location: Florida

Post by tonyhnz »

Great to see this in the CVS.

I was wondering what your priorities were as far as future development goes.
Loading/saving of maps would be pretty useful for me so I can volunteer to give this a try.
I would also like to provide a new map function. This would create a (flat) map using a default texture and size. The size and texture would be configurable.
Another TODO item to add would be the ability to randomly generate entire maps or areas of maps as a basis for editing. This could be a plugin perhaps.

The only issue I have noticed so far is the GUI does not seem to be fitting properly in the render window so everything is crushed together. I can investigate this further.

User avatar
DWORD
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 1365
Joined: Tue Sep 07, 2004 12:43 pm
Location: Aalborg, Denmark
Contact:

Post by DWORD »

Nice project. :) Runs really smooth, too.

The WASD keys work fine here, but IMO they're way too slow without using ctrl or space, too. Maybe you should speed them up a little and use a smaller factor for ctrl and space.

One other thing I noticed, if you keep raising the terrain it wraps around resetting to level zero at some point, while lowering is clamped to level zero.

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

I'm on the raise bug, along with the custom brush and paint thing.

Have a Look at Wiki for an updated Todo list along with and current assignement.

Please mark your assignement if you do something, so none does twice the same thing.
(Same for plsm2 if you want to propose patches :)

User avatar
Lucky_Luciano
Greenskin
Posts: 136
Joined: Mon Feb 14, 2005 9:25 pm
Location: Belgium

Post by Lucky_Luciano »

spookyboo wrote:I was not moving the mouse
/noted. Thanks for the feedback!
tonyhnz wrote: I was wondering what your priorities were as far as future development goes.
Loading/saving of maps would be pretty useful for me so I can volunteer to give this a try.
Loading/saving of maps is something I consider important though I would first only focus on loading/saving .cfg files.

As for terrain exporting, I still have some questions there:
- If we export a terrain-page as a .mesh file we can't use Geometrical Mipmapping anymore?
- Should we export the items and objects "per page" and load them in each time "their" terrain-chunk is loaded ?
- Should we export the items and objects as a StaticObject?
I would also like to provide a new map function. This would create a (flat) map using a default texture and size. The size and texture would be configurable.
Good point I'll add it to the Wiki.
Another TODO item to add would be the ability to randomly generate entire maps or areas of maps as a basis for editing. This could be a plugin perhaps.
This is on the TODO-list (TerraBuild plugin).
The only issue I have noticed so far is the GUI does not seem to be fitting properly in the render window so everything is crushed together. I can investigate this further.
Yeah, this is one of those wierd GUI bugs I need to get out. You should run the editor in a resolution of 1024x768 for now. I used Absolute values for position and scale but the GUI still gets messed up on other resolutions. I'm looking into this.

tonyhnz
Greenskin
Posts: 101
Joined: Fri Feb 25, 2005 3:54 am
Location: Florida

Post by tonyhnz »

- If we export a terrain-page as a .mesh file we can't use Geometrical Mipmapping anymore?
- Should we export the items and objects "per page" and load them in each time "their" terrain-chunk is loaded ?
- Should we export the items and objects as a StaticObject?
Can you clarify what scenario you are talking about here - is this a case where the output from the editor is going to be used with another scene manager other then the PLSM ?

I had some further thoughts about loading /saving - what we are really doing is loading a map set which consists of the individual pages of the map. I guess the map set file corresponds to the .cfg file which tells us amongst other things what the root name of the heightmaps is.
We may have one problem adding new map sections on the fly in that they are numbererd in a specific way - if we add a map page before our current start position then we would have to renumber the subsequent maps.

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

If we export a terrain-page as a .mesh file we can't use Geometrical Mipmapping anymore?
Unless you save mesh per tile and save LOD at the same time, you won't have same level of lod. But it's possible.
Should we export the items and objects "per page" and load them in each time "their" terrain-chunk is loaded ?
per tile and yes.
Should we export the items and objects as a StaticObject?
don't think StaticObject is serializable. Anyway you'd better use existing items and objects mesh and use staticObjects at tile load time.
You'd save some disk space as many objects will just repeat (trees, grass, rocks) themself. I would basically save a .scene per tile, that is a file with a mesh list of name along with coordinates.
Just use the .scene format. (Falagard does just this in this "legend of tacendia").

User avatar
Lucky_Luciano
Greenskin
Posts: 136
Joined: Mon Feb 14, 2005 9:25 pm
Location: Belgium

Post by Lucky_Luciano »

tonyhnz wrote:Can you clarify what scenario you are talking about here - is this a case where the output from the editor is going to be used with another scene manager other then the PLSM ?
No, I'm just throwing some ideas around :)
Priority number one is making sure we can export a format that can be used very easily in other applications that use the PLSM.
The saving of a terrain isn't much of a problem but it's how to efficiently store any items and objects you might have placed on the terrain.
I would basically save a .scene per tile, that is a file with a mesh list of name along with coordinates.
I think that's our best option indeed. I never worked with it before though. Do you know if there are articles available describing the .scene format? I couldn't find anything in the API.

User avatar
Lucky_Luciano
Greenskin
Posts: 136
Joined: Mon Feb 14, 2005 9:25 pm
Location: Belgium

Post by Lucky_Luciano »

Ok, minor update!
  • It's possible now to generate a new flat map with a choosen size (any size as long as it's a power of 2. The editor will split the map up in pages and load it into the editor)
  • It's now possible to import a heightmap into the editor. No need to split it up in pages first, the map-editor will do that for you and load it into editor automatically, ready for you to edit at will. :)
  • The CEGUI bugs (errors when trying to re-open windows) have been removed.
More to come!

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
x 3
Contact:

Post by Falagard »

My code is fairly simplistic for loading and unloading .scene files, and needs to be redone anyhow - for example, like tuan kuranes mentioned in another thread, it would be a good idea to queue up meshes that are in the .scene file so it doesn't freeze the game while loading a terrain tile - instead it should load info from the .scene file, add to queue to be loaded when there's free time.

My code wasn't added to the paginglandscapescenemanager but was done through listener functions in my main application. So I registered a listener with the page manager, and then the game received a page loaded event for tile 1,1 and loaded 1.1.scene.

Clay

harmon
Halfling
Posts: 72
Joined: Thu Mar 03, 2005 9:52 pm

Post by harmon »

Sorry for the newb question, but how do I get this off cvs? I tried, but was unsuccessful. Im using linux. Thanks...

User avatar
Lucky_Luciano
Greenskin
Posts: 136
Joined: Mon Feb 14, 2005 9:25 pm
Location: Belgium

Post by Lucky_Luciano »

I'd like to get your view on this:

I'm starting to have my doubts about using CEGUI for the map-editor. While CEGUI is an amazing engine for a game, I feel it is a bit "clunky", un-professional and feature-lacking for a world-editor (especially the lack of a tree-view, file-load/file-save dialogs, "stacking" tab-windows, a menu-system, mouse pop-up windows, ... is a problem), so I'm thinking about redoing the GUI using wxWidgets.
I found some tutorials here in the forum and I don't think it's very hard to do aswell.

On the other hand, the GUI runs very smooth with CEGUI and this might be less when using wxWidgets.

As I see it: I think the project will benefit from it on the long run (especially if we want that other people will use it aswell).

So, would it be worth looking into it? Anyone has experience using wxWidgets?
harmon wrote:Sorry for the newb question, but how do I get this off cvs? I tried, but was unsuccessful. Im using linux. Thanks...
This is a good tutorial: http://www.ogre3d.org/phpBB2/viewtopic.php?t=3835

User avatar
tuan kuranes
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2653
Joined: Wed Sep 24, 2003 8:07 am
Location: Haute Garonne, France
x 4
Contact:

Post by tuan kuranes »

I really like the In-Game edition mode that any outside widget cannot do.
(adding some dependencies as well...)

Spookyboo's WorldEditor really showed that with some work on UI, we can get really good GUI, and innovative.

I'm more for an integration of his work. (texture selector, widget auto-placements, etc...)

User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

I like the internal GUI very much, but that's a personal thing, it just has a coolness factor to edit the terrain with the game interface. Might even be fun for something like SimCity in which editting terrain is part of the game.

User avatar
psyclonist
OGRE Expert User
OGRE Expert User
Posts: 286
Joined: Fri Nov 01, 2002 3:54 pm
Location: Berlin & Nuremberg, Germany
x 1
Contact:

Post by psyclonist »

Lucky_Luciano: I agree with your assessment that while CEGUI is a an amazing tool for ingame GUIs it's a bit lacking with regards to common GUI widgets and features. We're currently working on an editor using wxWidgets. I think, I've mentioned it before here on the forums. It's a pretty generic piece of work which can edit scenes (a la dotScene) and provides a pretty flexible way for editing entity properties (pluggable and mixable backends, e.g. c++ reflection mixed with xml driven properties). I found wxWidgets to be very easy to work with. Especially the dynamic event binding and widget creation works pretty much flawlessly in contrast to other GUI toolkits. If you need some help or pointers feel free to fire away. We'd be happy to help.

-psy

User avatar
Falagard
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 2060
Joined: Thu Feb 26, 2004 12:11 am
Location: Toronto, Canada
x 3
Contact:

Post by Falagard »

I prefer in-game GUI as opposed to wxWidgets. I've spent some limited time with wxWidgets - as far as I could tell, creating dialogs in wxWidgets was far more painful than using the CELayoutEditor that scriptkid has done ;-)

Treeview is definitely a useful widget that's missing.

But regarding tabs, there are always alternatives to using tabs, or ways to make it look like you're using tabs when you're really just loading separate dialogs and have buttons along the top that look like tabs. It's not hard to do that.

I personally wouldn't give up on CEGUI for a few missing controls. Please take a look at the Particle editor that was posted on these forums to see what CEGUI can do before you decide to throw it all away for wxWindows that not many others here on the Ogre forums are using.

Besides, one of the only things about the Torque engine was the fact that the world editor was built into the engine - allowing an embedded editor in any Torque game. I'm starting to see something like that emerging here.

Clay

User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1141
Joined: Tue Jul 06, 2004 5:57 am
x 148
Contact:

Post by spookyboo »

Lucky_Luciano
I feel it is a bit "clunky", un-professional and feature-lacking for a world-editor (especially the lack of a tree-view, file-load/file-save dialogs,...
I'm working on the Common File/Load dialog class as you know (a decent one now). With a bit effort you can even pull-off a tree-view and a menu-system class. CEGUI indeed lacks some features, but the things it does, it does well. In that perspective you may consider it professional. I've seen 'professional' stuff that was very unstable and hell to work with.

User avatar
CrazyEddie
Goblin
Posts: 228
Joined: Thu Feb 12, 2004 10:03 am
Location: Workin' on someting cool
x 1
Contact:

Post by CrazyEddie »

Lucky_Luciano wrote:mouse pop-up windows,
If you mean tooltips, these have been available for a couple of weeks. Perhaps you should check your facts first?

If certain people were a little more community orientated and contributed a bit more instead of just complaining about features that do not exist yet, things would have been better. This is one of the main reasons I left the project.

As a prime example, instead of bitching about things, Lindquist decided to implement the menu system for CEGUI http://www.cegui.org.uk/modules/newbb/v ... umpost3929

Some people, eh?! :roll:

User avatar
Lucky_Luciano
Greenskin
Posts: 136
Joined: Mon Feb 14, 2005 9:25 pm
Location: Belgium

Post by Lucky_Luciano »

CrazyEddie wrote:
Lucky_Luciano wrote:mouse pop-up windows,
If certain people were a little more community orientated and contributed a bit more instead of just complaining about features that do not exist yet, things would have been better. This is one of the main reasons I left the project.
I'm sorry Eddy, it wasn't my purpose to bash your GUI-engine I was just going over my options. Nothing more.
Like I said, I'm impressed with your GUI: it's easy to work with and it performs well but I just started to have my doubts to use it in a map-editor. Sorry, I brought this up.

Anyway, after reading the other comments I think I'll stick to CEGUI. A lot of work has already gone into the current GUI and it does do the trick. If I make additions to the GUI I'll make sure I'll contribute them to the community, Eddy. Just like I released the source for this map-editor.

Ok, my next addition to the editor: object placement, trees placement and converting them to StaticObjects and starting to look in ways to export the objects as a .scene file.
Last edited by Lucky_Luciano on Fri Apr 08, 2005 11:23 am, edited 1 time in total.

User avatar
spookyboo
Silver Sponsor
Silver Sponsor
Posts: 1141
Joined: Tue Jul 06, 2004 5:57 am
x 148
Contact:

Post by spookyboo »

@CE

I did not complain about the lack of features and you are right, if somebody misses something he should implement it. I'm sure Lucky_Luciano doesn't have the intention to be rude.

User avatar
:wumpus:
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3067
Joined: Tue Feb 10, 2004 12:53 pm
Location: The Netherlands
x 1

Post by :wumpus: »

I'm sure implementing a few more widgets for CE is a lot easier than trying to integrate wx and ogre in every platform (mac, linux, windows). Noone succeeded in that yet, afaik. Another reason why I prefer the in-window GUI.

Locked