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 > SH5 Mods Workshop
Forget password? Reset here

Reply
 
Thread Tools Display Modes
Old 02-16-14, 11:54 AM   #2251
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Open both of them up with the app at the same time. The app does allow you to open multiple GR2 files at once.
Thank you! I had never realized that before LOL
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-22-14, 04:46 AM   #2252
tonschk
Admiral
 
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
Default

Hello thank you very much for your help , I hope you don't mind I paste here you advice about the shadows bone settings of PM message, can you tell me please where is the " ExtendedData" "MaxProperties" header and CastShadows/ReceiveShadows when using your GR2 Editor/Viewer for the UZO Binoculars of the conning tower ?, as we can see in the screen below, the dynamic shadows of the binoculars are " apparently missing" I need to find why the UZO is not casting shadows simultaneously with the other shadows on the conning tower, thank you for the help

It's a setting for the item's bone. You'll need to edit the ExtendedData of the bone using my GR2 Editor/Viewer. You're looking for the MaxProperties header and the entries CastShadows and ReceiveShadows. Those should both be set to 1.





I cannot find where is the UZO within the submarine files
__________________
What we do in life echoes in Eternity

Last edited by tonschk; 02-22-14 at 08:11 AM.
tonschk is offline   Reply With Quote
Old 02-22-14, 02:56 PM   #2253
Vanilla
Lieutenant
 
Join Date: Nov 2006
Location: St. Petersburg, Russia
Posts: 264
Downloads: 72
Uploads: 0
Default

@ tonschk,

Subs (and many units) are 'constructed' from many parts in-game. That is the main 'sub' GR2 holds only the basic hull of the sub, then different parts (like interiors of the rooms) are taken from other files/folders. The folder on your screenshot holds interiors of the rooms.

UZO (and other sensors): ../SH5/data/Objects/Sensors/UBoot_Sensors.GR2
General crew binoculars (and other things they can have like rifles, oxy masks, helmets etc.) are in: ../SH5/data/Characters/CharacterBodyParts.GR2
Conning towers: ../SH5/data/Submarine/<SUB_YOU_NEED>/Submarine Parts/Conning_7<SUB_LETTER>_01.GR2
Vanilla is offline   Reply With Quote
Old 02-22-14, 03:15 PM   #2254
tonschk
Admiral
 
Join Date: Mar 2007
Posts: 2,200
Downloads: 172
Uploads: 0
Default

Amazing , Thank you a Lot Vanilla

Hi there, I try to open SH5/data/Objects/Sensors/UBoot_Sensors.GR2 and the application give me an error

__________________
What we do in life echoes in Eternity

Last edited by tonschk; 02-22-14 at 03:26 PM.
tonschk is offline   Reply With Quote
Old 02-22-14, 08:50 PM   #2255
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by tonschk View Post
Amazing , Thank you a Lot Vanilla

Hi there, I try to open SH5/data/Objects/Sensors/UBoot_Sensors.GR2 and the application give me an error
This must be because you have New UI's/IRAI enabled. Their copy of UBoot_Sensors.GR2 has a CRC error which prevents GR2 Editor from opening it. I think TDW hex-edited the name of one of its bones the hard way (It is a radar cfg bone placed on the snorkel IIRC), way before he started working on GR2 Editor.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-23-14, 12:30 AM   #2256
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
This must be because you have New UI's/IRAI enabled. Their copy of UBoot_Sensors.GR2 has a CRC error which prevents GR2 Editor from opening it. I think TDW hex-edited the name of one of its bones the hard way (It is a radar cfg bone placed on the snorkel IIRC), way before he started working on GR2 Editor.
Incorrect. That's one of the beautiful things about the app - it doesn't care what the CRC value is when it reads in the file. When it goes to write the file it will write the correct CRC value thus correcting any problems with the CRC value.

The error(s) he's getting is due to mixed values being found in Section 0. I haven't figured out exactly what they are for yet.
TheDarkWraith is offline   Reply With Quote
Old 02-23-14, 02:20 PM   #2257
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
Incorrect. That's one of the beautiful things about the app - it doesn't care what the CRC value is when it reads in the file. When it goes to write the file it will write the correct CRC value thus correcting any problems with the CRC value.
Sorry, my mistake. For some reason I was convinced that GR2 Editor would open the stock UBoot_Sensors.GR2

This means that no complex fixes/changes can be performed on that file. The good news is that not only the latest version of your editor is safer than ever: it is also able to detect and fix some minor bugs

