SUBSIM Radio Room Forums



SUBSIM: The Web's #1 resource for all submarine & naval simulations since 1997

Go Back   SUBSIM Radio Room Forums > Silent Hunter 3 - 4 - 5 > SHIII Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 03-20-10, 05:59 PM   #106
karamazovnew
The Old Man
 
Join Date: Mar 2009
Location: Bucharest, Romania
Posts: 1,403
Downloads: 151
Uploads: 0


Default

Quote:
Originally Posted by Seeadler View Post
The trick is to determine when a particular texture ID is transformed via a D3D matrix. If you have that info, then you can do anything with the vertex quad for the texture, scaling, translating, rotating, etc. before it is rendered onto the screen. SH4 does basically the same with the zone parameters from the menu_ini

I did it as a test with the two loading backgrounds

Wow!, how did you do that?!
karamazovnew is offline   Reply With Quote
Old 03-20-10, 06:46 PM   #107
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Quote:
Originally Posted by karamazovnew View Post
Wow!, how did you do that?!
Yes, Seeadler, how you found the tga ID reference as an ID on the game engine?

We already noticed that some loading screens are "hardcoded", we can´t move them or just rescale them, they always start from botton left. Then I tryed to find the id using S3D search function but nothing were found...

Also the Navmap and attack map (Terrain only) is fixed at 1024x786. We find a easy way to extend them to correct WS resolution/aspect but after the 1024 the terrain is mirrored. Probably is the same issue here that you explained above.
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve

Last edited by Rubini; 03-20-10 at 07:07 PM.
Rubini is offline   Reply With Quote
Old 03-20-10, 07:05 PM   #108
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Quote:
Originally Posted by karamazovnew View Post
This is simply amazing.... It's quite surprising that 5 years on, someone still comes with a breakthrough regarding SH3. Well, a word about what to do now.

As you all know, all SH games have their interface limited to a 1024*768 space. SH4 and SH5 allow to scale up items in different modes. This thread explains how they do it: http://www.subsim.com/radioroom/showthread.php?t=163118

SH3 however, with this mod, will always scale the interface in a constantAspectRatioVertical style. The left side of the screen, a box in 4:3 format will always look ok, but you'll get "empty usable" space to the right of the screen. The amount of usable space depends on the aspect ratio of the monitor. In other words, 16:10 (1920x1200) resolutions will have less space than 16:9 resolutions (1920x1080).

UI modders will now have the following spaces to work with:

- 4:3 resolutions 1024*768 box, just as before (1024=768*4/3)
- 16:10 resolutions 1228*768 (1228=768*16/10)
- 16:9 resolutions 1365*768 (1365=768*16/9)

Making one interface for all aspect types is IMPOSSIBLE. However, it's easy to convert a 16:9 interface to a 16:10 because the difference is small.

How to do a quick and fast centering on the screen? First of all, all vertical positions are the same as before, nothing has changed.
Here's one example of a page:

[G01 I1]
Name=Page shell
Type=1027;Menu page
ItemID=0x1000000
ParentID=0x0
Pos=0,0,0,0
LoadingMode=2

It starts from the left side of the screen and we want to move it in the center. The "old" center had X=512 (or 1024/2). The new center depends on the aspect ratio, for 16:10 resolutions, X=614 (or 1228/2). This means that you only need to move each page 102 pixels to the right:

[G01 I1]
Name=Page shell
Type=1027;Menu page
ItemID=0x1000000
ParentID=0x0
Pos=102,0,0,0
LoadingMode=2

Of course, you'll now end up with empty bands on both sides of the screen.
Thus, we need to think ahead, leave all pages as they currently are. What we DO need is this:
Divide all items into 3 categories:
- glued to the left of the screen (X position will not change)
- glued to the right of the screen (X position should change by 204 pixels for 16:10 res)
- glued to the center (X position should change by 102 pixels for 16:10 res)

So...
1. We must create MASTER (left, center, right) groups inside each page and place each item inside. Luckily the entire interface has already been carved up in big groups so most of the interface will only require you to reparent just a few groups.
2. We can now make multiple interfaces for all aspect ratios just by moving the left and right master groups.
3. "SOME" items will require multiple TGA versions. I'm talking of course about all backgrounds. These are actually glued to the Left of the screen.

