Cruisers Forum
 


Reply
  This discussion is proudly sponsored by:
Please support our sponsors and let them know you heard about their products on Cruisers Forums. Advertise Here
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 17-02-2010, 22:37   #16
Registered User

Join Date: Oct 2009
Posts: 50
Quote:
Originally Posted by PeteCross View Post
Here is the result of my customization so far. Rule file is included.

/Pete
View of Barcelona to compare.
Attached Thumbnails
Click image for larger version

Name:	screenshot.11.jpg
Views:	190
Size:	422.7 KB
ID:	13312  
PeteCross is offline   Reply With Quote
Old 17-02-2010, 23:29   #17
Registered User
 
sailorF54's Avatar

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 999
Quote:
Originally Posted by PeteCross View Post
Here is the result of my customization so far. Rule file is included.

/Pete
Hi Pete

From now on, I think we should include a summary of applied tweaks with new S52 files we post as they are not easy to decipher
Still no handle on sounding size ?
sailorF54 is offline   Reply With Quote
Old 18-02-2010, 00:34   #18
Registered User

Join Date: Oct 2009
Posts: 50
Quote:
Originally Posted by sailorF54 View Post
Hi Pete

From now on, I think we should include a summary of applied tweaks with new S52 files we post as they are not easy to decipher
Still no handle on sounding size ?
Hi,

I think you will find, if you look carefully at the 2 Barcelona charts, that the soundings text size has changed through the global changes that I mentioned previously.
For me they are now an acceptable size, but thats what customisation is about, personal choices. I'm afraid you will have to wait a long time for documentation.
Diff might do the trick for you.

/Pete
PeteCross is offline   Reply With Quote
Old 18-02-2010, 05:52   #19
Registered User
 
sailorF54's Avatar

Join Date: Dec 2009
Location: Perros-Guirec, France
Boat: Jeanneau Sunshine 36
Posts: 999
Quote:
Originally Posted by PeteCross View Post
Hi,

I think you will find, if you look carefully at the 2 Barcelona charts, that the soundings text size has changed through the global changes that I mentioned previously.
For me they are now an acceptable size, but thats what customisation is about, personal choices. I'm afraid you will have to wait a long time for documentation.
Diff might do the trick for you.

/Pete
Hi
I beg to differ. Changing the text size does NOT change the sounding text size (Comparing the two Barcelona charts is irrelevant as yours is CM93 and mine was not)
Snapshot 1 is from the classic S52 file on CM93, snapshot 2 from your customized file.

BTW I did ask not for full documentation, only if you had changed more than the TX strings
Attached Thumbnails
Click image for larger version

Name:	Size5.jpg
Views:	158
Size:	95.8 KB
ID:	13313   Click image for larger version

Name:	Size3.jpg
Views:	153
Size:	83.6 KB
ID:	13314  

sailorF54 is offline   Reply With Quote
Old 18-02-2010, 08:53   #20
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Quote:
Originally Posted by PeteCross View Post
Here is the result of my customization so far.
Hehe funny! You made the whole world look like Sweden


Quote:
Originally Posted by sailorF54
bet that Dave will object on account of the loss of legibility at a distance
Doesn't the fact that all monitors have different DPI's make it kind of wrong to make statements about the legibility of another users screen? Plus in this forum I bet most users "distance" is quite limited. Like mine. (about 85cm from navtable screen to bulkhead :-) )
JesperWe is offline   Reply With Quote
Old 22-02-2010, 12:06   #21
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Quote:
Originally Posted by PeteCross View Post
When you have sorted all this, then you can focus on file s52plib.cpp line:2853 where you will find the font creation.
OK I finally got around to this. Got the build set up and all. But soundings are not going through the s52plib::RenderT_All() code path at all. I am looking at the RenderMPS() method but feeling slightly bewildered. Loads of parameters but nothing that looks like a font spec...