Quote:
Originally Posted by TheDarkWraith View Post
The error(s) he's getting is due to mixed values being found in Section 0. I haven't figured out exactly what they are for yet.
Thinking out loud, I wonder if GR2 Editor could still extract and export vertices and texture/material data from GR2 files with unknown format. This way we could grab their meshes, and import them in a second file
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-23-14, 02:33 PM   #2258
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Sorry, my mistake. For some reason I was convinced that GR2 Editor would open the stock UBoot_Sensors.GR2

This means that no complex fixes/changes can be performed on that file. The good news is that not only the latest version of your editor is safer than ever: it is also able to detect and fix some minor bugs

Thinking out loud, I wonder if GR2 Editor could still extract and export vertices and texture/material data from GR2 files with unknown format. This way we could grab their meshes, and import them in a second file
It used to be able to open the UBoot_Sensors.GR2 file. That was before I gave it some new 'rules' it has to follow. These new 'rules' are looking for things I a) haven't seen before or b) don't know what they are.

The current version is much more safer due to the new 'rules' it has to follow. The Sentinel for each file is doing it's job very well

It's a crapshoot as to whether the app can open non-SH5 files. If the non-SH5 files follow the 'rules' I have defined for the app then it will open them. If not then it will tell you why it can't open the file. Let me know when you get these so I can see what's going on and improve the app.


v1.1.442.1 released. See post #1
Major change in this version is I finally made the reader multi-threaded. Loading times are greatly decreased now
TheDarkWraith is offline   Reply With Quote
Old 02-23-14, 05:33 PM   #2259
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default Oddities about some GR2 files (model subparts placement)

Junkers_Ju-87B_Stuka_LOD.GR2

I don't know if it is me, but when I look at the stock Stuka in game (from some distance), her rudder is always rendered several meters to the back of plane's tail. When I move the camera closer to the bomber, the problem disappears though. I was sure that the problem was due to a misplacement of the rudder in the LOD model, but neither GR2 Editor, nor Goblin Editor, nor Granny Viewer show anything wrong with it...


Bristol_Beaufort.GR2

The other day I was looking into why Beaufort's rear gun fires as if it was a front gun, as reported by Serge. I was conviced that rotating gun's bone by 180 deg, would have solved the problem but I then realized that it might be more complex than I thought at first.

A foreword:
both for the main and for the LOD GR2 files, the gun is composed by a turret model, and by a barrel model. Their bones have position data but not rotation data and, as expected, barrels' bone is child of turret node.

What I have discovered:
  • When opened in GR2 Editor and in Goblin Editor, Bristol_Beaufort.GR2 looks perfectly normal. I have exported its meshes, and imported them in Wings3d and, again, every part is in its own place. Open the same file in Goblin Editor though, and the gun barrels are out of place and pointing to the wrong direction.

  • The next step was looking into Beaufort's LOD model. Gun barrel position settings were identical to the ones of the main model (checked in GR2 Editor), but this time everything looked normal in Goblin.

  • Using GR2 Edtor I then changed x, y and z position and rotation data of main model's barrel bone, saved, and loaded the file in Goblin. Nothing changed. Position/rotation data do nothing apparently.

  • Did the same as before with the turret bone. As before, I expected my changes to do nothing but, to my surprise, the turret had changed position in Goblin.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-23-14, 06:05 PM   #2260
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Junkers_Ju-87B_Stuka_LOD.GR2

I don't know if it is me, but when I look at the stock Stuka in game (from some distance), her rudder is always rendered several meters to the back of plane's tail. When I move the camera closer to the bomber, the problem disappears though. I was sure that the problem was due to a misplacement of the rudder in the LOD model, but neither GR2 Editor, nor Goblin Editor, nor Granny Viewer show anything wrong with it...


Bristol_Beaufort.GR2

The other day I was looking into why Beaufort's rear gun fires as if it was a front gun, as reported by Serge. I was conviced that rotating gun's bone by 180 deg, would have solved the problem but I then realized that it might be more complex than I thought at first.

A foreword:
both for the main and for the LOD GR2 files, the gun is composed by a turret model, and by a barrel model. Their bones have position data but not rotation data and, as expected, barrels' bone is child of turret node.

