PDA

View Full Version : [WIP] major floating lights on Nav Map


oakdesign
08-05-13, 08:24 PM
After starting with SH5 after beeing away for about 2 years I have my mod soup up and running looking for as much realism as possible.

With OHII we got bouys but I was always missing the feature to have those bouys been shown on the map.

On the last weekend I did a lot of research on how to achive this tried different approches. Some ideas have been thrown away. Looked into some mods dealing with the navigation map and finally came to the following conclusion / workflow.

1. The facts:

In OHII there are six different buoys
https://lh4.googleusercontent.com/-F9ptVT7qy_M/UgBBzoOpDpI/AAAAAAAAADQ/bDDuZ-qPt6k/w606-h401-no/buoys3.jpg

these buoys are part of the Harbour.mis of the different Campaigns

2. The Idea / The Workflow

The first idea was the create to create a *.raw files for the nav map like done in the MQK mod, but this would limit the possibilities in terms of zoom and placing the major floating lights on the their accurate position seemed to be impossible.

Second idea was to use *.shp files like used for Location Names. I played around with the obviuos xyz data and different tools like Grass GIS and Meshlab. I was quite clear the creating a point model for some simple icons would not be the problem, but connecting to faces and dealing with the *.shp format would be quite a lot of work.

Third and preferred idea was to use *.dds files. First Problem here I'm working on a mac and there is no out-of-the-box dds plugin for PS on OSX. OK so switched to gimp.

For the moment I've created 6 different navmap signs out of "public domain" *.svg files found. I'm still gathering information on historical navmap and might create proper ones in the future. BTW a good resource for historical nautical maps is greif.uni-greifswald.de

For the moment I just tested if it's possible to get my icons shown up on the navmap on the correct position.

Here are some screenshots of what has been achived so far
Misson editor.
The 6 existent buoy placed just in front of Helgoland Harbour in order to have a feeling of proportion. Underneath each of the buoys I placed a Map Location Object and assigned a *.dds as Image2DMap
https://lh5.googleusercontent.com/-1DpYlJaufAQ/UgBEXxfOEuI/AAAAAAAAADw/SXulAxvx3y8/w600-h413-no/me.jpg

Here are 2 Screenshots what it looks like on the ingame nav map
https://lh3.googleusercontent.com/-Ls9ZtxoApnY/UgBBgv-OayI/AAAAAAAAADA/S2Thsc2yfB0/w600-h375-no/buoys1.jpg

and full zoomed in

https://lh4.googleusercontent.com/-XyrsP0PK78Q/UgBBj9OSULI/AAAAAAAAADI/I2SYPIa7s9g/w600-h375-no/buoys2.jpg

Currently I'm still playing around with different *.dds sizes and scale / zoom factors.

Next steps in the idea are to grap all buoys position and types out of the Harbour.mis and generate an separate *.mis as kind of an overlay.

Another future Idea might be to place Lighthouses and create a lighthouse almanac.

One of the missing things I have is that I have no idea what's the difference in using *.dds files instead of *.shp in terms of performance. Maybe on of the guru's might give an advice.

That's it so far.

Any suggestion are welcome in order to see if it's worthwile to go on or not.

gap
08-05-13, 08:50 PM
Welcome back oakdesign :salute:

I like very much both your ideas (buoys and lighthouses) , and I am looking forward to your progress with them.

If you need for help with the dds files, I can provide you with 6 different buoy icons; just tell me how you want them to look as for size, shape and color.

P.S:

What is the advantage of using shp files,? Being vectorial objects they should use lesser memory and should be scalable without quality losses, but as far as I can see from your preview, bitmap icons look also good even at high zoom levels :hmmm:

Are the programs mentioned by you capable to convert text/shapes into vectors, and to export them into csv format?

Last: plotting the coordinates of a SH5 shp file on a plane, I have noticed that they contain several iterations of the same shape/text but at different zoom levels (sort of a mipmap), which is a bit weird talking about a vectorial image. Is this redundant information really needed? :hmmm:

Fifi
08-05-13, 09:23 PM
Excellent idea Oakdesign! :yeah:
Will be very usefull together with real nav!

oakdesign
08-06-13, 01:38 PM
Welcome back oakdesign :salute:
If you need for help with the dds files, I can provide you with 6 different buoy icons; just tell me how you want them to look as for size, shape and color.