Any more tips on where to look?
JesperWe is offline   Reply With Quote
Old 22-02-2010, 13:17   #22
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
OH MY GAWD!

The soundings are stored in the rules file. Every digit 0-9 is stored as an ASCII art bitmap in XBM format in a separate rule. Those bitmaps are blitted onto the chart.

For example, this is the digit '8' for shallow depths:

Code:
SBTM    7@AAAB@
SBTM    7ABBBAB
SBTM    7AB@@AB
SBTM    7AB@@AB
SBTM    7BAAAB@
SBTM    7ABBBAB
SBTM    7AB@@AB
SBTM    7AB@@AB
SBTM    7BAAABB
SBTM    7@BBBB@
This is like the most arcane solution I have seen for quite some time...
JesperWe is offline   Reply With Quote
Old 22-02-2010, 23:02   #23
Registered User

Join Date: Oct 2009
Posts: 50
Quote:
Originally Posted by JesperWe View Post
OH MY GAWD!

The soundings are stored in the rules file. Every digit 0-9 is stored as an ASCII art bitmap in XBM format in a separate rule. Those bitmaps are blitted onto the chart.

For example, this is the digit '8' for shallow depths:

Code:
SBTM    7@AAAB@
SBTM    7ABBBAB
SBTM    7AB@@AB
SBTM    7AB@@AB
SBTM    7BAAAB@
SBTM    7ABBBAB
SBTM    7AB@@AB
SBTM    7AB@@AB
SBTM    7BAAABB
SBTM    7@BBBB@
This is like the most arcane solution I have seen for quite some time...
Hmm, well done! I too saw that soundings were not part of normal text rendering as I changed that font from Swiss to Roman, which gave a little clearer text but soundings didn't change. I had started to convince myself that I liked soundings as they were!!

/Pete
PeteCross is offline   Reply With Quote
Old 23-02-2010, 11:27   #24
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Quote:
Originally Posted by PeteCross View Post
I too saw that soundings were not part of normal text rendering
You can say that again. Not only is there a separate bitmap built for each character 0-9, there is also new copies in the config file for each decimal position the character appears in, and then the wole thing is repeated again for other depth, making a total of 12 identical copies of each character bitmap in the config file

OK, I admit I totally overcompensated here, and went down to 5 pixel digits, but just to see the result, here is a sample:



So while the code that renders this is some of the more convoluted mess I have seen in some time, including completely incomprehensible function names, one letter variables, weird calls to anonymous (void*)() and most other no-no's I can think of: Yes it is possible!

And BTW, I saw at least 3 times per sounding objects being allocated, and then immediately deleted without having been used. There's room for performance improvements, clearly.
JesperWe is offline   Reply With Quote
Old 23-02-2010, 11:50   #25
Registered User
 
Psyches's Avatar

Join Date: Apr 2008
Location: SF Bay Area
Boat: Tartan 30 - Bluegrass
Posts: 187
Send a message via Yahoo to Psyches Send a message via Skype™ to Psyches
Jesper, Pete - glad you got to the bottom of that; yeah, clearly room for improvements. I don't know why the code does it that way.