What I have discovered:
  • When opened in GR2 Editor and in Goblin Editor, Bristol_Beaufort.GR2 looks perfectly normal. I have exported its meshes, and imported them in Wings3d and, again, every part is in its own place. Open the same file in Goblin Editor though, and the gun barrels are out of place and pointing to the wrong direction.
  • The next step was looking into Beaufort's LOD model. Gun barrel position settings were identical to the ones of the main model (checked in GR2 Editor), but this time everything looked normal in Goblin.
  • Using GR2 Edtor I then changed x, y and z position and rotation data of main model's barrel bone, saved, and loaded the file in Goblin. Nothing changed. Position/rotation data do nothing apparently.
  • Did the same as before with the turret bone. As before, I expected my changes to do nothing but, to my surprise, the turret had changed position in Goblin.
The value of the flags determines whether the app/game/goblin uses any of the position, rotation, and/or scaling values. It's a bit-array value. Thus:
- 0x1 = position data
- 0x2 = rotation data
- 0x4 = scale/shear data

If you want the bone to have position and rotation then the flags value needs to be 0x3 (0x1 position + 0x2 rotation)
TheDarkWraith is offline   Reply With Quote
Old 02-23-14, 06:40 PM   #2261
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Quote:
Originally Posted by TheDarkWraith View Post
The value of the flags determines whether the app/game/goblin uses any of the position, rotation, and/or scaling values. It's a bit-array value. Thus:
- 0x1 = position data
- 0x2 = rotation data
- 0x4 = scale/shear data

If you want the bone to have position and rotation then the flags value needs to be 0x3 (0x1 position + 0x2 rotation)
Sure:

Quote:
Originally Posted by gap View Post
both for the main and for the LOD GR2 files, the gun is composed by a turret model, and by a barrel model. Their bones have position data but not rotation data.
Turret and gun barrel bones for both main and LOD models have a 0x1 flag (position data) by stock settings. When I altered their position/rotation, I made sure to change it to 0x3 (position and rotation data). Position/rotation data were applied by Goblin editor for all the bones, except for main model's gun barrels (the misplaced ones)

Quote:
Originally Posted by TheDarkWraith View Post
It used to be able to open the UBoot_Sensors.GR2 file.
Okay, so we can open the "unk" files using an old version of your editor. If it isn't too much work for you, it would be nice if your next release was able again to open them, but with a warning message, and the "save" option disabled.

Quote:
Originally Posted by TheDarkWraith View Post
v1.1.442.1 released. See post #1
Major change in this version is I finally made the reader multi-threaded. Loading times are greatly decreased now
__________________
_____________________
|May the Force be with you!|
...\/

Last edited by gap; 02-23-14 at 06:51 PM.
gap is offline   Reply With Quote
Old 02-23-14, 07:33 PM   #2262
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

@ TDW

(yet) another question.

Do you happen to know what file(s) are character parts (head, torso, legs, hat, etc.) stored in? Should be CharacterBodyParts.GR2, I suppose, but I wasn't able to open that file with the latest version of GR2 Editor.

