Tuesday, November 16, 2010

Curved Roads

At this point I can say with 99% confidence that X-Plane 10 will feature bezier curved roads. In X-Plane 9, a road is a line segment; you can simulate curved roads by using a lot of line segments, but the global scenery roads are pretty chunky.

X-Plane 10 allows for a road to be a bezier curve, allowing the specification of smooth curves with a small amount of data. This sets us up to trade off visual quality and performance using a rendering setting.

A few notes for authors:
  • Like all of the new v10 road features (and pretty much all of the new v10 scenery features), you don't have to use bezier curves in your roads. They are there as an option if you want them.
  • X-Plane 10 will not make curves for you; road data that is defined as line segments in the DSF will be rendered as line segments. (This follows the principle that DSFs contain pre-processed scenery data, and the sim shows DSFs exactly as they are written.)
Pay No Attention to the Documentation

The DSF specification alludes to bezier curved roads; this "old way" of encoding curves was never supported in the sim - all versions of X-Plane ignore this data. The "old way" was how we thought we might do curves some day.

The version 10 curve encoding is different; the "old way" will continue to be ignored in version 10. So: do not use the DSF spec to try to make curved roads now. I will post detailed documentation on curved roads once version 10 is available to authors.


Anonymous said...

Sounds pretty interesting Ben!

Not being a developer, I have a question please.

Will XP-10 have higher resolution mesh for the default scenery?
Really looking forward to this next version, like everyone else. :)

Anonymous said...

If those roads have "surface concrete" too - we can drive on them!

Anonymous said...

Is it more expensive? Will it use more computational resources (RAM, CPU, etc) to process a bezier road if compared to lines only?

Benjamin Supnik said...

For a given visual quality, they are equally expensive (that is, how good they look in the end is a function of triangle count).

To store them is usually less expensive (since we can replace many lines with one bezier).

Most importantly, the quality can be flexible, so if you are worried about expense, you can turn the rendering settings down.

So overall I'd say they're more efficient and more scalable.

Anonymous said...

Will this new feature work with present road-maker software? I mean, will we be able to continue working like we do now, or will this implementation need new programs?

Alejandro G.

Benjamin Supnik said...

Anything that makes roads compatible with v9 will continue to make _non-curved_ roads, which the sim will handle just fine.

You'll have to do something different to get curves; curves are "opt-in".

Anonymous said...

A little off-topic, but there is one thing that I would like to know: how do you manage to work, post (multiple) blog entries, answer e-mails and comments, and everything else with only 24 hours per day? :-)

Anonymous said...

How this will fit with OSM ? Any idea ?

Anonymous said...

sorry to ask this here, but is the xplane binary optimized for some kind of processors?
would different binaries, optimized for different processor benefit xplane?
for example, a version for processors with sse2
it should be faster than a binary for a generic arch, right?
it's just an option that you pass to the compiler, that won't give you more work
cant xplane have this?

Anonymous said...

"99% confidence that X-Plane 10 will feature bezier curved roads" ... lets hope the 1% isn't a show stopping bug that will turn your computer monitor into a death-ray >_>

Keith Smith said...

Fantastic work as always, love the pic, too, very informative, and the cliff shader sounds like a great way to go.

Is there going to be a new render of the global scenery (DSFs) for V10 that will include curved roads? I assume so, otherwise people aren't going to benefit from this feature without using new custom scenery, but I wanted to check for sure.

Benjamin Supnik said...

New DSF render will use OSM and output curves into the DSFs. The open source scenery tools code actually has the algorithm we use to bezier-ize points.

Anonymous said...

I second that! High resolution Mesh is so important, it comes in my list much highter then hign resolution textures. You just can´t have a nice 7cm resolution texture is your mesh isn´t at least 72m, and of course, lots of place has even more detailed ones, like 19m for the entire USA, I´m pretty sure Europe has one of those too.

Anonymous said...

to show xp10 screenshots or not to show xp10 screenshots that is the question