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 12-28-11, 04:13 PM   #361
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Have it where you can export certain subsets of a GR2 mesh now. Everything working well on the exporter. Wings3D crashes when it tries to open an obj file with too many verticies (King George V hull for example)
TheDarkWraith is offline   Reply With Quote
Old 12-28-11, 07:06 PM   #362
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Successful export of NVV and viewed in Wings3D:
TheDarkWraith is offline   Reply With Quote
Old 12-28-11, 08:28 PM   #363
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

v1.0.481.0 released. See post #1

You can now export meshes to OBJ format. You have the option as to whether the textures are made also.

Some things to note about the exporting:
- all exports come from what's in memory! This means that if you deform a mesh and you want to export that deformation without saving to file you can!
- when I allow you to deform textures the same thing will happen
- you currently can only export one mesh at a time (you can not export a whole model at a time)
- each export is assigned it's own .mtl file and .obj file
- exports are placed in ..\Exports\model name by default (a dialog box will pop up asking if you want to save to default location)
- textures are saved in TGA format
- stock SH5 meshes need the V coordinate flipped (so leave that checked!)
- be careful with stock SH5 textures as the alpha channel has data! Delete the alpha channel to render correctly (looks like junk in it anyways)
- currently only the first set of texture coordinates are exported. If someone can show me a document on how to export multiple texture coordinates in the OBJ format I'll be more than happy to add that ability
- the mesh's vertices, normals, and texture coordinates 0 are exported
- you have the ability to export specific subsets of a mesh. Whatever subsets are checked in the Meshes tab for that mesh are exported
- a mesh has to be visible (root node has to be checked in the Meshes tab) in order to export

I'm working on the importer now
TheDarkWraith is offline   Reply With Quote
Old 12-28-11, 08:48 PM   #364
Madox58
Stowaway
 
Posts: n/a
Downloads:
Uploads:
Default

Export the same mesh but assign the 2nd set of UV's.
Then add AO to the name.obj
Easiest and most cross application friendly way.
  Reply With Quote
Old 12-28-11, 09:28 PM   #365
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by privateer View Post
Export the same mesh but assign the 2nd set of UV's.
Then add AO to the name.obj
Easiest and most cross application friendly way.
Easy enough

I'd rather have it all in one. That's one reason I don't like the OBJ format.

Forgot to add the bump map to the .mtl files. Will be available in next version
TheDarkWraith is offline   Reply With Quote
Old 12-29-11, 12:37 AM   #366
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

v1.0.483.0 released. See post #1

You now have the option to export the AO also (if the mesh has 2nd texture coordinates and AO map)

If mesh has normal bump map then entries added to .mtl file denoting this. Also adds the normal bump map to the export folder.
TheDarkWraith is offline   Reply With Quote
Old 12-29-11, 03:13 PM   #367
kovall
Mate
 
Join Date: Apr 2010
Location: Russia. St.Petersburg
Posts: 51
Downloads: 184
Uploads: 0
Default

I tried open GR2 Editor and...

value of 35 is not valid for Value 35. Value should be between Minimum and Maximum.
Parameter name: Value


