PDA

View Full Version : How do I edit object positions...


flakmonkey
06-30-07, 08:12 AM
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:damn:

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...

bigboywooly
06-30-07, 08:28 AM
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

TheDarkWraith
07-10-07, 08:42 AM
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

DivingDuck
07-10-07, 08:52 AM
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

TheDarkWraith
07-10-07, 08:59 AM
DD you just gave me some missing info I needed for my bible! You rock! :up:

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

bigboywooly
07-10-07, 09:12 AM
DD you just gave me some missing info I needed for my bible! You rock! :up:

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

TheDarkWraith
07-10-07, 09:15 AM
I had to re-edit it sorry! It's not all black anymore.........:huh:

DivingDuck
07-10-07, 09:30 AM
Hey Raceboy,
...
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

TheDarkWraith
07-10-07, 09:35 AM
Hey Raceboy,
...
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?

DivingDuck
07-10-07, 09:47 AM
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

TheDarkWraith
07-10-07, 05:07 PM
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! :up:

TheDarkWraith
07-12-07, 12:42 AM
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:

http://static.filefront.com/images/personal/t/TazmanianDevilR/99864/thagniofvu.thumb500.jpg

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. :damn: :damn:

DivingDuck
07-12-07, 01:28 AM
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 axisThe rotation values are based on PI. A value of 3,1415 converted to float32 format will result in a rotation of 180°.

Regards,
DD

TheDarkWraith
07-12-07, 01:34 AM
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! :up:

I'm still lost in regards to the x, y, and z positions. :damn:

DivingDuck
07-12-07, 01:44 AM
which hex editor do you use?

TheDarkWraith
07-12-07, 01:46 AM
Ultra-Edit32 v13.00a (unregistered version currently. Thinking about buying it since I like it)

DivingDuck
07-12-07, 01:49 AM
don´t know this one. Try "HexWorkshop" (http://hexworkshop.com). It contains a converter that runs independently. It´s 48USD, with a 30 days trial. It´s very handy and easy to use.

Regards,
DD

TheDarkWraith
07-12-07, 01:55 AM
I will give it a look. Thanks for the info! :up:

I need to get some sleep now. I wasn't going to bed before I had at least a functional dual exhaust sub. :p