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 11-27-23, 02:44 PM   #1
smm
The master
 
smm's Avatar
 
Join Date: Jan 2023
Posts: 69
Downloads: 9
Uploads: 0
Default S3D coordinates, conning tower

Hi,
I'm trying to export Gato sub via S3D-> Blender -> UE5. I exported most of the things ok, but have real trouble with conning tower bits and pieces coordinates coordinates.


Some items work ok, but some I just can't get going.
At the highest level, 2: Node Chiosc_NSS_Gato_04, there are already some coordinates set:
X: -0.01423397 Y: -0.00610776 Z: -0.6417547
Then, the conning tower model, 11: Node Chiosc_NSS_Gato_04 has another set of coordinates:
X: 0.0000000268221 Y: -0.2514915 Z: 0.1076843


And then the items themselves - like 44: Node B Capsule Munitie, which has XYZ esentially 0, but has 180deg rotations along X and Z axes. Except that it places the mesh nowhere near where it's in S3D. Same with Antenna.


Also, when I tried to get in the instruments, I'm confused. Instruments have their own coordinates (in sensor_sub_us.dat file), but there are also attachment points in the conning tower file itself (say 74: Node cfg#I01_NSS_Gato_Tower_04).


I could, of course, just place the meshes just somehow, but it feels wrong.. So any advice on how to calculate the position would be really welcome!



In Blender, I'm trying to follow the hierarchy from the obj file, and am using delta transforms.



--smm
smm is offline   Reply With Quote
Old 11-27-23, 08:12 PM   #2
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,749
Downloads: 439
Uploads: 2


Default

Using the SJ radar mast as an example, in the sub sensors file. The bottom of that device is "zero" if you will, but it will use the "off-set" of the node "mount location" in the Objects folder Conning_SubName_xx.dat file, such as R01 at x=-0.00001383275, y=0.1520841 and z=0.5852619 in the Balao conn... Same thing with deck guns (M01) or AA guns (A01), or even the conning tower itself mounting to F01 on the hull.
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 11-28-23, 02:43 AM   #3
smm
The master
 
smm's Avatar
 
Join Date: Jan 2023
Posts: 69
Downloads: 9
Uploads: 0
Default

Well, almost. I found that you need to switch the direction of the Y axis, so for example, I01 location is (to a second decimal)

X: 0.04 Y:0.64 Z:0.85
you need to change it to

X: 0.04 Y:-0.64 Z:0.85


Beats me. Similarly, in a few cases I found that the axes were switched, and sometimes one of the axes was scaled.



Duh.
smm is offline   Reply With Quote
Old 11-28-23, 08:07 AM   #4
propbeanie
CTD - it's not just a job
 
propbeanie's Avatar
 
Join Date: May 2016
Location: One hour from Music City USA!
Posts: 9,749
Downloads: 439
Uploads: 2


Default

There is a built-in "off-set" in the Sensors_Sub_US file (x, y, z coordinates), so you might have to "add" that off-set to the node's off-set. The irritating thing is that there is minimal consistency in the game for such, as you have found... Good luck with your endeavor!
__________________

"...and bollocks to the naysayer/s" - Jimbuna
propbeanie is offline   Reply With Quote
Old 11-28-23, 10:05 AM   #5
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

You need to back track to parent nodes placement values and add all of them to the object,
I01 goes back like 3 times until your at the start of values.
Just click on the Parent ID and you'll find them all.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 11-28-23, 02:57 PM   #6
smm
The master
 
smm's Avatar
 
Join Date: Jan 2023
Posts: 69
Downloads: 9
Uploads: 0
Default

I did that, and that still didn't work, or rather, it worked for some, but not other. TBH, I think the problem there is blender rather than S3D. The child object in Blender should be relative (with delta transforms) to the parent, but it's not always so.


I was parenting the objects when the transforms were still all 0, changing the transforms afterwars. For most of the objects it worked great, for some, it was just way off (TBT base for example had origin quite a few metres elsewhere than the persicope superstructure).



Nevertheless, I got it all now.



--smm
smm is offline   Reply With Quote
Old 11-28-23, 03:10 PM   #7
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

I'm not a Blender user so don't know what the problem is there.
I also don't use S3D to export the 3D meshes.
I use a different program that exports ALL the meshes in one pass.
Even that one does not account for all the offsets or rotations of a given part.

Every program out there ignores the Parent-Child-GrandChild-etc relationship.
__________________
I don't do Stupid. So don't ask.
Jeff-Groves is offline   Reply With Quote
Old 11-29-23, 04:20 AM   #8
smm
The master
 
smm's Avatar
 
Join Date: Jan 2023
Posts: 69
Downloads: 9
Uploads: 0
Default

Out of curiosity, what do you use to export all the objects in a single pass?
smm is offline   Reply With Quote
Old 11-30-23, 12:00 PM   #9
Jeff-Groves
Village Idiot
 
Jeff-Groves's Avatar
 
Join Date: Sep 2014
Posts: 5,319
Downloads: 130
Uploads: 0


Default

It's a program called Jammu
__________________
I don't do Stupid. So don't ask.
Jeff-Groves 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 10:55 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.