Sunday, 30 June 2013

Jersey Discontinued

I have decided not to continue with my work on Jersey, despite making some significant progress.

The main reason for this is that Earth Simulations are taking forward their project for the island.  I have never wanted to compete with payware developers, as I believe that they are the only way forward for FSX scenery really both in terms of quality and volume.  In no way do I want to compromise their work, so I will stop Jersey and look to do something elsewhere :)

Can I thank everyone who has helped me learn enough to get this far, both directly and indirectly :)

Saturday, 30 March 2013

Terrain modifications and water effects

So I managed to add many different water features across Jersey Island without any problems, including being able to correct any slight geo-referencing problems.  Water is flat though, so each of the water polygons needs to have the same elevation data for each of its vertices.

That obviously created a problem, in that the mesh I am using (being fairly low resolution) varied quite considerably from reality in terms of relevant spot heights for water features.  The practical effect introduced by FSX when it tried to render these water flattens was some wierd terrain issues.  Sometimes I got bumps, ridges, humps and depressions.

I embarked on a look a little deeper into terrain and how it is rendered within FSX, to be able to more easily fix these.  This post is a condensed summary of many things I've learned.

What I intended was to use a series of sloped flatten polygons to modify the wierd terrain around my water features so that they seamlessly blended into the background terrain.  I already knew that it was possible to do sloped flattens from within SBuilderX, as I've used them before when I played around with improved a motorway junction, but I hadn't used them to significantly alter general terrain.

Here are some key points and the lessons I've learned...

1. FSX generates terrain based on your slider settings and the detail contained within the terrain bgl.  So obviously, there can be wildly different settings across every possible users machines.  This makes it very difficult to create terrain modifications that will display without significant differences on other user's PCs.
  • Know how detailed the background terrain bgl you are intending to modify is, in terms of what LODs (level of detail) it contains information for.
  • Understand the relationship between LOD, QMID etc
    • There's a very good description in the thread at FSDeveloper here. (Post31)
2. Knowing the LOD you're working with allows you to determine what QMID grid size you will want to work with in SBX, and also let's you make a better decision as to what slider settings you want to use to create terrain mods.

3. Creating polygonal and triangular flattens in SBX is remarkably easy.  You just set the altitudes for the vertices and the type of polygon in the properties.

4. Knowing what altitudes to specify though is a little tougher!  You need to use some strategy to determine where the vertices of your polygons will go.  Usually selecting field boundaries or obvious points of reference seems to work well and once you've started somewhere the flow of triangles and polygons continues fairly logically and obviously.

5. You already know the altitudes for around half the vertices because they are the same height as the water feature.  So we need to know what the outlying vertice altitudes should be at the selected reference points which form the outside of the sloped polygons where they meet the existing terrain.

The last point foxed me for a while.  I tried to guestimate the correct altitudes then compile the bgl, copy it to the right location, re-start the flight and rebuild the scenery config to view the results.  It took ages and ages to get right and I rapidly lost any drive to do more.

That is, until I found a solution!  SBX can connect to FSX, which I knew already...

There is a useful utility called TCalcX which also connects to FSX via Simconnect and can read out the terrain altitude at any given point.  It is available here.

All you need do is pause FSX, put it in slew mode, then connect TCalcX (just click connect!) and lastly right-click on the vertice you are interested in using SBX and select 'fly aircraft here'.

TCalcX will then tell you what the current terrain height is at that point and you can copy and paste that to the vertice altitude in SBX to get a seamless fit.

For better results you can closely align the vertices in SBX to the selected QMID grid displayed there, which apparently reduces further any rendering defects through FSX.

With this in mind, it's now relatively easy to create sloped flatten polygons in SBX to modify the underlying terrain in pretty much any way you want.

An example is below.  I modified the terrain around this dam just north of the airfield so that it is displayed much more accurately.

Sunday, 13 January 2013

QGIS and correcting water effects

I have been spending a little time trying to get a couple of inland lakes looking like real water, rather than the flat photoscenery texture.

I have first created polygons in Google Earth around a couple of water features.  Using FSX_KML I have imported those from ESRI shapefiles into one of my SBuilderX watermasks.  So far, so good, and pretty easy.  The GE kml file is also used to generate the photoscenery and water transparency through FSEarthTiles.