Sounds easy actually. But we DO have 4-5 major interfaces for sh3.. so which one should we start with first? I opt for ACM
Hi mate,

Well, after some days working on this new mod I can say that things are a bit more complicated - unless we just work with a 1360x768 for example. Any resolution above this one (768 is the magic number here) will need to also adjust all things on the menu_1024 (and also some tgas) in it´s vertical too. And we also have that "hardcoded" pages as exposed in the post above.

The first formed group (well ,yet in formation - it´s openned for any one that have some knowledge on menu_1024) that is already working on this mod have a basic goal to make a quick release of a basic WS adapted interface - probably stock GWX3.0 - to be presented to the community, also with a "make it your self" guide, this way anyone will be able to adapt it to his own menu_1024/cameras.dat (these two files are just basic ones to adjust this mod correctly and obviously we have infinite versions here in this community). The resolutions shall be probably 1360x768, just because it´s the major one that uses that magic "768" making things a lot easier and quick. All monitors can just rescale it automatically then. The idea is that we will provide our basic finds/tricks on the work, to make things easier for anyone after that to adapt it to any GUI, etc (or even for new resolutions).

What do you think?
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 03-20-10, 07:32 PM   #109
Flopper
Weps
 
Join Date: Jan 2010
Location: Asheville, NC, USA
Posts: 356
Downloads: 107
Uploads: 0
Default

Quote:
Originally Posted by Rubini View Post
Hi mate,

Well, after some days working on this new mod I can say that things are a bit more complicated - unless we just work with a 1360x768 for example. Any resolution above this one (768 is the magic number here) will need to also adjust all things on the menu_1024 (and also some tgas) in it´s vertical too. And we also have that "hardcoded" pages as exposed in the post above.

The first formed group (well ,yet in formation - it´s openned for any one that have some knowledge on menu_1024) that is already working on this mod have a basic goal to make a quick release of a basic WS adapted interface - probably stock GWX3.0 - to be presented to the community, also with a "make it your self" guide, this way anyone will be able to adapt it to his own menu_1024/cameras.dat (these two files are just basic ones to adjust this mod correctly and obviously we have infinite versions here in this community). The resolutions shall be probably 1360x768, just because it´s the major one that uses that magic "768" making things a lot easier and quick. All monitors can just rescale it automatically then. The idea is that we will provide our basic finds/tricks on the work, to make things easier for anyone after that to adapt it to any GUI, etc (or even for new resolutions).

What do you think?
I think it sounds great. I wish I knew more. By the time I locate my fanny, you guys will be done already.

But 1365 x 768, right?
__________________

Flopper is offline   Reply With Quote
Old 03-20-10, 08:05 PM   #110
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Quote:
Originally Posted by Flopper View Post
I think it sounds great. I wish I knew more. By the time I locate my fanny, you guys will be done already.

But 1365 x 768, right?
No, the correct "comercial" (standard on the monitors) resolution is 1360x768...
And, yes, we want to release that basic one, very similar the one that you saw in the videos, for GWX 3.0 standard, very soon (also with that guide to "make it yourself")
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 03-20-10, 09:20 PM   #111
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

Quote:
Originally Posted by Rubini View Post
Yes, Seeadler, how you found the tga ID reference as an ID on the game engine?
I implement some loggers in my dll, one of these logger logs the creating of quads for 2D textures at startup.

it looks like:
Code:
myMatrix._11 = 2.000000 myMatrix._12 = 0.000000 myMatrix._13 = 0.000000 myMatrix._14 = 0.000000
myMatrix._21 = 0.000000 myMatrix._22 = 3.200000 myMatrix._23 = 0.000000 myMatrix._24 = 0.000000
myMatrix._31 = 0.000000 myMatrix._32 = 0.000000 myMatrix._33 = 1.002506 myMatrix._34 = 1.000000
myMatrix._41 = 0.000000 myMatrix._42 = 0.000000 myMatrix._43 = -0.050125 myMatrix._44 = 0.000000
 
