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 06-30-07, 08:12 AM   #1
flakmonkey
Grey Wolf
 
Join Date: Jul 2006
Location: Staffordshire, Uk
Posts: 944
Downloads: 78
Uploads: 0


Default How do I edit object positions...

I was just wondering how to properly edit an objects coordinates, ie the prop/rudder on a sub.
The reason i ask is the sub im currently working on, i cant move the prop or rudder (which are in seperate files to the body of the sub) to the correct positions, pack3d just gives me a biiig long number as its position which i cant decipherl, and now its giving me a headache

At present im having to have non functional / stationary props etc as i have to build everything into one file to ensure correct placement.

SSB solved this problem for me on my XXIII, but it be great if i knew how to do it myself...
__________________
flakmonkey is offline   Reply With Quote
Old 06-30-07, 08:28 AM   #2
bigboywooly
Rear Admiral
 
Join Date: Apr 2006
Location: Swindon, England
Posts: 10,151
Downloads: 35
Uploads: 0
Default

Hmmmm
You can adjust positioning througn pack3d but SSb may have a better idea

The props in the dat need to have the same name as the prop in the sim.cfg or wont work
Same with rudder
__________________


My mediafire page http://www.mediafire.com/?11eoq19bq9r41
bigboywooly is offline   Reply With Quote
Old 07-10-07, 08:42 AM   #3
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

you might want to check out my 'Modders Bible for SHIII'. There's tons of information in there. It includes information for editing coordinates of objects. I think this is what you're looking for. I started a new thread for this: http://www.subsim.com/radioroom/showthread.php?t=118179
TheDarkWraith is offline   Reply With Quote
Old 07-10-07, 08:52 AM   #4
DivingDuck
Grey Wolf
 
Join Date: Jul 2006
Location: Germany
Posts: 902
Downloads: 10
Uploads: 1
Default

Moin FM,

Node Type 4/100
4 bytes - type
4 bytes - subtype
4 bytes - size of data block
8 bytes - ID
8 bytes - Parent ID
8 bytes - ID of 3D object
2 bytes - not sure about, but used it already
4 bytes - X value (float32)
4 bytes - Y value (float32)
4 bytes - Z value (float32)
4 bytes - XY rotation (float32)
4 bytes - XZ rotation (float32)
4 bytes - YZ rotation (float32)
4 bytes - number of maps used
8x (number of maps) bytes - map ID´s
4 bytes - 00 00 00 00

Regards,
DD

Last edited by DivingDuck; 07-10-07 at 09:10 AM.
DivingDuck is offline   Reply With Quote
Old 07-10-07, 08:59 AM   #5
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

DD you just gave me some missing info I needed for my bible! You rock!

what about this:

