Wednesday, June 25, 2008

Clean Airport Layouts

I have blogged about correct airport layouts before, but let me bring the point up again, because it is so important:
  • You must create structurally correct layouts (that is, vertices connecting to vertices, not lines) in order to get good rendering in X-Plane.  Just because the preview looks okay in WED doesn't mean your layout is correctly formed!
I wrote some documentation on the scenery site that describes the problems in more detail, with pictures.  

(I've been trying to create more permanent documentation - it is tempting to simply blog the issues because it's so easy to throw a blog post up, but after 110 blog posts in 2007, the scenery site is still very thin on the documentation front.)

Do Not Add Vertices To Make Smoother Curves

I really can't stress this enough: please do not go adding extra vertices in your layout to make bezier curves look smoother in X-Plane.  Why is this such a bad idea?  Let me count the ways!
  1. X-Plane will fight you all the way!  X-Plane adds vertices to curves (to make them smoother) when it detects large errors.  If you have a lot of small curves, the errors are inherently smaller and X-Plane will add fewer points.  So the first vertices you add to your curve do almost nothing.  You have to add a huge number of vertices to get a marginal improvement in your curve.  In the meantime...
  2. X-Plane will provide variable-quality curve rendering in the future!  Curve detail should be a user-controlled setting.  X-Plane has to run on a wide range of hardware; any time we can let the user pick rendering quality, this is a win, because it helps bridge the gap between the user who just bought a brand new Core 2 Extreme system with GeForce 9800 and the user trying to keep X-Plane 9 running on his G4 laptop which can't be upgraded.  When you add vertices, you take the decision about rendering quality out of the hands of the user, and force high quality on a user who may not be able to handle it. Adding vertices forces a decision of lower framerate on some users.
  3. Adding vertices bloats the size of apt.dat.  This is not a huge factor for custom scenery, but is a factor for the default apt.dat.  Robin received a big pile of new airport layouts, and that's great.  But one risk is that the total size of user submitted data could get out of control.  For new layouts made with WED, vertices represent a big chunk of the data.  If you are increasing your vertices by a factor of 5x or 6x to improve tessolation, you are bloating the apt.dat file.
  4. Manually adding vertices to smooth curves lowers the level of abstraction in the apt.dat file.  Any time we can have a high level abstract representation of scenery, X-Plane has the freedom to improve rendering in the future.  If your layout is made up of a large number of small curves (instead of a small number of large curves), X-Plane cannot tell that those small pieces make up some larger structure; in the future it may not be able to render those layouts as nicely as ones that are made with fewer control points.
In summary, please use the smallest number of vertices to create your layouts.  (But always add vertices to ensure that your T junctions are correct!)



7 comments:

Dan said...

Guidelines are very much welcomed, because more and more new airports are being submitted based on either inaccurate data or lack there off, and or poor design by contributors who do their best but don't have sufficient knowledge or guidelines available to them.

The one thing I've noticed has to to with runway shoulders; some people are laying an taxiway underneath the runway, probably because they cannot controll the width of the shoulder, with the implication that the rendering engine changes the runway lighting type from normal lights to embedded lights into the pavement. This is all wrong, and should not be considered good practice unless the surface is meant to be taxied on. The other implication is that normal runway shoulders looks better than the hard edges of the taxiway surface provide. This also affects approach lighting if taxiways are used instead of blaspads or displaced treshold.

Anonymous said...

Ben

I know that new "features" are not due for some time in WED but could I please ask for an interface (change) item to be added to the list?

At some point (soon?) could WED's window scroll arrows be placed in one corner (à la Mac windows), rather than at opposite ends. I find it very cumbersome to scroll across airports as they are - so much so that I find it easier to zoom out and in repeatedly to "jog" across from one side to another.

Apart from that WED is a lot of fun, many thanks for your work.

Cheers
XG

Anonymous said...

I have read another article also on this vertex snap subject. As an old time Autocad user I couldn't be more aware of the problem.

However some WED's tools are amateur for the task. Adding vertexes to poligons was the toughest part for me - if I need a new vertex that's far from the middle of a straight line I'll have to create it by dividing the line in half and dragging it to the position I need it. Since there's no precision tools for this moment you'll end up with two lines instead of a single line with 3 vertexes. If you need a new vertex at 3/4 of an arbitrary bezier curve you have a problem too.

Please give us some better tools so we can do our part right... better vertex creation, welding, polygon offset..

Still I want to say that I was completely overwhelmed by WED. An unbelievably solid piece of software.. has performed better than many "serious" programs I know.

Benjamin Supnik said...

Hi Fabio,

Yes - if you're used toa real CAD program, WED's missing some important stuff - a real "split vertex" option is probably the biggest missing feature, but the list of usability items is long.

Unfortunately I don't know how soon I can get that kind of stuff in...WED is just one of a whole pile of todo items, including both the scenery tool set (the ac3d plugin needs an update for 920 OBJ extensions, MeshTool needs an overhaul of its vertex processing code) and the sim itself.

Anonymous said...

Gosh, this is endless! :)

Sometime ago I mentioned the idea of a "Editor Suite" for X-Plane at the X-Plane Features Yahoo group. Check it out, you may find it cool.. basically the idea would be to make scenery editing the closer to a no brainer experience as possible. As no brainer I mean something like using WED, for example.

I just had fun modeling my city's airport with WED. Result is great and it wasn't difficult at all. Then I decided to take a look at how could I edit the city itself, placing roads and parks correctly for example. Of course I quickly found out this is way way more technical than I'm willing to tackle.

I know that creating that Editor Suite I mentioned would be a huge project. But it also would be something truly new in the simulation market.

Some people like to create/improve scenery as much as they like flying... for X-Plane, MSFS, whatever. In a sense they are doing the company's job for fun and for free! Having a tool that makes scenery editing available to a public 10 times bigger would be priceless.

Don't need to approve this coment... just dropping some ideas

Cheers!

Fabio
fabiopb@hotmail.com

Unknown said...

Hi Ben,

3 weeks ago I finally made the transition to V9 and of course I'm very impressed with the graphics...
I was also curious how the curves at LOWI got so smooth so I opened it in WED... 16 vertices for a 90 degree curve!
I assume this was done to give people who try the demo the best-looking layout possible (mission accomplished), but if I were a new user who wanted to make my first airport layout, I would probably look at LOWI as an example and try to do everything the same way and end up with a much larger apt.dat file;

Otherwise I've been enjoying your blog for over two years now, you're one of the few people I 'know' who have the ability to explain technical stuff to people like me, who are completely clueless in the technical department, I think that is a real gift!

And of course the release of WED changed everything, having to change zeros into ones in a text file is way too abstract for me: it took me a whole afternoon just to find out how to add a runway shoulder by text editing, apparently I need to see what I'm doing and WED gives me that... it also made me confident enough to give Blender a try (though Blender's learning curve is juuust a little steeper) and I was surprised to find out that I like building stuff as much as flying... I think I need 48 hour days now ;)

Thanks for all your work and all the best.

regards,
Oscar

Benjamin Supnik said...

Oscar - yes, that is totally true, the LOWI layout violates our own guidelines by having too many nodes. :-( (Unless, of course, the actual real-world shape is subtly different from a bezier curve.) I need to provide a user setting to increase curve smoothness in the sim! I am also investigating a bug report that curves are less smooth than in 864.