Forum Index
SUBSIM Forum Search

The Web's #1 BBS for all submarine and naval simulations!
[ SUBSIM Review ] [ SUBSIM STORE ]
Current Forum | Archives 2002-2003 |

Fix for incorrect Periscope and UZO bearings
Goto page 1, 2, 3, 4  Next
 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> SH3 Mods Workshop
View previous topic :: View next topic  
Author Message
devnull



Joined: 14 Nov 2003
Posts: 53

PostPosted: Wed Mar 30, 2005 5:30 pm    Post subject: Fix for incorrect Periscope and UZO bearings Reply with quote

I have discovered a problem that causes both periscopes as well as the UZO to be 3 degrees off when looking directly aft. To see what I am talking about, try looking aft through either periscope with the aft end of the boat in view and notice that the relative bearing reads 183 when the scope is lined up directly aft. This affects any torpedo firing performed with 100% manual TDC, i.e. manually making changes to the guages on the TDC map screen, then firing when the target is at the desired bearing.

The file \Program Files\Ubisoft\SilentHunterIII\data\Menu\Gui\Bearing.tga is to blame. This file is 1024 pixels wide, but the mark for 180 degrees is not perfectly centered from the mark for 0 degrees. It is 8 pixels off from where it should be. There are approximately 2.84 pixels per degree (1024/360) which comes out to being just under 3 degrees off (8/2.84).

The other bearings are also off by varying degrees the further they are from 0 degrees relative. The entire scale will need to be adjusted to ensure accurate manual TDC shots. I should have a fix ready this evening sometime.

- devnull
Back to top
View user's profile Send private message
poopdeck



Joined: 15 Mar 2005
Posts: 218

PostPosted: Wed Mar 30, 2005 5:37 pm    Post subject: Reply with quote

Oh, that is not good. Manual TDC is a must. Yep, your right. Nice find.

Best of luck with a fix. Thanks for noting the error.
Back to top
View user's profile Send private message
Redwine



Joined: 10 Jan 2002
Posts: 1143
Location: Buenos Aires , Argentina.

PostPosted: Wed Mar 30, 2005 7:31 pm    Post subject: Reply with quote

Thanks a lot..................

No promises but..........

I can mod that, but wich is the file who control the bearing strip position and coordinates ?

I can made a new one, but we need to stablish a entire value of pixels by degree........

into a 1024 texture.........
>>>>>>>>>>>>>>>>>>

360 x1 = 360

360 x2 = 720



into a 2048 texture..........
>>>>>>>>>>>>>>>>>>

360 x3 = 1080 ( here is the problen for a 1024 texture...........)

360 x4 = 1440

360 x5 = 1800



into a 4096 texture........
>>>>>>>>>>>>>>>>>

360 x6 = 2160 (too much for a 2048 texture)

360 x7 = 2520

360 x8 = 2880

360 x9 = 3240

360 x10 = 3600 ( it is the precision level i used into SH2 in the Hardcore TDC Mod)


I am not sure if all video cards today are capable to manage 4096 textures..........

If not, may be we can make a new one with 5 pixels by degree into a 2048 texture and another with a precision of 10 pixels by degree into a 4096 textures for those who can manage it...........

But i need to know wich file controls the position and coordinates of the bearing strip, and take a look if it can be modable...........

The .tga files is not a problem...........

Best Regards, Red.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
timetraveller



Joined: 23 Dec 2004
Posts: 967
Location: Atlantic Shipping Lanes

PostPosted: Wed Mar 30, 2005 8:44 pm    Post subject: Reply with quote

Yup, you're right. I put the bearing.tga into an image editor and the distance between 0-180 is 16 pixels less than the distance between 180 and 360.

Something to think about, and this comes from a software guy who's writing code for almost 40 years. The program may expect an image width of 1024, and the internal game software may calculate the position of the image (the bearing strip) behind the mask dependent on the 1024 value. Sooo, if they do it this way (hard coded) if you change the length of the strip, the calculation will be off for all degrees. Easy enough to test though. If it is off, you'll have to stick with the 1024 length. Just bring the degree hashmarks in to the closest pixel.

Give 'er a go mate.

-timetraveller


Last edited by timetraveller on Wed Mar 30, 2005 9:00 pm; edited 1 time in total
Back to top
View user's profile Send private message Send e-mail Visit poster's website
devnull



Joined: 14 Nov 2003
Posts: 53

PostPosted: Wed Mar 30, 2005 8:58 pm    Post subject: Reply with quote

Thanks Redwine, I appreciate the offer, but I'm already working on the mod and will have it ready tonight.

I made a similar mod for SH2 called AccuratePeriscope and incorporated it into the DualScopes mods that I made as well. For this, I was actually able to change the texture size from the original, the game was programmed to stretch that texture across the length evenly and I wound up with an extremely precise periscope bearing instrument.

I suspect that sh3 will be the same, just a little worried about making the texture over 1024 and cutting out some lower end video cards. If it doesn't work to change the width I will have to just space everything out as evenly as possible in 1024 pixels, but that won't be quite as precise as I would like, could mean sometimes the periscope being off by as much as 1/3 of a degree. Well, even then it's much better than we have now.

- devnull
Back to top
View user's profile Send private message
Jace11



Joined: 16 Mar 2005
Posts: 1091

PostPosted: Wed Mar 30, 2005 11:05 pm    Post subject: Reply with quote

Looking forward to this, I doubt it has anyeffect on the TDC but it does if you plot bearings visually...

Impatiently waiting....

J
Back to top
View user's profile Send private message
Redwine



Joined: 10 Jan 2002
Posts: 1143
Location: Buenos Aires , Argentina.