The bad news is (as you've seen) there are a number of places in the code base that do some silly stuff. The good news is many can be optimized and dramatically cleaned up, pretty easily.

Maybe someone else knows the history there, or Dave would (when he gets back).

Mark
Psyches is offline   Reply With Quote
Old 23-02-2010, 12:19   #26
Registered User

Join Date: Dec 2005
Location: Helsingborg
Boat: Dufour 35
Posts: 3,891
Quote:
Originally Posted by Psyches View Post
Jesper, Pete - glad you got to the bottom of that; yeah, clearly room for improvements. I don't know why the code does it that way.

The bad news is (as you've seen) there are a number of places in the code base that do some silly stuff. The good news is many can be optimized and dramatically cleaned up, pretty easily.

Maybe someone else knows the history there, or Dave would (when he gets back).

Mark
I don't know the history here.....but this reminds me about one of Daves posts.
Maybe "someday" is getting close ...

Thomas
cagney is offline   Reply With Quote
Old 23-02-2010, 12:55   #27
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
If I was to do something here without rewriting the whole s52 part I would probably replace everything from RenderMPS downwards (the two branches GetAndAddCSRules/RenderCS/SOUNDG03/SNDFRM02 and RenderSY/RenderRasterSymbol) with something that uses FreeType2 to generate sounding pixmaps, store them in a cache and then draw from that. And have some config options to select font, size and colors. Sadly it seems wxW does only support monochrome wxMask, and no RGBA images. No antialiasing is possible
JesperWe is offline   Reply With Quote
Old 27-02-2010, 05:02   #28
Registered User

Join Date: Oct 2009
Posts: 50
Quote:
Originally Posted by JesperWe View Post
If I was to do something here without rewriting the whole s52 part I would probably replace everything from RenderMPS downwards (the two branches GetAndAddCSRules/RenderCS/SOUNDG03/SNDFRM02 and RenderSY/RenderRasterSymbol) with something that uses FreeType2 to generate sounding pixmaps, store them in a cache and then draw from that. And have some config options to select font, size and colors. Sadly it seems wxW does only support monochrome wxMask, and no RGBA images. No antialiasing is possible

Hej Jesper,

Are you doing any rework here now? I hope so! If so, I can help if you need any testing to be done. Otherwise, maybe you could show what you have already done, so someone could continue to clean this up. I think it would be best if you could continue, as you seem to have a good handle on it and its not the easiest bit of coding to work on....

/Pete
PeteCross is offline   Reply With Quote
Old 27-02-2010, 05:22   #29
Registered User

Join Date: Dec 2008
Boat: Journeyman
Posts: 705
Quote:
Originally Posted by PeteCross View Post
Are you doing any rework here now? I hope so!
Well so far I have only done some experiments. Smaller soundings without shadows is a success, and the smaller Blit's also make screen redraws with many soundings noticeably quicker.

I have also experimented with the other symbols. Some symbols are not stored as bitmaps, but rather as HP-GL command strings. We are in the world of arcane formats here, I remember working with those in the 80's... Inspired by your earlier post I have successfully reworked the awash rock and underwater rock to look like Swedish standard symbols, for example. I have also played with replacing the rendering of some symbols with antialiased PNG's instead, which does not totally work at the moment.

I have a lot of different ideas for what CAN be done to improve both looks and performance significantly. However unless I am mistaken OpenCPN is pretty much a one man show for now, and I have no history in this project so I don't know what the views are on contributions, and to start with I have no interest in making any mods unless they work toward getting the graphics better antialiased, which might not be what everyone wants, I don't know...
JesperWe is offline   Reply With Quote
Old 27-02-2010, 06:04   #30
Registered User

Join Date: Oct 2009
Posts: 50
Quote:
Originally Posted by JesperWe View Post
I have a lot of different ideas for what CAN be done to improve both looks and performance significantly.

and to start with I have no interest in making any mods unless they work toward getting the graphics better antialiased, which might not be what everyone wants, I don't know...
Well, lets see what others think about this. Mark(Psyches) is following things during Dave's vacation, maybe he could make an informed comment?

I know Dave previously said that he is interested to see customisations of the vector presentation. I for one, am very interested in your work.

/Pete
PeteCross is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Depth Soundings by Color Code for the World ? H Romberg General Sailing Forum 9 31-12-2011 17:37
DNC Vector compared to ENC vector chart? adjuvantjfoster Marine Electronics 8 17-09-2006 17:19

Advertise Here


All times are GMT -7. The time now is 19:23.


Google+
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Social Knowledge Networks
Powered by vBulletin® Version 3.8.8 Beta 1
Copyright ©2000 - 2024, vBulletin Solutions, Inc.

ShowCase vBulletin Plugins by Drive Thru Online, Inc.