Building Fafifi in X-Plane

Jump to navigation Jump to search

We are in the early stages of developing a 3-D digital iteration of the Island of Fafifi.

It will be freely accessible as a custom scenery mod for the X-Plane flight simulator.

Please connect with us on Discord if you'd like to join our scenery development team.


A screen shoot of a 3-D model of an island inside an app window



Introduction

Development of the custom scenery has been on the back burner for a couple of years. Rose used a random noise generating function in Blender which came up with the above image. Unfortunately, the original Blender file has been lost, but this shape of the Island is adored and has been prominent in the imagination as other aspects of the project have been developed. It has for example had significant impact on shaping the story world.

The image above is a screenshot of Maps2Xplane's custom scenery from their Society Islands pack. It shows surroundings of Faa'a Int'l airport in Tahiti. It is included here as an example of the beauty, fidelity and quality that we are striving for with our fictional island of Fafifi.

RESEARCH NOTES

A.N.T. Landscape (Blender addon)

Missing Presets

To those having an issue with missing presets:

After installing the addon normally move the "presets" folder from within this addons zip file into:

"C:\Users\Username\AppData\Roaming\Blender Foundation\Blender\4.2\scripts\addons"

Don't rename the presets folder, just let it sit there under ..\scripts\addon\presets

This works for 4.2, im guessing this will work for other versions but have not verified.

Source: https://extensions.blender.org/add-ons/antlandscape/reviews/

Intro Video

QGIS to Blender

QGIS app Introduction

DEM data from QGIS

Managing LiDAR data within QGIS is possible using the Processing framework and the algorithms provided by LAStools. You can obtain a digital elevation model (DEM) from a LiDAR point cloud and then create a hillshade raster that is visually more intuitive for presentation purposes (see https://docs.qgis.org/3.34/en/docs/training_manual/forestry/basic_lidar.html).

What is LiDAR data?

Lidar (/ˈlaɪdɑːr/, also LIDAR, LiDAR or LADAR, an acronym of "light detection and ranging"[1] or "laser imaging, detection, and ranging"[2]) is a method for determining ranges by targeting an object or a surface with a laser and measuring the time for the reflected light to return to the receiver. Lidar may operate in a fixed direction (e.g., vertical) or it may scan multiple directions, in which case it is known as lidar scanning or 3D laser scanning, a special combination of 3-D scanning and laser scanning.[3] Lidar has terrestrial, airborne, and mobile applications.[4][5] https://en.wikipedia.org/wiki/Lidar#Terrestrial

Mesh/Terrain Tiles

Earth

Although latitude lines are always equally spaced, longitude lines are furthest from each other at the equator and meet at the poles. At the equator, longitude lines are the same distance apart as latitude lines — one degree covers about 111 kilometers (69 miles). Quora

Geeting Started - from Mattias

We had approached Mattias (maps2Xplane), the creator of beautiful scenery and collaborator on the Thrustmaster iLand fictional island scenery in Xplane. He was initially interested in collaborating on our project to build Fafifi as X-Plane custom scenery. However, because Rose didn't get back to him because they were sick in hospital, Mattias committed to another project and is not available for the next few months. But he did kindly offer some advice to get started:

  • Take a look at MeshTool from LR.
  • choose a XP tile for which a .xes exists (a container with landclass and other data), which is required by MT - even if you later have your own landclass.
  • Draw coastlines and other outlines such as waterbodies in e.g QGIS and export them as .shp.
  • Your elevation model must be in .tif format and geo-referenced (either draw it by hand, or use a tool that can automatically generate fictitious elevation profiles).
  • Feed MT with .shp and .tif and .xes, then you at least have a first dummy mesh.

And later:

  • There exists for example the A.N.T. Landscape add-on for Blender, with which you can create landscapes (semi-)automatically. You should be able to export the point cloud with the "BlenderGIS" add-on, and with QGIS you should be able to "rasterize" point clouds.

Getting Started - from Marcus

LR's Mesh Tool (MT) - old and unreliable

Anyways, there are two versions of the MeshTool currently available. The stable, and the Beta version. I tried them both, but got only got mixed results. I believe it has to do with the tool being quite old. Using this tool may not be the best way to go depending on what it is that you want to achieve.

For the tool to work, you need the tool itself of course, and its corresponding config folder. The folder is also available to download on the page. It needs to be in the same folder as the MeshTool itself.

Using it is a bit tricky though. You will need to construct what I call a mesh script. In it, you define the base parameters of the tile you are creating, and the definitions of the single patches you build. For example water and terrain patches.

Then, you will probably need the land class files, which are also available for download on the page. These you can put anywhere you want, but the specific land class file needs to be referenced when using the tool.

And lastly and most importantly, you will obviously need a DEM (Digital Elevation Model) file which contains the height information from which the mesh will be constructed.

Once you have all of this together, the tool will generate the mesh and create the .dsf file as you specify it.

In the meantime I managed to build the ground mesh myself in Python without using the MeshTool. This gave me much better results. However, this is dependent on the ortho textures I place on top of the mesh as textures.

I love to teach, and learn as well :) I have been told I have a good way of explaining things. If you have further questions, you can reach me directly at marcus@marstr.online as I don't come here very often.

He has made a better solution than MT

The most important part for you to know is that the MeshTool made available by Laminar Research appears to be a very old tool - the stable and the beta. I have tried both, and the beta version gave me horrible results, while the stable version did produce sane terrain - but all tiles that had orthos assigned to them were flooded with water.

In the end, I developed a mechanism myself through which I can generate usable and sane terrain using a DEM file of my choosing. This can either be a high-resolution LIDAR scan, or an older (but still accurate) scan of the Shuttle missions. Both DEM versions are raw files containing a point with a height value. The older versions have 1201x1201 points per latitude and longitude degree, which in my experiments proved to be sufficient for generic terrain generation.

I would recommend to go the same route as this has produced the best terrain for me in X-Plane 12. Of course, you can also generate your own DEM file if you are generating a fictitious country or area. A DEM file is just raw height values with no header or footer in the file format. In other words, it would be 1,442,401 height values. Once you have generated such a file (first point starts in the top-left or north-west corner), you can use it for terrain generation, and possibly additional orthos you want to use.

You can have a look at this specific file in my source code: https://marstr.online/code/gitweb.cgi?p=orthographic;a=blob;f=xp_scenery.py

This is the class that generates the terrain for me, including the smaller squares containing the ortho photos. Most important is the winding order of the triangles, which took me some time to figure out to get it right. The code contains the correct order. You will see it reads the DEM and generates a usable DSF file.

Acknowledgements

We are really grateful to the following X-Plane scenery developers who have provided advice and support:
Mattias maps2Xplane
Marcus [1]
Walter [2]