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

Reply
 
Thread Tools Display Modes
Old 12-19-24, 02:10 AM   #1
Senf-Man82
Gunner
 
Join Date: Aug 2014
Location: Wilhelmshaven
Posts: 100
Downloads: 419
Uploads: 0
Default OBJ-Import error

Hi folks,

I am trying to import a fixed OBJ-file into my .dat and I keep getting this weird error message:

startIndex cannot be less than zero:

>>

System.ArgumentOutOfRangeException: StartIndex darf nicht kleiner als Null sein.
Parametername: startIndex
bei System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
bei System.String.Substring(Int32 startIndex)
bei e3.a(String A_0, IList`1& A_1)
bei c.w()
bei gv.c(Object A_0, LinkLabelLinkClickedEventArgs A_1)
bei System.Windows.Forms.LinkLabel.OnLinkClicked(LinkL abelLinkClickedEventArgs e)
bei System.Windows.Forms.LinkLabel.OnMouseUp(MouseEven tArgs e)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.Label.WndProc(Message& m)
bei System.Windows.Forms.LinkLabel.WndProc(Message& msg)
bei System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
<<

I tried to alter every possible export setting from Blender, but it keeps happening :/
Senf-Man82 is offline   Reply With Quote
Old 12-19-24, 09:22 AM   #2
iambecomelife
Silent Hunter
 
Join Date: Apr 2005
Posts: 4,744
Downloads: 303
Uploads: 0


Default

Quote:
Originally Posted by Senf-Man82 View Post
Hi folks,

I am trying to import a fixed OBJ-file into my .dat and I keep getting this weird error message:

startIndex cannot be less than zero:

>>

System.ArgumentOutOfRangeException: StartIndex darf nicht kleiner als Null sein.
Parametername: startIndex
bei System.String.InternalSubStringWithChecks(Int32 startIndex, Int32 length, Boolean fAlwaysCopy)
bei System.String.Substring(Int32 startIndex)
bei e3.a(String A_0, IList`1& A_1)
bei c.w()
bei gv.c(Object A_0, LinkLabelLinkClickedEventArgs A_1)
bei System.Windows.Forms.LinkLabel.OnLinkClicked(LinkL abelLinkClickedEventArgs e)
bei System.Windows.Forms.LinkLabel.OnMouseUp(MouseEven tArgs e)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.Label.WndProc(Message& m)
bei System.Windows.Forms.LinkLabel.WndProc(Message& msg)
bei System.Windows.Forms.Control.ControlNativeWindow.O nMessage(Message& m)
bei System.Windows.Forms.Control.ControlNativeWindow.W ndProc(Message& m)
bei System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
<<

I tried to alter every possible export setting from Blender, but it keeps happening :/
Did you make sure the entire model is textured? If even one polygon is untextured, the import via Silent 3ditor will not work.

Also, how many polygons is the model? Silent 3ditor will usually give error messages when you try to import items of more than 35,000 - 40,000 polygons. For that reason, I usually separate the hull and superstructure of my ships as different objects.
iambecomelife is offline   Reply With Quote
Old 12-19-24, 12:12 PM   #3
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 4,242
Downloads: 149
Uploads: 0


Default

Perhaps provide the obj file/files so We can check them.
You might have different counts in V between the main obj and AO obj.
S3D don't like that!
Jeff-Groves is offline   Reply With Quote
Old 12-23-24, 08:32 AM   #4
Senf-Man82
Gunner
 
Join Date: Aug 2014
Location: Wilhelmshaven
Posts: 100
Downloads: 419
Uploads: 0
Default

Quote:
Originally Posted by Jeff-Groves View Post
Perhaps provide the obj file/files so We can check them.
You might have different counts in V between the main obj and AO obj.
S3D don't like that!

It is simply the hull model from the 641-Foxtrot Sub published here many many years ago.


I only exported it from S3D into Blender to slightly correct its orientation. After export from Blender (trying out numerous settings) upon reimport in S3D that error message keeps occuring.
Senf-Man82 is offline   Reply With Quote
Old 12-23-24, 11:36 AM   #5
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 4,242
Downloads: 149
Uploads: 0


Default

Quote:
Originally Posted by Senf-Man82 View Post
It is simply the hull model from the 641-Foxtrot Sub published here many many years ago.


I only exported it from S3D into Blender to slightly correct its orientation. After export from Blender (trying out numerous settings) upon reimport in S3D that error message keeps occuring.
Without the obj files that you did? I can't help you. Sorry.
Jeff-Groves is offline   Reply With Quote
Old 12-23-24, 12:52 PM   #6
Senf-Man82
Gunner
 
Join Date: Aug 2014
Location: Wilhelmshaven
Posts: 100
Downloads: 419
Uploads: 0
Default

Quote:
Originally Posted by Jeff-Groves View Post
Without the obj files that you did? I can't help you. Sorry.

I have no option to attach them here, are you on discord subsim? I tried to do the required x-axis rotation in S3D, but the game keeps ignoring in. I don't suppose there is a function to apply rotation in (so new value goes "0") in S3D?
Senf-Man82 is offline   Reply With Quote
Old 12-23-24, 01:00 PM   #7
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 4,242
Downloads: 149
Uploads: 0


Default

You can send the files through email if you want.
I'll PM you my email address.
Jeff-Groves is offline   Reply With Quote
Old 12-23-24, 02:00 PM   #8
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 10,245
Downloads: 466
Uploads: 4


Default

Quote:
Originally Posted by Senf-Man82 View Post
It is simply the hull model from the 641-Foxtrot Sub published here many many years ago.


I only exported it from S3D into Blender to slightly correct its orientation. After export from Blender (trying out numerous settings) upon reimport in S3D that error message keeps occuring.
Check your import / export settings in Blender Senf-Man82. You might notice that Blender imports with the boat looking to be setting on its tail. When you export, it might lay it flat on its hull, plus there are the the other settings that matter in the export dialog. I'll see if I can find mine here in a bit... Nothing too difficult, just frustrating to get set correctly.
__________________

"...and bollocks to the naysayers" - Jimbuna
propbeanie is offline   Reply With Quote
Old 12-23-24, 02:15 PM   #9
Jeff-Groves
GLOBAL MODDING TERRORIST
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 4,242
Downloads: 149
Uploads: 0


Default

I don't believe his is a matter of X or Y up.
It's a total failure to import. I think it's a mismatch of Verts between the main obj file and the AO obj file.
That's an easy mistake to make for newer users of S3D.

You can set Blender to Import with the Y axis as up to avoid that standing on tail thing you know.
Do I need to get my box of crayons out and draw a picture?

Jeff-Groves is offline   Reply With Quote
Old 12-23-24, 02:20 PM   #10
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 10,245
Downloads: 466
Uploads: 4


Default

Quote:
Originally Posted by Jeff-Groves View Post
I don't believe his is a matter of X or Y up.
It's a total failure to import. I think it's a mismatch of Verts between the main obj file and the AO obj file.
That's an easy mistake to make for newer users of S3D.

You can set Blender to Import with the Y axis as up to avoid that standing on tail thing you know.
Exactly. You can also save the config you use for later recall, but remembering that at times is a bit of an old man bother... sigh
__________________

"...and bollocks to the naysayers" - Jimbuna
propbeanie is offline   Reply With Quote
Reply

Thread Tools
Display Modes

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 11:27 PM.


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