Wednesday, April 01, 2009

Scenery Tools Progress? Yes.

I've been hacking at the scenery tools over the last few days...and I think we're making some progress.  I mention this because it can be hard to see the work getting done - there is nothing for months, then a new version of a tool.  (Well, now you can watch the code change as it happens.  If you don't think this like watching paint dry, you might be a geek!)  I also mention it because two of the biggest improvements aren't my own - they're insanely helpful user contributions.

The AC3D Plugin

Version 3.2 is now in beta.  Version 3.2 catches the plugin up with all of the latest OBJ tricks, including dataref-controlled LIT levels, manipulators, hard surfaces, etc.  This might be more useful for airplane modelers than scenery modelers, but I think the variable _LIT channels can be used for some interesting scenery effects too.


WED 1.1 will go beta once X-Plane 930 is out of beta, and will feature (very primitive) overlay editing.  It's not a thing of beauty (yet) - the overlay editing features are leaner than the airport editing tools were.  But 1.1 will allow you to edit an overlay and airport in one workspace.

I can tell you now that the area where WED 1.1 is weak is preview.  But I don't want to hold off the ability to edit overlays in WED "at all" just because it's not as nice as it could be (and someday will be).

It should be possible to work on an overlay project in both WED and OverlayEditor - for example, you could build a taxiway layout in WED, using the overlay capabilities for custom pavement and lines, but use OverlayEditor to place 3-d objects (with a 3-d view).


To be blunt, MeshTool in its current form is really hard to use.  Part of that is expected - MeshTool is a "back-end" tool like DSF2Text, aimed to simplify the problem of creating base a base mesh for some other program.  But even as a back-end, MeshTool is difficult to use because it has bugs in its polygon processing, which often result in cryptic and hard-to-diagnose crashes when used with even relatively simple input data.

The good news is that I have my base mesh generation code running with a new polygon processing library (CGAL) - the switchover from my old buggy code to CGAL was done by Andrew and contributed back as a patch.  I've been throwing all sorts of weird data at the polygon cutting algorithms and they are rock solid.

The mesh generation code is part of MeshTool, so the next build of MeshTool will feature these processing improvements.  That's where Janos' extensive work on the build environment comes in - he's basically turned the scenery code from a big pile of my mad ramblings into a sane multi-platform project.  This will mean a much simpler, faster process for releasing tools, particularly on Windows and Linux.

(Previously once I got a tool working, I would have to waste a few days trying to get the code to work on Windows too, slowing the whole process down.)

I expect to recut the "scenery tool" pack (that is, MeshTool, DSF2Text, and all of those other smaller apps) some time during WED beta, after 930 goes final.  If all goes well, there should be native versions of the command-line tools for Linux.

MeshTool Needs a UI

Fixing MeshTool's polygon processing is necessary, but not at all sufficient to make it a useful tool; to be really useful, it needs a real user interface.  I think there are two strong possibilities for this:
  1. WED could develop base mesh editing.  Under this scheme, you would be able to draw land use polygons in WED and create a "DEM" object for the elevation.
  2. MeshTool could be an output option for QGIS (via some kind of plugin or script).
I don't know which it will be yet.  The advantage of WED is that an author could have all scenery elements in one place.   The advantage of QGIS is that it contains advanced GIS features that I will probably never put in WED.  It may be that QGIS's UI is simply not intuitive to less advanced users - I don't have good perspective on this.


Anonymous said...

WED 1.1 announced on April 1st?

Benjamin Supnik said...

omg. I am an idiot. I should have saved the post for a day. My wife convinced me yesterday that the local farm eggs she picked up were blue because the chickens were a local variety. Sigh...I never learn.

(And - how the @#$#@ am I going to hit that July date for the first MS-owned release of X-Plane? :-)

Anyway, WED 1.1 is real - to verify, grab the code out of the public repo and try it!! no April fools in anything posted.

alpilotx said...

Hey, cool. You never mentioned to me, that you have plans with QGIS ... I am notsure if it will really work, but it would really be a great idea - especially as QGIS is nicely extendable via their plugin system. And I think, if someone can't work with QGIS - when it comes to a lot of geodata - he/she will have a hard time with other tools too (even though QGIS is maybe not the most intuitive tool on the planet - but still better than many other "UI experiments").


Benjamin Supnik said...

alpilotx - I have no specific plans for QGIS ... it's not on the tools road map. But I now use it all the time internally as a data checker; it seems like there's a possible dev win.

- I don't know how to write plugins for it, but I know how to make MeshTool accept just about any kind of GIS input.

- Someone else may not know how to code MeshTool, but might know how to do something trivial (like script the saving of layers as shape files and pass them to a tool).

I think there will be a "more userfriendly" way to make meshes...I think it will be much more practical to use GIS tools to make large amounts of global scenery than a UI tool like WED, but we will have users with more time and less GIS expertise who want to make meshes too.

Dan said...

How soon do you believe we'll see some mesh editing capabilities built into WED or via alternative programs? Within a few months, a year or never...?

I'm asking this because I'm eagerly awaiting better tools that give me the control I'm demanding in regards to mesh editing. Right now I'm holding off releasing any new sceneries due to the lack of control over the mesh surrounding my airports; I just won't release a product that doesn't measure up to my own and others expectations. I've got a lot of cool stuff I wan't to do, but my motivation is rapidly declining the longer it takes. I'm just hopefull that the tools needed will someday be available to the public and easy to use...

I like you're idea of drawing polygons that define an elevation, it should be easy enough for most scenery designers to figure without having to learn hard to use GIS tools...

I'm looking forward to WED 1.1 though. It's a joy to work with, very well done!

Benjamin Supnik said...

Hi Dan,

Mesh _editing_ in WED - probably never...WED's not the right tool to edit an existing huge pile of 3-d triangles.

Mesh _editing_ in Blender of ac3d might make more sense. DSF editing in ac3d is not a high priority for me at all, but...the source code is available including an experiment at this I coded a while ago...I got import working, and export would be much easier to write now due to improvements in DSFlib.

Mesh _creation_ is where I'm looking at more heavily...that is, if your mesh is broken, you go back to real data sources and rebuild the mesh from originals.

(Think of it like this...if you have a lemon cake and you want it to be chocolate, you don't just put it in a blender with chocolate and try to reshape it once it's been get new eggs, new flour, new sugar and make a new cake. The baking process is sort of "one-way" -- so is making a DSF!)

So you'll be able to create a new mesh a little bit more easily in MeshTool in weeks. For WED...I'd say _months_ if people start using "in-development" versions of WED (now possible since the source is readily available) and less than a year for a final binary build from me.

For example, you could go get the SRTM tile and use photoshop to "clean" the area under the airport, and/or fix the airport boundary (in WED), then recut with MeshTool. You could use the OSM coastline file or Tiger data for water.

Anonymous said...

AC3D plugin? Is this the plugin to export as obj for Overlay Editor?

Anonymous said...

Great news on WED 1.1 beta. I hope XP9.30 will be final soon, just to beta test WED 1.1 (sorry, I'm no compiling expert to use the source code right now).

Will you release - with the beta version - a "What's new" documentation with a few screenshots for making beta-testing a bit easier?

Thanks for your effort here!