Logging Vector: 840.00 525.00 -0.05 -> Stride = 0
 
myMatrix._11 = 1.250000 myMatrix._12 = 0.000000 myMatrix._13 = 0.000000 myMatrix._14 = 0.000000
myMatrix._21 = 0.000000 myMatrix._22 = 2.000000 myMatrix._23 = 0.000000 myMatrix._24 = 0.000000
myMatrix._31 = 0.000000 myMatrix._32 = 0.000000 myMatrix._33 = 1.000080 myMatrix._34 = 1.000000
myMatrix._41 = 0.000000 myMatrix._42 = 0.000000 myMatrix._43 = -0.080006 myMatrix._44 = 0.000000
 
Logging Vector: 840.00 525.00 1.63 -> Stride = 60
In a DX9 game, 2D textures like loading screens, backgrounds etc. are also 3D objects.

A simple vertex quad is created

and on this quad the texture is mapped.
Before this mapping the quad is scaled and moved in screen space, this gives the advantage to set size and position of a texture without resizing the texture itself.

My log now tells me that the loading texture has Stride_nr = 0 and the main menu Stride_nr = 60.

The rest is some "dirty" cooding stuff (also used by cheat developers to make wall hacks, aim-bots etc.)

in short:
- detect when a particular stride is prepared to display
- manipulate the matrix
Seeadler is offline   Reply With Quote
Old 03-20-10, 09:34 PM   #112
Rubini
Ocean Warrior
 
Join Date: May 2005
Location: São Paulo Brazil
Posts: 2,728
Downloads: 132
Uploads: 0
Default

Quote:
Originally Posted by Seeadler View Post
...
My log now tells me that the loading texture has Stride_nr = 0 and the main menu Stride_nr = 60.

The rest is some "dirty" cooding stuff (also used by cheat developers to make wall hacks, aim-bots etc.)

in short:
- detect when a particular stride is prepared to display
- manipulate the matrix
WOW!
That is enough! This is all up to you!

Well, really, all the screens that have this condition plus the nav and Attack map (probably the same issue) we can not make so much than add something to the right side for now. They are totally playable and we yet have that new space anyway.
__________________
One gamer's must-have mod is another gamer's waste of time.
-Sailor Steve
Rubini is offline   Reply With Quote
Old 03-21-10, 06:28 AM   #113
Fender74
Helmsman
 
Join Date: Mar 2005
Location: Manchester
Posts: 102
Downloads: 70
Uploads: 0
Default

Quote:
Originally Posted by R3D View Post
every resolution i use results in CTD on launch?

ATi 1900xtx. so this widescreen mod is just liek the old one that never worked on ATI cards?

might wanna to put "ATI Users run away" in your thread title
i get the same ctd on start up,maybe someone who's got it working on an ati card could post there computer specs?
__________________

Fender74 is offline   Reply With Quote
Old 03-21-10, 11:13 AM   #114
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

Quote:
Originally Posted by Fender74 View Post
i get the same ctd on start up,maybe someone who's got it working on an ati card could post there computer specs?
get this dll version
http://www.mediafire.com/file/emummn...beta_debug.zip

1. in the d3d9.ini set
DebugLog=true
and your native monitor res

2. start SH3

3. open shwidescreen.log (in same folder as SH3.exe)
and post the log content here

perhaps I can see what the problem is?
Seeadler is offline   Reply With Quote
Old 03-21-10, 01:13 PM   #115
Gunnodayak
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Quote:
Originally Posted by Fender74 View Post
i get the same ctd on start up,maybe someone who's got it working on an ati card could post there computer specs?
AMD Athlon II X2 240 2.80 GHz processor, 4.00 GB Zeppellin RAM memory, Sapphire ATI Radeon 5770 1024 GB video card, Acer P221W 22 inch wide monitor, Windows 7 Ultimate 64 operating system, it works well.
  Reply With Quote
Old 03-21-10, 02:34 PM   #116
R3D
Gunner
 