However, the water transparency effects are slightly out of alignment with the watermasking produced in SBX, I think because the geo-referencing of GE and SBX is ever so slightly different.

How could I resolve this problem?  Clearly the water mask and the transparency mask polygons need to be placed in exactly the same locations with respect to each other in order for the water and transparency effects to perfectly match in FSX.   Could I amend the SBX polygons and then get the corrected polys back into GE?  If so, the photoscenery and watermasks should align correctly.

The only problem is, SBX doesn't export to kml files, but...I have found yet another very useful and free tool which does.  QuantumGIS is a fairly well featured and free GIS program.  Amongst many other things, it can import an ESRI shapefile into a vector layer and then export it as kml.

The corrected lakes now look like this in SBX.  First we do a simple export to an ESRI shapefile.

We load this shapefile into QGIS and it prompts you to input the correct coordinate reference system, which for FSX is of course WGS84.  Then we get this...

Imported into Google Earth, we then see this :)

Note that the poly outlined with a white line is my original drawn in Google Earth.  The poly outlined in red is the corrected version imported back from SBX.  With the corrected poly now part of my original kml file, I can use FSET to compile the photoscenery again and the transparency and water should perfectly align.

Tuesday, 8 January 2013

A New Utility - LEC Google

I just found a new utility that could prove very useful called LEC Google.  What it does is enable you to create a LOD 9 (QMID 11) area accurately within Google Earth.

This will be useful because I've been having to run all my GE .kml files through PreFsxKml and then Fsx_KML in order to get shapefiles to import into SBuilderX, so that I can align watermasks to QMID 11 areas properly.

LEC Google will simplify this process by allowing the creation of accurate vector polygons within Google Earth from the start.  It is available for free from

You can see from the screenshot a sample area I created to test it.

Monday, 7 January 2013

Adding coastal islands and rocky outcrops

I've tested out how to do the little rocky outcrops and islets now so that they appear over the water rather than under it.  Previously my coastline was the main island coast only as proof of concept.