PostPosted: Thu Mar 31, 2005 1:12 am    Post subject: Reply with quote

devnull wrote:
Thanks Redwine, I appreciate the offer, but I'm already working on the mod and will have it ready tonight.

I made a similar mod for SH2 called AccuratePeriscope and incorporated it into the DualScopes mods that I made as well. For this, I was actually able to change the texture size from the original, the game was programmed to stretch that texture across the length evenly and I wound up with an extremely precise periscope bearing instrument.

I suspect that sh3 will be the same, just a little worried about making the texture over 1024 and cutting out some lower end video cards. If it doesn't work to change the width I will have to just space everything out as evenly as possible in 1024 pixels, but that won't be quite as precise as I would like, could mean sometimes the periscope being off by as much as 1/3 of a degree. Well, even then it's much better than we have now.

- devnull




Sorry Devnull, was not my intention to be intruder..........

I have the mod done, i am sure you know how to do it, but anyway if you want it to check and compare with your, just request me.................180 bearing error is fixed now, it lloks fine.

But it is not my objective, my real objective is to have a big size rotative bearing strip, may be a 1800 pixel one into a 2048 texture, or even a 3600 pixels one into a 4096 texture, but i am not sure if all new cards can manage 4096 textures...........

I want to obtain a reticle with 1/10 of degree precision.........

I have two ways to do it, one is to introduce a giant texture, and the other is the real life one, to intoduce a Nonio or Vernier system.

Best regards, Red.
Back to top
View user's profile Send private message Send e-mail Visit poster's website
devnull



Joined: 14 Nov 2003
Posts: 53

PostPosted: Thu Mar 31, 2005 1:50 am    Post subject: Reply with quote

Redwine: I didn't feel like you were intruding at all, just figured I'd save you the trouble since I was already working on this. I'm still finishing mine up, might take me a couple more hours. Go ahead and post your fix so that everyone doesn't have to wait for me and my slow image manipulation skills. I'll post a link to the fix I'm making once I'm done in case you want to see it, we can compare notes, etc. Cool

Thanks again for all the info, you've taught me a lot about the way textures are used by these cards.

- devnull
Back to top
View user's profile Send private message
Redwine



Joined: 10 Jan 2002
Posts: 1143
Location: Buenos Aires , Argentina.

PostPosted: Thu Mar 31, 2005 3:15 am    Post subject: Reply with quote

devnull wrote:
Redwine: I didn't feel like you were intruding at all, just figured I'd save you the trouble since I was already working on this. I'm still finishing mine up, might take me a couple more hours. Go ahead and post your fix so that everyone doesn't have to wait for me and my slow image manipulation skills. I'll post a link to the fix I'm making once I'm done in case you want to see it, we can compare notes, etc. Cool

Thanks again for all the info, you've taught me a lot about the way textures are used by these cards.

- devnull



All OK, Devnull, if you discover wich file is controlling the position of the bearing strip, please tell me........

Go ahead with job.............
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Spike



Joined: 10 Jan 2002
Posts: 223
Location: North Atlantic

PostPosted: Thu Mar 31, 2005 3:23 am    Post subject: Reply with quote

Is this why I miss a ship at 500?
Back to top
View user's profile Send private message
devnull



Joined: 14 Nov 2003
Posts: 53

PostPosted: Thu Mar 31, 2005 5:13 am    Post subject: Reply with quote

I have completed the fix. It can be downloaded at http://sh3.charliex.com. If anyone has any problems with this version please let me know.

- devnull
Back to top
View user's profile Send private message
poopdeck



Joined: 15 Mar 2005
Posts: 218

PostPosted: Thu Mar 31, 2005 6:22 am    Post subject: Reply with quote

nVidia 6800 Ultra here. Texture worked GREAT! 180 was right on (the easiest to check), oh so fine.

Thanks a million.
Back to top
View user's profile Send private message
Aviar



Joined: 17 Mar 2005
Posts: 186
Location: New Jersey, USA

PostPosted: Thu Mar 31, 2005 7:28 am    Post subject: Reply with quote

Looks good here too. Nice job.

Aviar
Back to top
View user's profile Send private message
devnull



Joined: 14 Nov 2003
Posts: 53

PostPosted: Thu Mar 31, 2005 8:07 am    Post subject: Reply with quote

Redwine wrote:
All OK, Devnull, if you discover wich file is controlling the position of the bearing strip, please tell me........

Go ahead with job.............



I think I may have found the file you are looking for Redwine. Take a look in \data\menu\menu_1024_768.ini at these sections:

[G26 I127]
[G27 I5]
[G28 I102]
[G2B I127]

It makes sense that there are four separate sections, one each for the periscope, then the UZO and binoculars, all four share the same texture for relative bearing. They have a format roughly like this...

[G26 I127]
Name=Compass
Type=1030;Static bmp
ItemID=0x26000004
ParentID=0x26000000
Pos=273,700,180,16
Color=0x66B26680
Materials=1
Display=0;No stretch
Mat 0=data/menu/gui/bearing.tga
MatFlags=0x1
TexFmt=0x9


Anyway, hope this helps. What is it about this game that keeps me up so late past my bedtime? My coworkers are going to wonder why I have a big red exclamation mark floating over me all the time!!!

- devnull
Back to top
View user's profile Send private message
timetraveller



Joined: 23 Dec 2004
Posts: 967
Location: Atlantic Shipping Lanes

PostPosted: Thu Mar 31, 2005 12:00 pm    Post subject: Reply with quote

Thanks devnull. Great job!

-timetraveller
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.     Forum Index -> SH3 Mods Workshop All times are GMT - 5 Hours
Goto page 1, 2, 3, 4  Next
Page 1 of 4

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group