Adding a Lighthouse

To test the new World Builder tools for Sailaway, I took it on me to create a worthy replica of the famous Fastnet rock complete with it’s lighthouse. These World Builder tools will be part of the upcoming release of Sailaway and will be available for all. Once published, the edits made with this tool will be visible for all sailors. Here’s my report on how I made Fastnet Rock and the Fastnet Lighthouse:

World Edit

All changes to the world in Sailaway are wrapped up in a package called a “World Edit”. This World Edit defines a rectangular area in which the actual edits will take place. The function of the World Edit is to encapsulate the individual changes to the world and to make it easier for the Sailaway system to dynamically load these edits as a boat sails by. The game only has to check these rectangular areas to know which ones should be loaded into memory.

Visible distance

So the first thing to do is create such a World Edit and define the rectangular area. It is best to keep this area as small as possible to prevent people from having to download edits that they won’t be able to see anyway. And Fastnet Rock itself is rather small, so you’d think the World Edit region can be small as well. But not in this case. The lighthouse is a tall structure and can be seen from a very big distance. The distance at which Sailaway renders any land is currently 20 kilometers. (may be we should extend this a bit). When the area of the World Edit touches this circle of 20 km, it will be loaded. The lighthouse is 48 meters tall and can be seen at a distance of 16 miles or 29.5 kilometer. And this means that the World Edit has to have a size of 9.5 x 2 = 19 km square. This roughly equals 10 minutes latitude by 16 minutes longitude. The maximum allowed size is 1 by 2 degrees, so we are well within the limits.

The lighthouse has a range of 27 nautical miles which is more than those 16 nm. This is due to refraction of the light by the atmosphere. But luckily the Sailaway system that places buoys and fixed lights will take care of this. So there is no need to extend the World Edit rectangle any further. The lighthouse won’t be rendered, but the light will be visible anyway, since this is already defined in the database of nautical objects that Sailaway uses.

Terrain height and sea depth

Screenshot of the mapFirst I am going to edit the terrain heights, because the entire island is nowhere to be found in Sailaway and the ocean seems to be 34 meters deep where FastnetRock should be.

I found this section of a nautical map of the region and will use that to edit the seafloor. I clicked on “Edit Terrain Heights” and in the empty list of terrain edits, I click the + button and adjusted the area. It’s always a good idea to make the area’s for the edits as small as possible. Both to prevent unnecessary and slow downloads and to increase the resolution of your edit.

 

Nautical chartEach edit will have 512 x 512 height samples regardless of the size of the area. So a smaller area will allow for more detailed terrain than a large area. If you are editing a port or an island it is best practice to add 1 terrain edit for the entire region in which you adjust the ocean floor and maybe the height of the terrain. And then add one or more smaller, high detail terrain edits to make the important bits. In this case I will add only 1 terrain edit because the high detailed rock is an object I modeled in Blender

Editing the water depth

Current Sailaway map

The current map doesn’t look anything like the real one. I am going to make it roughly the same as the nautical chart and to do this, the current shallow area has to be removed.

I do this with the tool “Level to” and set the depth to -57 meters, which is roughly the depth of the surrounding area. (the image is lighter blue than the previous, but it is actually deeper than it was. This is due to the dynamic map coloring to show maximum detail.)
The center area is left alone, because that will be raised anyway.

 

Changed water depths

Next up is copying the depth soundings from the chart to the Sailaway map. I use the “Level to” tool, set the accurate depth, pull the effect strength slider to the right for 100% effect and click once in the map to make the depth match the chart.
It’s easiest to start from the deepest level with a big brush and work towards the shallower depths with a smaller brush.

The sea bottom becomes a bit polka dot, but there is not much you can do about that. Except for using the “Smoothen” tool a bit.

 

Importing 3D model

In the tool “3D models’ I added a new object for the island, placed it roughly on the spot where the default lighthouse is on the map (I’ll adjust the exact location later) and pressed “Select Model”. Of course there is no island in the list of models yet, so I added a new one and imported my 3D .OBJ model of Fastnet Rock that I made in Blender. I manually selected the texture I created for it, because the importer does not import the .MAT material file.

Importing the lighthouse

The lighthouse itself is imported in the same way. But this model has 2 materials, because the light needs to shine at night. This 3rd material uses the shader “Self Illuminating Shader”. When this model is placed in the world, the light will be always on. When connected to a nautical object, it will replace that object and uses it’s light signature. To add an actual light to it, I set the light position with the sliders at the bottom. This will add the ugly Christmas star that you see, but that’s only in the editor so you can see where the light is situated.

Sailaway importer showing Fastnet lighthouse

Replace existing light

Select an existing nautical object to replaceAnd finally I place them both in the world by adding the 3d objects to my World Edit. It took a little tweaking to position them correctly. To replace the existing fixed light with this new lighthouse, I used “Replace nautical object” and select the lighthouse in the list. The lighthouse has started flashing now.

 

And this is the end result. When the new update for Sailaway is published, this lighthouse and all other edits to the world will be visible for everyone who sails in the area.