I ask because I have noticed that one of the parts (the low poly rifle carried on character's shoulders, unused in stock game) is rendered white in Goblin Editor. It was the same with the Willys Jeep cargo model, and it turned out that though being UV-mapped and having a texture/material assigned in its GR2 file, devs had forgot to add the texture in game (which I did ). If I could figure out texture name and UV mapping of that rifle, I could fix it for future usage in game (I wanted to use it on the lookout character I need for my pillbox unit).
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-23-14, 09:52 PM   #2263
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
@ TDW

(yet) another question.

Do you happen to know what file(s) are character parts (head, torso, legs, hat, etc.) stored in? Should be CharacterBodyParts.GR2, I suppose, but I wasn't able to open that file with the latest version of GR2 Editor.
Opens just fine in current version. In fact it opens incredibly faster than other versions Just click OK to the image error boxes.
TheDarkWraith is offline   Reply With Quote
Old 02-24-14, 05:31 PM   #2264
gap
Navy Seal
 
Join Date: Jan 2011
Location: CJ8937
Posts: 8,214
Downloads: 793
Uploads: 10
Default

Hi TDW,

with the latest version of your editor I get the following unmanaged exception whenever I maximize its window:

Code:
Le informazioni su come richiamare il debug JIT (Just-In-Time) anziché questa finestra
sono riportate in fondo al messaggio.

************** Testo dell'eccezione **************
System.NullReferenceException: Riferimento a un oggetto non impostato su un'istanza di oggetto.
   in Microsoft.DirectX.Direct3D.Font.OnLostDevice()
   in Microsoft.DirectX.Direct3D.Font.OnParentLost(Object sender, EventArgs e)
   in System.EventHandler.Invoke(Object sender, EventArgs e)
   in Microsoft.DirectX.Direct3D.Device.raise_DeviceLost(Object i1, EventArgs i2)
   in Microsoft.DirectX.Direct3D.Device.Reset(PresentParameters[] presentationParameters)
   in Microsoft.DirectX.Direct3D.Device.OnParentResized(Object sender, EventArgs e)
   in System.EventHandler.Invoke(Object sender, EventArgs e)
   in System.Windows.Forms.Control.OnResize(EventArgs e)
   in System.Windows.Forms.Panel.OnResize(EventArgs eventargs)
   in System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
   in System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
   in System.Windows.Forms.Control.UpdateBounds()
   in System.Windows.Forms.Control.WmWindowPosChanged(Message& m)
   in System.Windows.Forms.Control.WndProc(Message& m)
   in System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
   in System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   in System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Assembly caricati **************
mscorlib
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.5477 (Win7SP1GDR.050727-5400)
    Base di codice: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
GR2EditorViewer
    Versione assembly: 1.1.442.1
    Versione Win32: 1.1.442.1
    Base di codice: file:///C:/Ubisoft/Silent%20Hunter%205/GR2EditorViewer_v_1_1_442_1-2/GR2EditorViewer.exe
----------------------------------------
System.Windows.Forms
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.5468 (Win7SP1GDR.050727-5400)
    Base di codice: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    Base di codice: file:///C:/Windows/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.5467 (Win7SP1GDR.050727-5400)
    Base di codice: file:///C:/Windows/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.DirectX.Direct3D
    Versione assembly: 1.0.2902.0
    Versione Win32: 9.05.132.0000
    Base di codice: file:///C:/Windows/assembly/GAC/Microsoft.DirectX.Direct3D/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.Direct3D.dll
----------------------------------------
Microsoft.DirectX
    Versione assembly: 1.0.2902.0
    Versione Win32: 5.04.00.2904
    Base di codice: file:///C:/Windows/assembly/GAC/Microsoft.DirectX/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.dll
----------------------------------------
Microsoft.DirectX.DirectInput
    Versione assembly: 1.0.2902.0
    Versione Win32: 5.04.00.2904
    Base di codice: file:///C:/Windows/assembly/GAC/Microsoft.DirectX.DirectInput/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.DirectInput.dll
----------------------------------------
Microsoft.VisualC
    Versione assembly: 8.0.0.0
    Versione Win32: 8.00.50727.4927
    Base di codice: file:///C:/Windows/assembly/GAC_MSIL/Microsoft.VisualC/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualC.dll
----------------------------------------
System.Xml
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
    Base di codice: file:///C:/Windows/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
mscorlib.resources
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.5477 (Win7SP1GDR.050727-5400)
    Base di codice: file:///C:/Windows/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
System.Core
    Versione assembly: 3.5.0.0
    Versione Win32: 3.5.30729.5420 built by: Win7SP1
    Base di codice: file:///C:/Windows/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
System.Configuration
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.5476 (Win7SP1GDR.050727-5400)
    Base di codice: file:///C:/Windows/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
Microsoft.DirectX.Direct3DX
    Versione assembly: 1.0.2902.0
    Versione Win32: 5.04.00.3900
    Base di codice: file:///C:/Windows/assembly/GAC/Microsoft.DirectX.Direct3DX/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.Direct3DX.dll
----------------------------------------
System.Windows.Forms.resources
    Versione assembly: 2.0.0.0
    Versione Win32: 2.0.50727.5420 (Win7SP1.050727-5400)
    Base di codice: file:///C:/Windows/assembly/GAC_MSIL/System.Windows.Forms.resources/2.0.0.0_it_b77a5c561934e089/System.Windows.Forms.resources.dll
----------------------------------------

************** Debug JIT **************
Per attivare il debug JIT, è necessario impostare il valore
jitDebugging nella sezione system.windows.forms del file di configurazione
dell'applicazione o del computer (machine.config).
L'applicazione inoltre deve essere compilata con il debug
attivato.

Ad esempio:

<configuration>
    <system.windows.forms jitDebugging="true" />
</configuration>

Quando il debug JIT è attivato, tutte le eccezioni non gestite
vengono inviate al debugger JIT registrato nel computer,
anziché essere gestite da questa finestra di dialogo.
__________________
_____________________
|May the Force be with you!|
...\/
gap is offline   Reply With Quote
Old 02-24-14, 08:35 PM   #2265
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by gap View Post
Hi TDW,

with the latest version of your editor I get the following unmanaged exception whenever I maximize its window:

v1.1.443.1 released. See post #1

This fixes the bug gap reported above
TheDarkWraith 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 12:06 AM.


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.