Join Date: Mar 2005
Posts: 91
Downloads: 88
Uploads: 0
Default

Quote:
Originally Posted by Seeadler View Post
get this dll version
http://www.mediafire.com/file/emummn...beta_debug.zip

1. in the d3d9.ini set
DebugLog=true
and your native monitor res

2. start SH3

3. open shwidescreen.log (in same folder as SH3.exe)
and post the log content here

perhaps I can see what the problem is?
any idea?

1360x768 is my native res.
------------------------------------
Main::ReadConfig()
------------------------------------
ini Global DebugLog = 1
ini Global Screenshot = 0
ini Engine DisplayWidth = 1360
ini Engine DisplayHeight = 768
ini Input Key Menu = -1
ini Input Key Effects = -1
ini Input Key Screens = -1
ini Effect ShaderPath =
ini Effect SkyShader = 0
ini Effect CloudShader = 0
ini Effect WaterShader = 0


---------------------
SH widescreen dll loaded
---------------------

---------------------
SH widescreen dll loaded
---------------------
R3D is offline   Reply With Quote
Old 03-21-10, 03:09 PM   #117
Seeadler
Pacific Aces Dev Team
 
Join Date: Mar 2001
Location: Northern Germany
Posts: 1,096
Downloads: 169
Uploads: 0


Default

Quote:
Originally Posted by R3D View Post
any idea?
if there is no
Direct3DCreate9(32) succeeded...
or
Direct3DCreate9(32) failed...

in the log file, than something on your system prevent the dll from creating a D3D9 device, hard to say what it is?

DirectX9c is the latest version of 05/02/2010?
http://www.microsoft.com/downloads/d...displaylang=en
__________________
--
Vapor-ware is always easier to sell because there's no limit what it can do!
Seeadler is offline   Reply With Quote
Old 03-21-10, 03:18 PM   #118
R3D
Gunner
 
Join Date: Mar 2005
Posts: 91
Downloads: 88
Uploads: 0
Default

hence why i am tearing my hair out lol. just cant figure this out, ive disabled all antivirus and system tray apps , nothing running in backround etc etc.

just wont work.. i dont get it

would you be able to read the error report and know from that?

latest DX9c installed and latest Cat's, still no joy

Last edited by R3D; 03-21-10 at 03:32 PM.
R3D is offline   Reply With Quote
Old 03-21-10, 08:56 PM   #119
Flopper
Weps
 
Join Date: Jan 2010
Location: Asheville, NC, USA
Posts: 356
Downloads: 107
Uploads: 0
Default

Quote:
Originally Posted by R3D View Post
hence why i am tearing my hair out lol. just cant figure this out, ive disabled all antivirus and system tray apps , nothing running in backround etc etc.

just wont work.. i dont get it

would you be able to read the error report and know from that?

latest DX9c installed and latest Cat's, still no joy
Are you on XP SP2? I had to install the Microsoft Windows Application Compatibility Toolkit and enable DelayDLLInit as described here:

http://alexbret.perso.cegetel.net/in...lay_Resolution

Well, I don't know that I had to, but I did, and right after that instead of a CTD it would give me the message, "Can not initialize 3d engine." At that point I only had to fiddle with it a few more hours before it worked.

Good luck!
__________________

Flopper is offline   Reply With Quote
Old 03-22-10, 12:11 AM   #120
Reece
CINC Pacific Fleet
 
Reece's Avatar
 
Join Date: Sep 2003
Location: Down Under
Posts: 32,779
Downloads: 171
Uploads: 0
Default

Have now done the 3 main dials, Nav map, and now attack map:

If anyone wants to use/test etc here is a download link, the readme has the installation instructions:
http://www.filefront.com/15897935/WS...ls_adjust.rar/
Please let me know how it goes in case I stuffed it up!!
Note that you have to install Seeadler's WS mod with cfg file set to 1360 x 768 resolution.
__________________

Sub captains go down with their ship!
Reece 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

Forum Jump


All times are GMT -5. The time now is 06:52 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright © 1995- 2024 Subsim®
"Subsim" is a registered trademark, all rights reserved.