What I did was fairly easy enough.  I loaded up the .kml file that I used to create the earlier photoscenery.  (It's called Area_KML.kml because FSEarthTiles needs it to be called that).  The kml files had two polygons in it, one called 'coast' which marked the shoreline and one called 'DeepWater' which marked the edge of the blendmask.  All I did was to add some more polygons called 'Coast' to the Area_KML file, as you can see on this screenshot below.  You can see Elizabeth Castle Island to the far left of the image, separately outlined in red.

Every little islet will eventually have its own polygon named 'Coast'.  When the photoscenery is compiled these will all come out as little islands, but for the purposes of this demo I am only doing Elizabeth Castle Island itself.

However, that isn't all I've had to do.  The watermasks I created earlier need to be amended as well.  This was a simple task.  All I had to do was copy the new 'Coast' polygon I created earlier into the relevant kml file defining the QMID11 water mask.  If you remember, I created this earlier for the initial test.

I ran this through PreFsxKml.exe to correct the kml file (just as before), then created the .shp file again in FSX_KML so that I could import it into SbuilderX.  The new polygon complete with island was imported into SBX perfectly.

Using the hole technique (described in some detail in this page: I added the island to my existing water mask.  Beware though, there is one little stage missed out from this otherwise excellent tutorial!  When you select your island polygon and click 'make as hole' you then need to click on the polygon tool before clicking on the main parent polygon...  I spent a good half hour figuring this out.  Whoops!

(In SBX, remember to also add a landclass to the new island as well otherwise it won't be solid.)

So, just to recap...
  • I amended the main kml file to include the island in Google Earth.
  • Then I included that amendment to the watermask kml file in Google Earth again.
  • I compiled the new main coastline file to create landclass, and the new watermask file to create the updated water, both in SBuilderX, (after running the updated kml files through PreFsxKml and FSX_KML.)
  • I then compiled the photoscenery again using the amended main kml file in FSEarthTiles.
What I was left with was the following screenshot, showing Elizabeth Castle Island just off the shore of St Helier harbour on Jersey.  You can see the island is now properly shown above water. :)

Friday, 4 January 2013

Enough detail?

Am I putting enough detail in these posts for you to understand what I'm doing?

I think I'm putting the salient points in and setting down a roadmap that other people may be able to follow..but without some feedback I'm not sure how well I'm achieving that!

Would it be helpful for me to put in detailed bullet point by point steps?
More screenshots showing what things should look like through the stages?

If it's about right or if you need something different...would you let me know please?

Progress so far with Jersey..what have I learned?

Here's just a summary of what I've gained from looking at Jersey so far..

  1. There are loads of tools out there to help make making scenery relatively easy!
    • Google Earth
    • FSX_KML
    • SBuilderX
    • FSEarthTiles
  2. Once you know the right 'flow' using these tools to produce some of your own scenery is very straightforward.
  3. Water masks, blend masks and transparency are easy to do, even for a beginner.
  4. Terrain is slightly more difficult, but for most areas you can easily buy a ready to use off the shelf mesh.  For those where it isn't available, people will get it for you, but at a cost.
    • I did look briefly on the net for the possibility of extracting Google Earth's elevation data and using it in FSX.  From my brief look it seems that it is possible but may require a bit of scripting ability in order to get the data efficiently.  That is unfortunately far beyond the scope of what I was intending to do here, so I'm not actively looking at that, but it might be an avenue to look at later. If anyone already knows how to do this I'd appreciate an email please!
With this scenery I've completed the following..
  • excluded and recreated accurate water masks, over several QMID 11 areas.
  • used an already available DEM file to create more accurate terrain levels.
  • created detailed photoscenery to sit on top of that accurate terrain.
  • included water transparency effects which are blended out into the normal FSX ocean.
I've also learned some things by making mistakes!

I tried to make the new terrain bgl active before changing the water masks and it seems that terrain is squashed by existing default water masks.  Now I've figured it out it seems obvious but I wondered why it didn't work at the time.

Also, when I was adding the new water masks, I managed to make the areas overlap in some way, which suppressed terrain across two whole QMID areas.  Eliminating them one by one from my scenery config showed which was at fault and after a minor bit of tweaking and recompiling the file in SBuilderX the terrain came back.

Up to now these stages were just proof of concept really.  To be acceptable as scenery there are a number of other things that need to be done. 
  1. There are some areas where clearly the underlying terrain is inaccurate, and I shall need to alter these by using sloped flattened areas.  This could be fairly time-consuming depending on how much change is necessary.
  2. There are various inland water features which need a water mask and transparency as well.
  3. Around the coast there are numerous rock formations and little islands which currently look underwater, because the proof of concept water masks and transparency effects were only applied to the main coastline.  There are a good number of these so I'll need to go back and amend the water masks etc to include these accurately.
All in all, to now this has taken approximately 5/6 hours because I'm learning as I go.  With a bit of practice and knowing already what mistakes can be made, it should be possible for anyone to knock out half decent and pretty accurate ground scenery without too much trouble.

NOTE: With some of the data that can be used it is really only acceptable to use it to create scenery for personal or freeware use only.  It's not a prohibitive problem, but just make sure that you don't distribute something publicly which could bring down the legal people on you.  Usually it doesn't take much research to discover the limits to how you can use a tool or some data. :)  Whatever you do is obviously at your own risk!

Wednesday, 2 January 2013

Basic water masks completed

All four basic water masks completed as a test - there are still some minor niggles to work out, but more on those later!  Here it is - a top down view of the whole island in FSX.

Watermask in progress

This screenshot shows Jersey with the upper east quadrant watermask and coastline completed.

I've excluded all water masking from all four QMID 11 areas that cover the island.  Then I have put in a DEM bgl that was kind enough to have been gifted to me to create the underlying terrain more correctly.  I have placed land accurately using the Google Earth kml file I created earlier, and overlaid on that is the photoscenery test.

The one corner completed looks pretty good - there are some minor terrain issues which I will need to apply some sloped flattens to correct, but in the absence of a much more detailed DEM I'm not displeased with it!

The North-Eastern corner of Jersey with the first part of the watermasking complete.
Bear in mind this is a work in progress.  The terrain is intended to be tweaked and the photoscenery (currently at 1m/pixel) will hopefully be 30cm/pixel.