gap thank you for offering your assistance. I'm a software developer in RL (so quite techi) and just want to extend my graphics experience. Best way is alway to try it on your own. I already have a bunch about 100 buoy icons as *.svg files, therefore no problem to create different sized *.dds files for testing. At the moment I'm just playing around with some blur and disort filter in order to make them look less "satellite nav style like"


What is the advantage of using shp files,? Being vectorial objects they should use lesser memory and should be scalable without quality losses, but as far as I can see from your preview, bitmap icons look also good even at high zoom levels :hmmm:


As having the nav buoys on the map makes only sense while zoomed in I think staying with bitmaps shoulb be ok as they will be quite small in size, even smaller as some of the *shp files.


Are the programs mentioned by you capable to convert text/shapes into vectors, and to export them into csv format?


On a first step I used Grass and Meshlab just the other way round. Importing the xyz coordinates in order to get an idea what the point map looks like. They might be able to provide functionality for exporting,too but I havn't digged deeper into it.



Last: plotting the coordinates of a SH5 shp file on a plane, I have noticed that they contain several iterations of the same shape/text but at different zoom levels (sort of a mipmap), which is a bit weird talking about a vectorial image. Is this redundant information really needed? :hmmm:

concering the multiple iterations of the same shape I still trying to find more Information.
But it already starts with the header informations i.e take the data\Menu\Gui\Shapes\arrowbody
1 <--//two statements on this on either is bool to use arrowbody.dds another that
//states that if more than one point map object available which one to use
arrowbody.dds
4 <-- number of vertices
0.0 0.954569 0.0
-16.3476 1.51965 0.0
-16.3476 -1.51577 0.0
0.0 -0.951302 0.0
0.9995 0.813524 0.5
0.082804 0.999501 0.5
0.0828592 0.000499517 0.5
0.9995 0.186274 0.5
2 <-- number of faces so the vertices have a 0 base count
0.0 1.0 2.0
0.0 2.0 3.0

there was a Thread wich obvious had useful information on *shp files. At least if found a lot of references onto that one, but the Thread starter deleted the given information
http://www.subsim.com/radioroom/showthread.php?p=1394741#post1394741

gap
08-06-13, 03:53 PM
gap thank you for offering your assistance. I'm a software developer in RL (so quite techi) and just want to extend my graphics experience. Best way is alway to try it on your own. I already have a bunch about 100 buoy icons as *.svg files, therefore no problem to create different sized *.dds files for testing. At the moment I'm just playing around with some blur and disort filter in order to make them look less "satellite nav style like"

This is the right spirit! I wish you success :)


concering the multiple iterations of the same shape I still trying to find more Information...

Okay, let us know in case you discover anything of interest :up:


there was a Thread wich obvious had useful information on *shp files. At least if found a lot of references onto that one, but the Thread starter deleted the given information
http://www.subsim.com/radioroom/showthread.php?p=1394741#post1394741

I think I know the reason; compare the date of the following post with the one that the tutorial mentioned by you was deleted:

http://www.subsim.com/radioroom/showpost.php?p=1992714&postcount=453

For some arcane reason this dude didn't like my pointing someone else to his turorial. :06: I wonder why being that jealous, he decided to share his wisdom at first :03:

volodya61
08-06-13, 05:25 PM
I think I know the reason; compare the date of the following post with the one that the tutorial mentioned by you was deleted:

http://www.subsim.com/radioroom/showpost.php?p=1992714&postcount=453

For some arcane reason this dude didn't like my pointing someone else to his turorial. :06: I wonder why being that jealous, he decided to share his wisdom at first :03:

:o

I've never saw such behavior/actions on subsim yet :06:

gap
08-06-13, 05:59 PM
:o

I've never saw such behavior/actions on subsim yet :06:

Yes, and do you know the worst part: I myself "warned" him about that post, when I sent him a polite PM asking for permission to reupload his mod to subsim dowload section. it all happened when Neal asked us to make available again old mods whose links were broken. Useless to say that he never answered that PM :haha:

Nonetheless, this is not the most unpolite attitude I had to stand: open the following link and go straight to the bottom: :huh:

http://hostedgames.yolasite.com/

I should note that to my memory I haven't ever had any intercourse (neither good nor bad) with this guy, and I could hardly remember is nickname (for having read in the past some of his delirious posts in the SHIII section) when Privateer pointed me to his kind mention of us :rotfl2:

