X-Plane 9 allows you to put roads in an overlay DSF, but this isn’t actually that useful yet. The problem is that roads are specified using MSL elevations – that is, they are positioned in absolute space. So you have to know where the ground is to build a road, which defeats the whole idea of an overlay.
This dates back to X-Plane 8.0 – originally all scenery load was done when a DSF was loaded, with the sim paused. In that condition, keeping scenery load fast was a high priority. So I set roads up to be “pre-draped” (that is, their heights are pre-determined when building the DSF). Back in the day it was a win.
Now we have multiple cores and DSF loads in the background, so we very easily could “drape” a DSF…but it gets weirder. A road’s sub-type is specified in the DSF – and sub-types are used to define bridges.
Now that’s not incompatible with a “draped” scheme – imagine a road whose height is specified AGL, so a height of 0 means “run the road along the base mesh” and a height of 10 means “10 meters above the base mesh.” Now you would set the road type to overpass as the height went from 0 up to 10 meters, then back to 0, forming a bridge.
The only problem is what happens if the ground is really weird looking. In practice what we want to do is keep the road’s slope as constant as possible and build out bridges based on that. The effect can be hard to see, but if you look at bridges in the US scenery, you’ll see that sometimes the banks to a river slope down but the road stays horizontal, forms a bridge, and then stays flat as the banks come up again. This happens because our road processing code (in the DSF builder) tries to limit road slope.
That’s not an easy effect to create in an overlay…you’d basically have to increase the road AGL at the rate the base mesh’s AGL is decreasing (if only you could know that).
So the questions I am debating now are:
- Are AGL-draped roads useful if we don’t know what the base mesh will be like?
- Does it make sense to have some other abstraction to help smooth roads when the base mesh is bumpy (and can we make something that is both simple and useful)?
Like most philosophical things I debate, this isn’t scheduled to go into the sim that soon. Improved shaders, a more complete airplane SDK, and a better texture pager are all ahead of road improvements, which pushes roads out quite a bit I think.
The livery system lets you replace the image files used by an aircraft’s exterior paint, and it lets you replace the image files used by the objects that are attached to the plane via the “objects” folder.
But the livery system does not let you replace the objects themselves.
(It also doesn’t let you replace or modify the actual ACF file or generally change the functional behavior of the plane. The livery system is just for paint, not airplane mods.)
Let me answer two questions right now:
- If you bought version 9 beta DVDs, you will not have to buy new ones when version 9 goes final.
- If you bought version 9 beta DVDs, you do not need to manually move around any of the global scenery files that our installers put on your hard drive.
Now about this global scenery folder…
X-Plane stores its scenery in packages – a scenery package is a folder that contains all of the files needed for a given scenery element, whether custom or default. In X-Plane 7, scenery packages were only used for custom scenery, and always lived in the Custom Scenery folder directly next to the X-Plane application. This provided an easy way for users to drag third party packages into a single location to install them. (Before the custom scenery folder, installing scenery could involve a lot of “put this file here, and that file there”.)
X-Plane 8 added a second location, the Default Scenery folder, which is hidden away inside the resources folder; it acts as a repository for scenery packs we ship with the sim, such as the one that contains various airport elements, and the default road packs.
In X-Plane 7 the global scenery lived directly in the resources folder in its own home; in X-Plane 8 the global scenery lives in packages inside the default scenery folder…this allows us to use one piece of code (the package loader) to load all scenery, custom and global.
The only real differences between the default scenery and custom scenery folders was priority and intended use; custom scenery is loaded with higher priority than default scenery (so you see your custom add-ons replace our default work), and the intention is that the default scenery is for Laminar to update via the web-updater and custom scenery is for you to put things into that you download off the web, etc.
With X-Plane 9 we are introducing a third location for scenery packages: the “Global Scenery” folder. It will live next to the Custom Scenery folder and X-plane application and be the location for global scenery. Its priority is intermediate – higher than default but lower than custom.
Now here’s the funky thing: the X-Plane 9 beta DVDs place the global scenery into the custom scenery folder. If you’ve ever looked at the ranking of scenery packages, you’ll see that they come out lower priority than all custom scenery, regardless of the alphabetical sorting that is usually used. The sim recognizes the peculiar placement of the global scenery and effectively labels it “global”.
Future DVD pressings will simply place the global scenery in the new global scenery folder. Thus we get to the original two answers:
- You won’t have to buy new DVDs if you have the betas; the sim will continue to work with either the beta or the newer layout for global scenery for the entire v9 run.
- Because both layouts work you don’t need to move anything around. I suggest you not move any files to lower the risk of breaking things.
I have posted the first “combined” scenery tools release. Basically ObjView, ObjConverter, and DSF2Text (now named DSFTool) are packaged together with DDSTool (for making DDS images from PNGs) and the new MeshTool (for making base meshes); a UI application called XGrinder provides drag & drop support for most of the converters.
The tools releases will be by month (e.g. March 2008) and each release will contain the latest for all of the tools in the release. WED and the AC3D plugin will continue to be separate downloads.
I have also posted another snapshot of the source code, and generally I’ll try to do a source code post whenever I do a tools post to keep the two in sync.
The AC3D plugin has been updated; I hope to have a new WED posted in the next few days.
X-Plane 9.00 is going to be going final pretty soon – we’re on RCs right now. But this is hardly the end of the road; rather it’s the first step for a number of new development areas. What comes next?
Tools: I am working on tools releases now; a few users already have alpha copies of MeshTool. My hope is to have some new tools posted tomorrow, with more by the end of the week
More rendering engine/shader work: X-Plane 9 only begins some of the shader work we want to do; more engine enhancements will be coming in 910. Like 9.00, more advanced rendering will consume more hardware, and will be scalable via rendering settings.
Systems and Airplane SDK: X-Plane 9 introduced a lot of new features for airplane modeling, but there’s still more to do. I hope to have the panel region system and advanced lighting options all fleshed out for 9.10. Austin is doing a lot of work on systems modeling. We’ll be making more new airplane-related datarefs to tie it all together.
Orthophoto Scenery: I don’t know if this is going to happen or not, but we get more and more requests for large-orthophoto-scenery support in X-Plane; MeshTool is only going to increase that desire by making it possible to cover large areas with orthophotos without sacrificing framerate. So I would like to do some work on the texture pager, but I do not know if I’ll be able to do that in time for 9.1.
My hope is to get 9.1 into beta early so that we can start getting third party aircraft authors involved with trying new features. If you are working on an advanced airplane, keep in touch!
If you have a third party add-on and you haven’t tested it against X-Plane 9, well…honestly it’s probably a little bit too late to fix compatibility bugs now. We’re in RC, and only changes to fix critical bugs are going into the sim; everything else will have to wait for 9.1.
So if you have an add-on and you haven’t tested it against 9.0, for crying out loud, do it now! Submit the bug anyway – if we can’t fix it for 9, we can fix it for 9.1. But…after almost 14 weeks in beta, we’ve got to close this build up.
BTW a minor side note on fuel pumps…
In X-Plane 864, an airplane will run even if the electric fuel pump is off. (However, if the fuel pump failure is triggered and the electric fuel pump is off, either by switch or electrical-system failure, then you’re out of fuel.)
X-Plane 900RC1 restores this behavior; in beta 25, an electrical failure would turn off all sources of fuel. This is wrong for a plane like the C172 where gravity can feed the engine.
In the long term X-Plane does need a more complex abstraction (e.g. does this plane have gravity feed or engine drawn fuel, or engine driven pumps, etc. etc.) but for now the 864 model, while inaccurate and incomplete, causes less problems than beta 25, which was simply wrong for a number of planes.
I’ve blogged about this before, but…let me be totally clear:
Don’t use ATTR_cockpit in objects that are not one of the two cockpit objects for your airplane.
Don’t use ATTR_cockpit in the attached misc. objects for your plane – move the parts of the mesh that require ATTR_cockpit into the cockpit object.
Don’t use ATTR_cockpit in scenery objects.
The
OBJ spec basically says as much when it says “don’t use cockpit features” outside of cockpits.
Now what goes wrong if you violate this varies with the betas vs. X-Plane 8, but I can tell you this: no version of X-Plane has ever shipped that will correctly handle ATTR_cockpit in attached objects for all cases. There’s always been bugs in this not-such-a-good-idea code path; it’s just the severity has varied over time.
I get asked a lot about the limits of meshes and orthophotos in X-Plane. I’ll try to answer this, but the answer isn’t as simple as most people expect.
Texture Limits and Orthophotos
The maximum single texture size in X-Plane 8 is 1024×1024, and in X-Plane 9 it is 2048×2048.
I believe the maximum number of unique custom orthophotos that can be attached to a single DSF is at least 32768.
In practice, that number is pretty useless because X-Plane loads all textures for a DSF at the highest user-allowed res when the DSF is loaded. That means you tend to load a lot of textures. Every system is different and drivers have a lot to do with RAM efficiency, but generally you’ll run out of virtual address space and crash the sim before you can attach 32768x2048x2048 of pixels.
X-Plane has no limits on how the texturing is applied – that is, you can use your 2028×2048 texture to cover an entire tile or a single meter. So again, the limiting factor on the resolution of your orthophotos is how much total area you want to cover and how much RAM you can spend (remember RAM is also used for mesh complexity, 3-d models, etc.).
You do not need to have enough VRAM to hold all loaded orthophotos; the video driver will paeg the textures into VRAM. Virtual address space is the limiting factor. How far you push it depends on a lot of subjective things:
- If you expect your users to also run with a lot of trees, 3-d objects, cars on roads, and some plugins, you can’t use a lot of RAM.
- If you expect your users to have /3GB in their boot.ini and use nothing but your add-on, you can use a lot more RAM.
Generally the size of the DDS texture on disk is a good proxy for the virtual memory that is required to hold your textures.
It should be noted that these limits on texturing (due to X-Plane blindly loading a lot of stuff at once) affect all scenery types: objects, draped polygons, very complex airplanes, plugins, and not just terrain mesh orthophotos.
Getting Past the Texture Limit
It will take a future extension to the rendering engine to get past the current limits. Basically X-Plane will have to load textures at lower resolutions when they’re farther away. I don’t know when that is coming, but when it happens, it will increase the total amount of image data a DSF mesh can contain, because the limiting factor will be how much data is in the small area the user is looking at (since the rest can be stored at much lower res for far-away views). At that point the limiting bottleneck will be resolution (smaller means more data at once), not total image data.
Mesh Limits
Unfortunately, limits to the mesh are even more vague than limits to texture usage. X-Plane uses an adaptive mesh – basically you can put your vertices wherever you want. So the highest resolution you can achieve might be much smaller than 1 meter resolution, but you can only do this for a small area before the total mesh size gets too big. But this is okay – the intention of DSF is to let you put a lot of detail where you need it.
I believe that once again memory provides the first limitation to the mesh. That is – you’ll run out of memory loading your insanely huge mesh long before you hit a limit to the DSF container structure. And once again, even the RAM limit isn’t a hard limit because that virtual address space is shared with texures. Your mesh density limits actually go down when your textures go up because it’s a zero-sum game.
Estimating Memory
Here are some ideas on how to estimate your memory footprint:
- Run X-Plane over ocean to get an idea of the baseline memory use that the sim needs without extra scenery.
- Load your mesh without textures (move the textures away) to find the cost of the mesh itself. (I am going on the assumption here that you can rescale your mesh using whatever mesh generation tool you’re using).
- The size of DDS textures is a good proxy for the memory used.
Last night I created the “seed” files for MeshTool. Let me explain what these files are and why we’ll need them.
MeshTool is a wrapper around our irregular-mesh generation code. It will allow third parties to create base mesh scenery without having to create triangulations. Just like DSFTool saves people the work of having to encode DSFs (with point pools, command lists, and all that ugly stuff), MeshTool saves people the work of having to create their own triangulations.
MeshTool is a low level tool – you provide a text input file and some data. It’s designed to be an engine underneath tools like PhotoSceneryX, not an end in itself.
MeshTool will create “default” land-use terrain that approximately matches the global scenery, water, and custom orthophoto-based terrain. You (or a program you use) provide a text file that describes the boundaries between custom photos, land, water, and airports. You must also provide a SRTM-style HGT file for elevation.
How does X-Plane know what land-use should go on what terrain? That’s where the seed files come in. Our global scenery is generated from a set of rules that take into account morphology (land height and slope), approximate climate, and general land use. You provide the terrain shape via the HGT file, and we provide you with a seed file that contains climate and land use for that DSF tile.
Why do we provide the seed file rather than letting you find and create climate data? Well, our rules are tuned for a very specific pair of data sets; by providing the exact climate and land use data that we use, we assure that the rules files work correctly. The purpose of MeshTool is not to customize land use terrain, and we do not provide a mechanism for it. The purpsoe of MeshTool is to let you put orthophotos and new coastlines into the base mesh.
The good news is: seed files are tiny. They are typically 4 kb-8kb each; the entire data set is 322 MB total. That’s because the climate data is only 3×3 per DSF and the land use is only 121×121.
I hope to get MeshTool into some kind of testing within the next few weeks; if you are a programmer and would like to feed MeshTool from your own program, please contact me and perhaps I can arrange an alpha copy. I will also post the seeds as soon as I can.
Every now and then I see a comment in an X-Plane forum somewhere to the extent of:
“Joe Author made this great scenery pack for FS2K4, I tried to contact him about a port. I got no response, and the pack is free anyway, so I’ve posted my conversion.”
Simply put, you can’t do that, at least not in the United States. Copyright law is very clear on this subject: if you don’t hear back from the author, the default is that you do not have permission to create a derived work.
(The fact that the original package was “free”, meaning cost zero dollars, is not at all relevant. The author retains his rights to his own work even if he doesn’t charge money.)
A simple thought experiment reveals why it has to be this way: if I was giving away my new program as a promotional period and went on vacation, and you decided to post a derived work because (1) it was free and (2) you hadn’t heard from me, I would have no way to stop an illegal use of my work that I did not ever want (nor ever indicated that I wanted). “Free” plus “no one is home” is simply not a high enough bar to protect authors.