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 02-24-14, 01:08 PM   #1
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default Modding cameras

I've tried downloading some free cam mods, not really what I'm looking for and a bit buggy, out of sectors and occasional crashes when changing to external cam view.

What I really want is to move some of the default views, for example change the control room view to starboard, facing port, instead of looking at the idiot at the chart table who looks like he's studying for a geography test. If possible remove him from the table so he's not blocking the view when I look around.

Also, if possible, add a second camera to the bridge in the starboard aft corner or on the cigarette deck. That would involve adding another hotkey someplace to switch between the standard location and the second one. I noticed the cameras.dat file has "interiorFore" and "interiorAft" but also stuff like UZO and captains bed along with assorted watch station views. I assume those are unused leftovers from SH3, any way to activate those?

Main thing is under the heading "Camera Positioner" the description says "CameraPositioner allows one to specify the positition of a virtual camera when activated".

Izzatso? How? I got an object ID number along with translation and rotation, but X Y and Z = true, true or false is not coordinate numbers, where are those?
Sniper297 is offline   Reply With Quote
Old 02-26-14, 07:14 PM   #2
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

Nobody knows nuthin about nuthin, hey?

Okay, trial and error stuff, it IS the \Library\cameras.dat file. Main trouble is there are 8 total possible stations (bridge, con interior, control interior, radar, sonar, deck gun, fore and aft AA guns) but 37 in the file, most of which are probably left over from SH3. There's a "Dummy cam interior fore" and a "Dummy cam interior aft", but the fore is the default control room interior, far as I can tell there is no alternate view. Worst trouble I had with this was the language problem - I'm looking at "CARMA" and thinking that's either a weird abbreviation or misspelling of "CAMERA", but then I ran the word CARMA through google translate and it turns out that's Romanian for "HELM".
Which of course is salty sailor talk for the steering wheel.

What I got so far;

24:Node - Dummy_Cam_InteriorFore - control room.
62:Node - Dummy_Cam_ConningDeck - bridge OOD station.
338:Node - Dummy_Cam_ConningTower