Sorry for the offtopic :)

volodya61
08-06-13, 06:17 PM
http://s19.postimg.org/qbw15hmgv/facepalm.gif

You know, I wouldn't be surprised if someone mentioned me somewhere in his blog or on his own page (you know who I mean :D).. but you :o.. with your usual politeness and tolerance.. I didn't believe my eyes..

oakdesign
08-08-13, 04:27 PM
Here comes a series of screenshots around Helgoland with zoom levels
Starting from 9km down to 180m.

By analysing the Harbour.mis out of OHII I regonized that from the available 6 buoy *dat models only 4 are actually used.

9km zoom
https://lh3.googleusercontent.com/-vjmJSMCoiH8/UgQKgJPIOOI/AAAAAAAAAFQ/Ypvd_jWxBMQ/w600-h375-no/Helgoland_9km.jpg

3600m zoom
https://lh3.googleusercontent.com/--n9mcNpJ0tc/UgQKfH2Mn-I/AAAAAAAAAEw/4AYbcajWX6A/w600-h375-no/Helgoland_3600.jpg

1800m zoom
https://lh4.googleusercontent.com/-oWGW1u77neg/UgQKfPoBjnI/AAAAAAAAAEk/0JOY7yQeBeM/w600-h375-no/Helgoland_1800m.jpg

900m
https://lh4.googleusercontent.com/-oodHrHpcmv0/UgQKf1uqZfI/AAAAAAAAAFM/bWadSCzmBrk/w600-h375-no/Helgoland_900m.jpg

360m
https://lh5.googleusercontent.com/-pHr6CGksKUc/UgQKfhCYIkI/AAAAAAAAAE4/Ew4NC5i968E/w600-h375-no/Helgoland_360m.jpg

180m
https://lh5.googleusercontent.com/-vTSkfPpxg3g/UgQKfJ2KipI/AAAAAAAAAE0/_rJj63RGwt8/w600-h375-no/Helgoland_180m.jpg

oakdesign
08-08-13, 04:34 PM
Currently I'm dealing with an issue of placing MapLocation icons on the NavMap see screenshot below.

Maybe some one has an idea how to change the layer level.

If nothing else works the last possibility would be to change the alpha map of the corresponding Harbour *.dds

https://lh3.googleusercontent.com/-GG_eJoO53nw/UgQKgb1NkII/AAAAAAAAAFI/LKVgajydVNE/w600-h375-no/Kiel_900m.jpg

Trevally.
08-09-13, 03:45 PM
Nice idea :up:

TheDarkWraith
08-12-13, 10:25 PM
there was a Thread wich obvious had useful information on *shp files. At least if found a lot of references onto that one, but the Thread starter deleted the given information
http://www.subsim.com/radioroom/showthread.php?p=1394741#post1394741

I've played around with .shp files. What are you wanting to know :06:

oakdesign
08-13-13, 07:56 AM
I've played around with .shp files. What are you wanting to know :06:

TDW thank you for offering your experience
Questions is have

Edit figured the format by going through some testcases


option1: Line 1 in a *.shp file is this either a bool indicating if the texturefile, if defined in Line 2 should be used or not,
or
option2: Line 1 as a counter which object, if more than one point mesh object is present should be used.
Line 1 is a bool if no texture is used 0 and directly followed by the vertices count in Line 2
If a texture is used the value could must be > 0. If left to 0 CTD. Followed by Line 2 texture file
Line 3 Vertices Count
Most *.shp have more than one point mesh object inside, most likely the second one is a scaled and shinked version of the 1st one. Haven't found what the second one is used for.
The second mesh is for used for textures, whereas if a single color texture is used it the values for the vertices don't matter. The second vertices set could be even defaulted to 0 0 0 all vertices without any issues.

If you have an answer for 1. and 2. would be nice just for interest


Facts I already know



The faces are 0 based so in order to convert a *.shp into an *.obj for editing vertices in faces definition have to be ++ on "export" and "--" on "import"
*.shp are working with triangulated faces, especially all the *txt.shp could be optimizedreducing the vertices and faces count without loosing sharpness.
for eyecandy I need an alpha channel to make the map icons look a bit blurry not possibel with *.shp
As I'm using small sized *.dds they are not using more resources as most of of the *.shp files

For the current ongoing work I will stay with *.dds due to 3. and 4.from above