00000080h: 75 62 00 06 00 00 00 00 00 00 00 3C 00 00 00 88 ; ub.........<...ˆ
00000090h: BD 4C 78 C5 00 F1 95 00 00 00 00 00 00 00 00 28 ; ½LxÅ.ñ•........(
000000a0h: 00 00 00 24 00 00 00 63 6D 64 72 5F 41 49 48 75 ; ...$...cmdr_AIHu
000000b0h: 6D 61 6E 53 75 62 00 10 00 00 00 63 6D 64 72 5F ; manSub.....cmdr_

The yellow text is the type
The green text is the subtype/version
The blue text is the ID size (0x0000003C)
The purple text is the new object ID (node ID)
The dark blue text I assume is the 3D model object ID????
what is the grey text???
The red text is the tag name
The dark green text (00) is the null termination character

Last edited by TheDarkWraith; 07-10-07 at 09:13 AM.
TheDarkWraith is offline   Reply With Quote
Old 07-10-07, 09:12 AM   #6
bigboywooly
Rear Admiral
 
Join Date: Apr 2006
Location: Swindon, England
Posts: 10,151
Downloads: 35
Uploads: 0
Default

Quote:
Originally Posted by Racerboy
DD you just gave me some missing info I needed for my bible! You rock!

what about this:

00000080h: 75 62 00 06 00 00 00 00 00 00 00 3C 00 00 00 88 ; ub.........<...ˆ
00000090h: BD 4C 78 C5 00 F1 95 00 00 00 00 00 00 00 00 28 ; ½LxÅ.ñ•........(
000000a0h: 00 00 00 24 00 00 00 63 6D 64 72 5F 41 49 48 75 ; ...$...cmdr_AIHu
000000b0h: 6D 61 6E 53 75 62 00 10 00 00 00 63 6D 64 72 5F ; manSub.....cmdr_

The yellow highlight is the type
The green highlight is the subtype/version
The blue highlight is the ID size (0x0000003C)
The purple highlight is the new object ID (node ID)
The dark blue highlighted text I assume is the 3D model object ID????
what is the grey highlighted text???
Ummm its all black text
__________________


My mediafire page http://www.mediafire.com/?11eoq19bq9r41
bigboywooly is offline   Reply With Quote
Old 07-10-07, 09:15 AM   #7
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

I had to re-edit it sorry! It's not all black anymore.........
TheDarkWraith is offline   Reply With Quote
Old 07-10-07, 09:30 AM   #8
DivingDuck
Grey Wolf
 
Join Date: Jul 2006
Location: Germany
Posts: 902
Downloads: 10
Uploads: 1
Default

Hey Raceboy,
Quote:
Originally Posted by Racerboy
...
what about this:

00000080h: 75 62 00 06 00 00 00 00 00 00 00 3C 00 00 00 88 ; ub.........<...ˆ
00000090h: BD 4C 78 C5 00 F1 95 00 00 00 00 00 00 00 00 28 ; ½LxÅ.ñ•........(
000000a0h: 00 00 00 24 00 00 00 63 6D 64 72 5F 41 49 48 75 ; ...$...cmdr_AIHu
000000b0h: 6D 61 6E 53 75 62 00 10 00 00 00 63 6D 64 72 5F ; manSub.....cmdr_

The yellow text is the type
The green text is the subtype/version
The blue text is the ID size (0x0000003C)
The purple text is the new object ID (node ID)
The dark blue text I assume is the 3D model object ID????
what is the grey text???
The red text is the tag name
The dark green text (00) is the null termination character
That´s from a *.sim file, right!?
Node Type 6/0
4 bytes - type
4 bytes - subtype
4 bytes - size of data block
8 bytes - ID
8 bytes - most probably the object to be linked to, but never seen it used
4 bytes - size of tree
4 bytes - size of sub-tree (1 only in this case)
....
4 bytes - size of sub tree



Regards,
DD
DivingDuck is offline   Reply With Quote
Old 07-10-07, 09:35 AM   #9
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by DivingDuck
Hey Raceboy,
Quote:
Originally Posted by Racerboy
...
what about this:

00000080h: 75 62 00 06 00 00 00 00 00 00 00 3C 00 00 00 88 ; ub.........<...ˆ
00000090h: BD 4C 78 C5 00 F1 95 00 00 00 00 00 00 00 00 28 ; ½LxÅ.ñ•........(
000000a0h: 00 00 00 24 00 00 00 63 6D 64 72 5F 41 49 48 75 ; ...$...cmdr_AIHu
000000b0h: 6D 61 6E 53 75 62 00 10 00 00 00 63 6D 64 72 5F ; manSub.....cmdr_

The yellow text is the type
The green text is the subtype/version
The blue text is the ID size (0x0000003C)
The purple text is the new object ID (node ID)
The dark blue text I assume is the 3D model object ID????
what is the grey text???
The red text is the tag name
The dark green text (00) is the null termination character
That´s from a *.sim file, right!?
Node Type 6/0
4 bytes - type
4 bytes - subtype
4 bytes - size of data block
8 bytes - ID
8 bytes - most probably the object to be linked to, but never seen it used
4 bytes - size of tree
4 bytes - size of sub-tree (1 only in this case)
....
4 bytes - size of sub tree



Regards,
DD
Yes it is from a .sim file.
Can you explain the 4 bytes - size of tree and 4 bytes - size of sub-tree please?
TheDarkWraith is offline   Reply With Quote
Old 07-10-07, 09:47 AM   #10
DivingDuck
Grey Wolf
 
Join Date: Jul 2006
Location: Germany
Posts: 902
Downloads: 10
Uploads: 1
Default

Hey RB,

it´s like a list that has a sublist inside. If you have items that belong together you can put them into one tree. If they have properties themselfes you create a subtree.
  • Property 1
  • Property 2
    • Property 2-1
    • Property 2-2
    • Property 2-3
      • Property 2-3-1
      • Property 2-3-2
    • Property 2-4
  • Property 3
  • Property ..
Hope that explains what I mean.

Regards,
DD
DivingDuck is offline   Reply With Quote
Old 07-10-07, 05:07 PM   #11
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

Quote:
Originally Posted by DivingDuck
Hey RB,

it´s like a list that has a sublist inside. If you have items that belong together you can put them into one tree. If they have properties themselfes you create a subtree.
  • Property 1
  • Property 2
    • Property 2-1
    • Property 2-2
    • Property 2-3
      • Property 2-3-1
      • Property 2-3-2
    • Property 2-4
  • Property 3
  • Property ..
Hope that explains what I mean.

Regards,
DD

DD that was the missing piece to the puzzle! Finally I have a total grasp of the file structures. Now I have to update my Bible. Thanks!
TheDarkWraith is offline   Reply With Quote
Old 07-12-07, 12:42 AM   #12
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

I'm looking for a little more information on object positions. This is the hex code for the location of the left side smoke of my dual exhaust VIIb sub mod currently:

00000238h: B0 48 BD BD 31 08 2C 3D 1F 85 3B C0 CD CC AC 3F ; °H½½1.,=.…;ÀÍ̬?
00000248h: 00 00 00 00 00 00 00 00 ; ........

X offset from parent is B0 48 BD BD
y offset from parent is 31 08 2C 3D
z offset from parent is 1F 85 3B C0
degrees XY rotation is CD CC AC 3F
degrees XZ rotation is 00 00 00 00
degrees YZ rotation is 00 00 00 00

And this is the hex code for the location of the right side smoke of my dual exhaust VIIb sub mod currently:

00000f23h: 40 C4 BD 3D 31 08 2C 3D 1F 85 3B C0 CD CC AC 3F ; @Ľ=1.,=.…;ÀÍ̬?
00000f33h: CD CC AC 3F 00 00 00 00 00 00 00 00 ; Í̬?........

X offset from parent is 40 C4 BD 3D
y offset from parent is 31 08 2C 3D
z offset from parent is 1F 85 3B C0
degrees XY rotation is CD CC AC 3F
degrees XZ rotation is CD CC AC 3F
degrees YZ rotation is 00 00 00 00

As you can see from this picture the object positions and degrees rotations need help. Problem is I don't understand how to change the values:



my question is how do you convert the above to meaningful (decimal) numbers to work with? Like how can I convert the z offset above into a number that I can depict in my head? If I wanted the XY rotation to be 45 degrees how do I calculate this and turn it into a hex value? Say I have a VIIb sub and I want to place an object halfway between the end of the ship and the conning tower (is that x, y or z offset?) and I wanted to place it a distance out to the right (looking from the rear of the sub forward) that is parallel with the right side of the conning tower (again is that x, y, or z offset?) and a distance from the water that is parallel with the top of the rear of the sub (x, y, or z offset??). How do I calculate this and turn it into a hex value?


this plane is ?
|
|
|

^
( ) <--- sub
\ / ------------ this plane is ?
\/
' ' <--- props


How would you denote (pictorally) the degrees XY, XZ, and YZ rotations? I'm trying to understand this and having a hard time. I need this information for my dual exhaust VIIb sub mod. I have made the dual exhaust work now I just need to locate them in the right spots.

Last edited by TheDarkWraith; 07-12-07 at 01:30 AM.
TheDarkWraith is offline   Reply With Quote
Old 07-12-07, 01:28 AM   #13
DivingDuck
Grey Wolf
 
Join Date: Jul 2006
Location: Germany
Posts: 902
Downloads: 10
Uploads: 1
Default

Moin RB,

the x-, y-, z-values are in float32 format. Check your hex editor. Most of them have a tool to convert decimal into any hex format and vice versa. There are some stand alone converters around on the internet.

As for the rotation, can´t explain. But compared to an aircraft the
  • first would be pitch axis,
  • second would be yaw axis,
  • third would be roll axis
The rotation values are based on PI. A value of 3,1415 converted to float32 format will result in a rotation of 180°.

Regards,
DD
DivingDuck is offline   Reply With Quote
Old 07-12-07, 01:34 AM   #14
TheDarkWraith
Black Magic
 
Join Date: Jun 2007
Posts: 11,962
Downloads: 147
Uploads: 5


Default

DD thanks again! I converted the hex to decimal and was getting numbers that didn't make any sense. But since you have revealed to me that the rotations are in regards to PI those make some sense now. You are the man!

I'm still lost in regards to the x, y, and z positions.
TheDarkWraith is offline   Reply With Quote
Old 07-12-07, 01:44 AM   #15
DivingDuck
Grey Wolf
 
Join Date: Jul 2006
Location: Germany
Posts: 902
Downloads: 10
Uploads: 1
Default

which hex editor do you use?
DivingDuck 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 04:42 PM.


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