See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.ArgumentOutOfRangeException: Value of '35' is not valid for 'Value'. 'Value' should be between 'Minimum' and 'Maximum'.
Parameter name: Value
at System.Windows.Forms.NumericUpDown.set_Value(Decim al value)
at TheDarkWraith.SilentHunter5.GR2EditorViewer.SetCfg FileEntries(Boolean verbose)
at TheDarkWraith.SilentHunter5.GR2EditorViewer.GR2Edi torViewer_Shown(Object sender, EventArgs e)
at System.Windows.Forms.Form.OnShown(EventArgs e)
at System.Windows.Forms.Form.CallShownEvent()
at System.Windows.Forms.Control.InvokeMarshaledCallba ckDo(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallba ckHelper(Object obj)
at System.Threading.ExecutionContext.runTryCode(Objec t userData)
at System.Runtime.CompilerServices.RuntimeHelpers.Exe cuteCodeWithGuaranteedCleanup(TryCode code, CleanupCode backoutCode, Object userData)
at System.Threading.ExecutionContext.RunInternal(Exec utionContext executionContext, ContextCallback callback, Object state)
at System.Threading.ExecutionContext.Run(ExecutionCon text executionContext, ContextCallback callback, Object state)
at System.Windows.Forms.Control.InvokeMarshaledCallba ck(ThreadMethodEntry tme)
at System.Windows.Forms.Control.InvokeMarshaledCallba cks()


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
GR2EditorViewer
Assembly Version: 1.0.483.0
Win32 Version: 1.0.483.0
CodeBase: file:///D:/GR2/GR2EditorViewer.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.DirectX.Direct3DX
Assembly Version: 1.0.2902.0
Win32 Version: 5.04.00.3900
CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.Direct3DX/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.Direct3DX.dll
----------------------------------------
Microsoft.DirectX.Direct3D
Assembly Version: 1.0.2902.0
Win32 Version: 9.05.132.0000
CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.Direct3D/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.Direct3D.dll
----------------------------------------
System.Core
Assembly Version: 3.5.0.0
Win32 Version: 3.5.30729.1 built by: SP
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Microsoft.DirectX
Assembly Version: 1.0.2902.0
Win32 Version: 5.04.00.2904
CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.dll
----------------------------------------
Microsoft.VisualC
Assembly Version: 8.0.0.0
Win32 Version: 8.00.50727.3053
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualC/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualC.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

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

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.


What is my problem ?

Last edited by kovall; 12-29-11 at 03:25 PM.
kovall is offline   Reply With Quote
Old 12-29-11, 06:32 PM   #368
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by kovall View Post
I tried open GR2 Editor and...

value of 35 is not valid for Value 35. Value should be between Minimum and Maximum.
Parameter name: Value
I always forget about those not using the American way of decimal notation. Darn localizations I will fix.


This does not include the fix:

v1.0.486.0 released. See post #1

You now have limited import ability. What I mean by limited is:

the OBJ file you pick to import into a mesh has to have:
- the same number of subsets (defined with g) as the current mesh
- the same number of materials (defined with usemtl) as the current mesh
- each subset should have the same indice order as the current mesh
- each subset should have the same number of faces (and thus vertices) as current mesh (within a g block these are defined with f)

The OBJ file does not have to have normals specified. It does have to have vertices and texture coordinates specified. If normals are not specified then the existing normals in the mesh for each vertice will be used. I am NOT recalcuting the binormal or tangent vectors currently.

This allows you to export a mesh, open up in 3D modeller program, make changes to it (deform it while keeping vertice count for each subset the same and number of subsets the same, change texture coordinates (re-uv map it, etc) and then import it back into the mesh. Then press File-->Save to save to GR2 file.

I have more work to do on it. My end goal is:
- allowing you to change almost everything relating to the mesh

I have many things to work out before I can do this

I want to make sure that this part of the importer is working solid before adding to it.
TheDarkWraith is offline   Reply With Quote
Old 12-29-11, 07:45 PM   #369
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

v1.0.487.1 released. See post #1

This fixes the localization problem posted a few posts up

Last edited by TheDarkWraith; 12-29-11 at 07:57 PM.
TheDarkWraith is offline   Reply With Quote
Old 12-30-11, 02:37 AM   #370
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Meet Franken-NVV:



Something look odd/different about this NVV? It should. I took the NLL and exported hull 03 out of it. Then I loaded NVV and imported the NLL's hull 03 into NVV hull 03 (notice that status text on the import) Each mesh had totally different number of vertices. You all can't do this yet as this version hasn't been released. This was a 'theory to practice' as they say in my line of work

As I've been working with the GR2 files I've noticed many things about them that can be exploited. This is using one of those exploits

TheDarkWraith is offline   Reply With Quote
Old 12-30-11, 06:56 AM   #371
urfisch
Sea Lord
 
Join Date: Mar 2005
Location: Deep down in Germany
Posts: 1,969
Downloads: 42
Uploads: 0
Default

import works...nice to know, keep up the good work, rb.
__________________


urfisch is offline   Reply With Quote
Old 12-30-11, 08:52 AM   #372
Echolot
Seasoned Skipper
 
Join Date: Mar 2010
Location: Berlin, Germany
Posts: 718
Downloads: 567
Uploads: 0
Thank you for the big amount of time and knowledge you put in this project, TDW.

Thank you too, privateer und all people supporting this project through testing and reporting.

SH5 is not dead, the child grows up.



Keep up the good work and a happy new year to you all.

Regards.

Echolt.
Echolot is offline   Reply With Quote
Old 12-30-11, 02:12 PM   #373
Sartoris
Captain
 
Join Date: May 2011
Posts: 489
Downloads: 106
Uploads: 0
Default

Wow, so much progress in this thread, it's amazing

I hope this means we'll soon see modders using TDW's new tool!
Sartoris is offline   Reply With Quote
Old 12-30-11, 04:07 PM   #374
MLF
Weps
 
Join Date: Sep 2002
Location: SW France
Posts: 361
Downloads: 137
Uploads: 0
Default

Quote:
Originally Posted by TheDarkWraith View Post
The app is set to run at 1200 X 1025.

That LODError is from a file. It appears you tried to load a file. It's something it read from the file.

I'd like to see the full DbgView output if possible. What I'd like to see from it is you run the app. After it's loaded don't try to load anything. Move the camera around with the mouse for a little bit. Then try to load a file. Ensure Debug is enabled (under Misc tab)

I might also code up something that will read your video card's capabilities and output it all to text file so I can see if there's something I've coded in thinking will work with anyone's video card that actually isn't and have you run it

Can you run my SH map viewer app found in \data\Applications of my UIs mod without problem?
Hi TDW

Sorry for the delay in replying - family chrimbo type things took over.

I have tried on a 3rd PC and also on a vmware install and same problem. Directly it loads and shows the "Mickey Mouse" screen it errors in the status window.

One time I got the following when exiting:-

See the end of this message for details on invoking
just-in-time (JIT) debugging instead of this dialog box.

************** Exception Text **************
System.NullReferenceException: Object reference not set to an instance of an object.
at TheDarkWraith.SilentHunter5.GR2File.HasBeenModifie d()
at TheDarkWraith.SilentHunter5.GR2EditorViewer.tsmiFi le_DropDownOpening(Object sender, EventArgs e)
at System.Windows.Forms.ToolStripDropDownItem.OnDropD ownShow(EventArgs e)
at System.Windows.Forms.ToolStripMenuItem.OnDropDownS how(EventArgs e)
at System.Windows.Forms.ToolStripDropDownItem.ShowDro pDownInternal()
at System.Windows.Forms.ToolStripDropDownItem.ShowDro pDown(Boolean mousePush)
at System.Windows.Forms.ToolStripMenuItem.OnMouseButt onStateChange(MouseEventArgs e, Boolean isMouseDown)
at System.Windows.Forms.ToolStripMenuItem.OnMouseDown (MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.HandleMouseDown (MouseEventArgs e)
at System.Windows.Forms.ToolStripItem.FireEventIntera ctive(EventArgs e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStripItem.FireEvent(Event Args e, ToolStripItemEventType met)
at System.Windows.Forms.ToolStrip.OnMouseDown(MouseEv entArgs mea)
at System.Windows.Forms.Control.WmMouseDown(Message& m, MouseButtons button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Mes sage& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.MenuStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3082 (QFE.050727-3000)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
GR2EditorViewer
Assembly Version: 1.0.477.0
Win32 Version: 1.0.477.0
CodeBase: file:///E:/GR2EditorViewerLatest/GR2EditorViewer.exe
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.3053 (netfxsp.050727-3000)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Microsoft.DirectX.Direct3DX
Assembly Version: 1.0.2902.0
Win32 Version: 5.04.00.3900
CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.Direct3DX/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.Direct3DX.dll
----------------------------------------
Microsoft.DirectX.Direct3D
Assembly Version: 1.0.2902.0
Win32 Version: 9.05.132.0000
CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX.Direct3D/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.Direct3D.dll
----------------------------------------
System.Core
Assembly Version: 3.5.0.0
Win32 Version: 3.5.21022.8 built by: RTM
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Core/3.5.0.0__b77a5c561934e089/System.Core.dll
----------------------------------------
Microsoft.DirectX
Assembly Version: 1.0.2902.0
Win32 Version: 5.04.00.2904
CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.DirectX/1.0.2902.0__31bf3856ad364e35/Microsoft.DirectX.dll
----------------------------------------
Microsoft.VisualC
Assembly Version: 8.0.0.0
Win32 Version: 8.00.50727.3053
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualC/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualC.dll
----------------------------------------

************** JIT Debugging **************
To enable just-in-time (JIT) debugging, the .config file for this
application or computer (machine.config) must have the
jitDebugging value set in the system.windows.forms section.
The application must also be compiled with debugging
enabled.

For example:

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

When JIT debugging is enabled, any unhandled exception
will be sent to the JIT debugger registered on the computer
rather than be handled by this dialog box.

I cannot run SH map viewer without erroring.

All in all I'm up the creek without a periscope which is a shame as this application looks like the works as far as adding new units, and modifying others.

Don't like the feeling I'm missing something...... What are the install instructions for the app - am I missing some dll or some-such.......

Regards

MLF
__________________
Je pense donc je fuis!
MLF is offline   Reply With Quote
Old 12-30-11, 05:33 PM   #375
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Franken-NVV was successfully saved to GR2 file and reloaded

It even passed the Granny Viewer test (it loaded and loaded correctly)

Such a simple exploit...
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 01:12 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.