24 and 338 have sub nodes (if that's the right term);
34:Node - Dummy_Cam_InteriorFore1
and
346:Node - Dummy_Cam_ConningTower11.

Like the main node for each the sub nodes have "translation" XY and Z, for some reason the conning tower has Y= -0.05 and the subnode has Y= 0.05, near as I can tell they cancel each other out.

Okay, so once you find the one you want to change, translation and rotation have XY and Z datablocks;

translation (movement from actual position)
X= right/left (+right)
Y= height (+up)
Z= fore/aft (+forward)

So positive numbers move up, right, and forward, but in relation to the virtual camera itself - for the bridge it's normal, but the interiors are facing aft, so positive numbers would move the viewpoint port, up, and aft.

Rotation;
X= vertical
Y= horizontal
Z= nothing

I would have expected the Z to be head tilt side to side, but it doesn't do anything that I can see.
Unfortunately the values for rotation are in them evil heathen blasphemous radians instead of honest Christian compass degrees, so;


Degrees to radians
90=1.30796325
180=3.14159265
270=4.70688975


To rotate the camera 180 degrees and make him look up in the sky at 45 degrees, you would set X to 0.653981625 and Y to 3.14159265 and leave Z alone. For the most part the only one you would really need to mess with would be the X axis to set the default view direction. Some of them have RestrictedRotation datablocks, so if it won't let you look down at your invisible feet you'll have to change those numbers. Assuming you have an urge to look up or down more than allowed, of course.

For whatever reason if you don't want your changes to be ignored, THAT is where the camera positioner comes in - you have to open the virtual cameras, open the translation and rotation, check if XY and Z are toggled true or false, and toggle them to TRUE if you want the program to use your numbers.

"CameraPositioner allows one to specify the positition of a virtual camera when activated".

Keyword is "SPECIFY", it allows you to specify position (or denies you that privilege) but to actually DO the specifying you need to go to the main node where the translation and rotation numbers are. In other words it's just a weird way to lock or unlock changes, probably so they could laugh at amateur hackers like me trying to figure out why changes aren't taking effect.

That's all I got so far, why interior fore has two virtual cameras listed and which is the one actually used or what happens to the second one if both read the only translation numbers at the top, I dunno. How you activate other cameras or make new cameras and assign hotkeys to them is still a mystery.
Sniper297 is offline   Reply With Quote
Old 02-27-14, 02:25 PM   #3
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

As far as I remember, you can't make new cameras, you have to adjust existing ones. The locations the camera attach to are not in cameras.dat, they are in the respective files for the interiors/exterior.

For example, as I mentioned in the thread you posted about the hertz labels, you can change cameras by moving the nodes about. For the 'A' Scope and 'PPI' Scope, you find the nodes they attach to in NSS_GATA_CT.dat. The nodes are called RAD_Dummy_AScope and RAD_Dummy_PPI.

Naturally, in unmodified files, the PPI node is over the 'A' Scope, so to move this camera node, just swap the co-ordinates with the AScope dummy node.

I believe Dummy_Sonar is the position the camera is in when you are at the sonar station and Dummy_CT is the Conning Tower camera. Adjust these poistions to taste.

As far as I know cameras.dat adjusts the offset from the node, so if you adjust positions on that positioner, then the camera still rotates about the dummy node.

The external nodes are similar and are on the external models.
__________________
--------------------------------
This space left intentionally blank.
Nisgeis is offline   Reply With Quote
Old 02-27-14, 02:30 PM   #4
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

On a similar note, the nodes that control where the crew stand are similar, in that they all attach to nodes. They are usually just three letters long and are all on the floor. For example:

SON - Sonarman's position,
RAD - Radarman's position,
TDC - TDC Operator (He's super good, so they don't need a TDC assistant)

So you can move the geography student round the side if you want. Hope that helps.
__________________
--------------------------------
This space left intentionally blank.
Nisgeis is offline   Reply With Quote
Old 02-27-14, 03:59 PM   #5
Sniper297
The Old Man
 
Join Date: Dec 2005
Location: Philadelphia Shipyard Brig
Posts: 1,386
Downloads: 160
Uploads: 19
Default

Or make all them grass combing farmers walk the plank. I could do without some of the mannequins if they could be eliminated, especially on the bridge where they block the view.

If I'm understanding you correctly, I should be tinkering with \Data\Interior\NSS_Salmon\ (for example) DAT files rather than the master camers.dat?

"respective files for the interiors/exterior" where's the exterior for (example) Sargo class?

If you can't add new cameras, what about activating some of the unused ones and attaching them elsewhere? Seems kinda screwy to have 37 main nodes with a maximum of 8 actually in use.
Sniper297 is offline   Reply With Quote
Old 02-27-14, 04:30 PM   #6
Nisgeis
Ocean Warrior
 
Join Date: Jan 2008
Posts: 2,909
Downloads: 77
Uploads: 11
Default

The exterior would be the one with the model for the conning tower. I can't remember what it's called, but if you've been changing the textures you should have an idea which .dat file it is. I'm sorry, but I don't have SH4 installed anymore, so I can't tell you any more at the moment. If you can find a mod which has moved the exterior views, you can download that and see which files they have changed. Perhaps someone else can help out here?

Yes, screwy, that's a word to describe the files. There are a lot of things that are red herrings and dead ends. In many ways modding SH4 is like trying to disarm a movie bomb, you spend ages and ages on one part only to discover that it's a dummy and isn't connected to anything else. There are quite a few things in SH4 that were put in the as a 'nice to have' feature, where there is an entry for it and it has a value, but it's not actually connected to anything in the game. Other parts cause instant explosions.
__________________
--------------------------------
This space left intentionally blank.
Nisgeis 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 07:40 AM.


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.