Moving driver's position camera on "NS Big 7's"

Are you stuck making RailWorks work? Don't be afraid to ask your questions here, we were all beginners once!

Moderator: Moderators

Locked
DropBear
New to the Forums
Posts: 5
Joined: Sat Jul 17, 2010 1:57 am
Location: Gold Coast, Queensland Australia

Moving driver's position camera on "NS Big 7's"

Post by DropBear »

Okay so firstly this is my first ever post on these forums, so apologies to moderators if I this post is not where it should be.

I have been reading old threads about JimmyKnopf's manipulation of the Driver's "POV" camera in the Deltic (and other similar posts), but they pertain to older versions of TS and I can't seem to 'translate' the steps in these posts to newer versions (in my case being TS2017).

So the issue I have raised this post for is with the "Northfolk Southern Big 7's" pack. I really do love the modelling and attention to detail DTM used with this pack save for one (for me) rather glaring issue; the driver's "POV" camera position within the cab. In my humble opinion, the position is too far back to the point that one only gets to see half of the main reservoir gauge (the view impeded by the air pedestal), plus (again for myself), the default position places the driver too far away from the window, rather restricting the view of the outside world to boot.

If I am correct in my understanding (of the older posts mentioned above), I believe that I need to change the camera's "Z" location? However I have been looking at the "DTM" content / folder / file structure (using Windows explorer), and cannot find any file that fits any kind of description intimating itself as the 'target' for editing, save for a file named and located thus:

"X:\SteamLibrary\steamapps\common\RailWorks\Assets\DTM\NS Big 7s\RailVehicles\Driver\sitting.ban"

If this is indeed the file that requires the 'adjustment', I would appreciate anyone's valuable time in assistance with this issue; I have no idea how to contact anyone in DTM (I cannot find any kind of web - presence), and I desperately need to make the changes in order to realise the full potential of some great modelling. Further, the tools mentioned in the old posts (RWEditor, etc), are no longer present in my folders, the only utility that may be of use is "BlueprintEditor2.exe" but I get a bunch of error messages when I try to just run this.

Many thanks in advance.
User avatar
ttjph
Very Active Forum Member
Posts: 1454
Joined: Mon Jun 27, 2011 11:54 am
Location: Warwickshire

Re: Moving driver's position camera on "NS Big 7's"

Post by ttjph »

Hi DropBear ( :-D ),

Welcome aboard! This seems a perfectly reasonable place for your question. :-)

From memory, the file you need is usually called something like cab_camera.bin. If the Big 8s are in an .ap file, then you'll need to extract the file and its folder structure to be able to work in a copy; the game will read the copy in preference to the .ap version.

There are several ways to edit a .bin file. If you drag it onto serz.exe in the main TS folder, that will create an .xml (I think), which you can edit in Notepad, and then drag that onto serz to convert it back. (Note: always copy the original .bin file BEFORE editing!)

The downloadable RW Tools by Mike Simpson is popular, and can edit .bin files although I haven't yet worked out how. I use RWTextEdit by user rivimey, also downloaded, which opens .bin files in a text / code editor style.

Hopefully that will get you started!
i5-4690k | 16 GB | GTX970 | Win 10 64bit | h/k SoundSticks | 1680x1050
lenfish
Well Established Forum Member
Posts: 944
Joined: Tue Dec 04, 2001 12:00 am
Location: Leeds

Re: Moving driver's position camera on "NS Big 7's"

Post by lenfish »

ttjph wrote:Hi DropBear ( :-D ),

Welcome aboard! This seems a perfectly reasonable place for your question. :-)

From memory, the file you need is usually called something like cab_camera.bin. If the Big 8s are in an .ap file, then you'll need to extract the file and its folder structure to be able to work in a copy; the game will read the copy in preference to the .ap version.

There are several ways to edit a .bin file. If you drag it onto serz.exe in the main TS folder, that will create an .xml (I think), which you can edit in Notepad, and then drag that onto serz to convert it back. (Note: always copy the original .bin file BEFORE editing!)

The downloadable RW Tools by Mike Simpson is popular, and can edit .bin files although I haven't yet worked out how. I use RWTextEdit by user rivimey, also downloaded, which opens .bin files in a text / code editor style.

Hopefully that will get you started!
It is indeed the cab camera bin file you need. Lowering the first Z value in the file will move the camera position back whilst increasing it will move it forward. Best to do it in small steps, may take a bit of trial and error to get the position you want.

Regards,

Len
DropBear
New to the Forums
Posts: 5
Joined: Sat Jul 17, 2010 1:57 am
Location: Gold Coast, Queensland Australia

Re: Moving driver's position camera on "NS Big 7's"

Post by DropBear »

Firstly ttjph, many many thanks for your timely reply!

It would appear that I may have 'bitten off more than I can chew' with this particular asset pack as there are several files that may qualify for what you have described:

B36-7 HN Cab.bin
B36-7 LN Cab.bin

C36-7 Cab.bin
C36-7ph1Ad Cab.bin

Unfortunately I have been unable to locate a ubiquitous cab_camera.bin (which kind of makes sense as we are dealing with 4 different locomotives).

I used Serz.exe as per your instructions and found nestled within the .XML what appears to be 'x', 'y' and 'z' co-ordinates, my concern now relates to the (apparent) Hex values that precede the value that (I hate to guess), I think needs adjustment thus:
<X d:type="sFloat32" d:alt_encoding="000000803D0AF33F" d:precision="string">1.19</X>
<Y d:type="sFloat32" d:alt_encoding="000000803D0A0D40" d:precision="string">3.63</Y>
<Z d:type="sFloat32" d:alt_encoding="000000A0703D1840" d:precision="string">6.06</Z>
I've calculated the Hex values that precede the 'Z' line and they are not representative of the float number prior to the end of the 'Z' tag (‭689077819456‬). I am a little unsure therefore on how to proceed: I have backed up the .bin files so I could just charge in and make arbitrary changes, but I prefer to understand what I'm doing before I do it (if you can relate to that).

Many thanks again,

DropBear
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Moving driver's position camera on "NS Big 7's"

Post by gptech »

Just for information.... .ban files are the animations for various bits, so the sitting.ban file you've found will relate to the movements in the driver when he's sat down---his arms/hands night move, he may turn or tilt his head.

You'll see other .ban files for the wipers, various instrument needles, switches, the pantograph rise and fall and coach doors (to name a few)
DropBear
New to the Forums
Posts: 5
Joined: Sat Jul 17, 2010 1:57 am
Location: Gold Coast, Queensland Australia

Re: Moving driver's position camera on "NS Big 7's"

Post by DropBear »

gptech wrote:Just for information.... .ban files are the animations for various bits, so the sitting.ban file you've found will relate to the movements in the driver when he's sat down---his arms/hands night move, he may turn or tilt his head.

You'll see other .ban files for the wipers, various instrument needles, switches, the pantograph rise and fall and coach doors (to name a few)
Many thanks for this information gptech, and also thanks to Len for your contribution. As for this missing "Cab_camera.bin" file, I have copied the .XML data from the "B367-7 LN Cab.bin" below, in the hopes that such data may 'ring a few bells' about whether this is one of the files I should be dealing with. My apologies in advance for resultant wall of text but I felt it was the only realistic way of determining if I am on the right track, (Pun neither original nor amusing, which makes it one of mine if my Wife has anything to say about it! :-? )
<?xml version="1.0" encoding="utf-8"?>
<cBlueprintLoader xmlns:d="http://www.kuju.com/TnT/2003/Delta" d:version="1.0">
<Blueprint>
<cCabCameraBlueprint>
<Name d:type="cDeltaString">B36-7 LN cab</Name>
<RenderComponent>
<cCameraRenderBlueprint/>
</RenderComponent>
<UpdateComponent>
<cCabCameraUpdateBlueprint>
<cameraOffset>
<cRVector3>
<X d:type="sFloat32" d:alt_encoding="000000803D0AF33F" d:precision="string">1.19</X>
<Y d:type="sFloat32" d:alt_encoding="000000803D0A0D40" d:precision="string">3.63</Y>
<Z d:type="sFloat32" d:alt_encoding="000000A0703D1840" d:precision="string">6.06</Z>
</cRVector3>
</cameraOffset>
<cameraDirection>
<cRVector3>
<X d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</X>
<Y d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</Y>
<Z d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</Z>
</cRVector3>
</cameraDirection>
<HasWindowCamera d:type="cDeltaString">eTrue</HasWindowCamera>
<windowCameraOffset>
<cRVector3>
<X d:type="sFloat32" d:alt_encoding="000000803D0AF3BF" d:precision="string">-1.19</X>
<Y d:type="sFloat32" d:alt_encoding="000000803D0A0D40" d:precision="string">3.63</Y>
<Z d:type="sFloat32" d:alt_encoding="000000C0F5281940" d:precision="string">6.29</Z>
</cRVector3>
</windowCameraOffset>
<windowCameraDirection>
<cRVector3>
<X d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</X>
<Y d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</Y>
<Z d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</Z>
</cRVector3>
</windowCameraDirection>
<verticalDirectionalFreedom d:type="sFloat32" d:alt_encoding="0000000000E09040" d:precision="string">1080</verticalDirectionalFreedom>
<horizontalDirectionalFreedom d:type="sFloat32" d:alt_encoding="0000000000E09040" d:precision="string">1080</horizontalDirectionalFreedom>
<MinFOV d:type="sFloat32" d:alt_encoding="000000A09999D93F" d:precision="string">0.4</MinFOV>
<MaxFOV d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</MaxFOV>
<WindowMinFOV d:type="sFloat32" d:alt_encoding="000000A09999D93F" d:precision="string">0.4</WindowMinFOV>
<WindowMaxFOV d:type="sFloat32" d:alt_encoding="000000000000F03F" d:precision="string">1</WindowMaxFOV>
<SpringXCoefficient d:type="sFloat32" d:alt_encoding="000000A09999B93F" d:precision="string">0.1</SpringXCoefficient>
<SpringYCoefficient d:type="sFloat32" d:alt_encoding="000000E051B8BE3F" d:precision="string">0.12</SpringYCoefficient>
<SpringZCoefficient d:type="sFloat32" d:alt_encoding="000000E051B8AE3F" d:precision="string">0.06</SpringZCoefficient>
<DampingXCoefficient d:type="sFloat32" d:alt_encoding="00000080976E923F" d:precision="string">0.018</DampingXCoefficient>
<DampingYCoefficient d:type="sFloat32" d:alt_encoding="000000E051B88E3F" d:precision="string">0.015</DampingYCoefficient>
<DampingZCoefficient d:type="sFloat32" d:alt_encoding="00000040E17A843F" d:precision="string">0.01</DampingZCoefficient>
<TimelineEntry/>
</cCabCameraUpdateBlueprint>
</UpdateComponent>
<PosOriComponent>
<cPosOriBlueprint/>
</PosOriComponent>
</cCabCameraBlueprint>
</Blueprint>
</cBlueprintLoader>
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Moving driver's position camera on "NS Big 7's"

Post by gptech »

DropBear wrote:I've calculated the Hex values that precede the 'Z' line and they are not representative of the float number...
Don't worry about those, what we edit in .bin files is the "easy to understand" bits, so you could change (just an example of what we edit, not a suggestion of a value to input)

Code: Select all

string">1.19</X>
to

Code: Select all

string">1.76</X>
Rather than using Serz and a separate editor I'd recommend getting a copy of RW Tools, it features a nice 'colour coding' option to help determine which bits we'd edit:

Image

If it's any colour other than black, leave it alone!! (unless you have very specific instructions of course)

Tracking down which files relate to which can be a bit of a paper trail, but the file used for the cab camera position will be referenced in the engine's main .bin file--that image above is the cab camera for the class 47, but without being told where to find that the game can't use it.
If we look in the class 47's .bin file we find this:

Code: Select all

							<InteriorCamera>
								<iBlueprintLibrary-cAbsoluteBlueprintID>
									<BlueprintSetID>
										<iBlueprintLibrary-cBlueprintSetID>
											<Provider d:type="cDeltaString">Kuju</Provider>
											<Product d:type="cDeltaString">RailSimulator</Product>
										</iBlueprintLibrary-cBlueprintSetID>
									</BlueprintSetID>
									<BlueprintID d:type="cDeltaString">RailVehicles\Diesel\Class47\Default\CabView\Class 47 Cab camera.xml</BlueprintID>
								</iBlueprintLibrary-cAbsoluteBlueprintID>
							</InteriorCamera>
which shows the cab camera file being ..\RailVehicles\Diesel\Class47\Default\CabView\Class 47 Cab camera.xml (for .xml read .bin, what we edit, no matter what tool we use, is a conversion from .bin to the editable .xml format so the extensions get changed to suit)

So, open the .bin file for the loco, any one as they'll all point to the same cab camera file, and look for a section similar to that for the class 47 I've thrown up as an example and you'll learn just which file you need to edit to shift the camera.
User avatar
ttjph
Very Active Forum Member
Posts: 1454
Joined: Mon Jun 27, 2011 11:54 am
Location: Warwickshire

Re: Moving driver's position camera on "NS Big 7's"

Post by ttjph »

DropBear wrote:Firstly ttjph, many many thanks for your timely reply!

It would appear that I may have 'bitten off more than I can chew' with this particular asset pack as there are several files that may qualify for what you have described:

B36-7 HN Cab.bin
B36-7 LN Cab.bin

C36-7 Cab.bin
C36-7ph1Ad Cab.bin

Unfortunately I have been unable to locate a ubiquitous cab_camera.bin (which kind of makes sense as we are dealing with 4 different locomotives).

I used Serz.exe as per your instructions and found nestled within the .XML what appears to be 'x', 'y' and 'z' co-ordinates, my concern now relates to the (apparent) Hex values that precede the value that (I hate to guess), I think needs adjustment thus:
<X d:type="sFloat32" d:alt_encoding="000000803D0AF33F" d:precision="string">1.19</X>
<Y d:type="sFloat32" d:alt_encoding="000000803D0A0D40" d:precision="string">3.63</Y>
<Z d:type="sFloat32" d:alt_encoding="000000A0703D1840" d:precision="string">6.06</Z>
I've calculated the Hex values that precede the 'Z' line and they are not representative of the float number prior to the end of the 'Z' tag (‭689077819456‬). I am a little unsure therefore on how to proceed: I have backed up the .bin files so I could just charge in and make arbitrary changes, but I prefer to understand what I'm doing before I do it (if you can relate to that).

Many thanks again,

DropBear
Weirdly enough, I've had success by ignoring the hex and just editing the decimal values. Seems an oddly redundant (and hard to read) format, but there you go.

If you've backed the files up, just give it a go!

Sent from my XT1032 using Tapatalk
i5-4690k | 16 GB | GTX970 | Win 10 64bit | h/k SoundSticks | 1680x1050
gptech
Very Active Forum Member
Posts: 19585
Joined: Fri Oct 10, 2008 5:48 pm
Location: Wakefield, West Yorkshire

Re: Moving driver's position camera on "NS Big 7's"

Post by gptech »

There's an alt_encoding *number* before every numerical piece of data in the .bin files for everything.

Code: Select all

<Mass d:type="sFloat32" d:alt_encoding="0000000000405D40" d:precision="string">117</Mass>
					<EaseOfDerailment d:type="sFloat32" d:alt_encoding="000000000000DC3F" d:precision="string">0.4375</EaseOfDerailment>
					<FrontPivotX d:type="sFloat32" d:alt_encoding="000000C01E452340" d:precision="string">9.635</FrontPivotX>
					<FrontPivotY d:type="sFloat32" d:alt_encoding="000000000000E0BF" d:precision="string">-0.5</FrontPivotY>
					<BackPivotX d:type="sFloat32" d:alt_encoding="000000C01E4523C0" d:precision="string">-9.635</BackPivotX>
					<BackPivotY d:type="sFloat32" d:alt_encoding="000000000000E0BF" d:precision="string">-0.5</BackPivotY>
					<CollisionCentreX d:type="sFloat32" d:alt_encoding="0000000000000000" d:precision="string">0</CollisionCentreX>
					<CollisionCentreY d:type="sFloat32" d:alt_encoding="00000000D7A30340" d:precision="string">2.455</CollisionCentreY>
					<CollisionWidth d:type="sFloat32" d:alt_encoding="00000080EB510640" d:precision="string">2.79</CollisionWidth>
					<CollisionHeight d:type="sFloat32" d:alt_encoding="00000020AE470740" d:precision="string">2.91</CollisionHeight>
					<CollisionLength d:type="sFloat32" d:alt_encoding="0000000000C03240" d:precision="string">18.75</CollisionLength>
					<DragCoefficient d:type="sFloat32" d:alt_encoding="00000080EB510840" d:precision="string">3.04</DragCoefficient>
					<RollingFrictionCoefficient d:type="sFloat32" d:alt_encoding="00000040BF7D4D3F" d:precision="string">0.0009</RollingFrictionCoefficient>
					<DryFriction d:type="sFloat32" d:alt_encoding="000000000000E83F" d:precision="string">0.75</DryFriction>
					<WetFriction d:type="sFloat32" d:alt_encoding="000000000000D83F" d:precision="string">0.375</WetFriction>
					<SnowFriction d:type="sFloat32" d:alt_encoding="000000E0A370CD3F" d:precision="string">0.23</SnowFriction>
I've no idea why,or what it does, or if it's supposed to somehow correlate with the *understandable* numbers we use, but as things work perfectly well without touching it there's no need to worry about it. All we deal with when editing is the stuff between opening (>) and closing (</) tags--the text in black in the image from RW Tools illustrates this.
DropBear
New to the Forums
Posts: 5
Joined: Sat Jul 17, 2010 1:57 am
Location: Gold Coast, Queensland Australia

Re: Moving driver's position camera on "NS Big 7's"

Post by DropBear »

Firstly, I must preface this post with a huge thanks to those who have posted assistance in this thread. In particular the reference to RW_Tools was invaluable as opposed to resorting to Serz.exe and Notepad++ :wink:

Okay, so my first foray into this topic has been a success (I will let the screenshots speak for themselves). Regrettably it has however been only a 'partial' success; as I was unable to remedy the issue with one asset, within one career scenario.

However, good news must always take priority over the bad so I wanted to share with you the fruits of my success, due in no small part to your help. (My apologies in advance to the moderators if I have erred by posting links to my screen-shots), I just wanted to speak more than a few thousand words with them (as you will no doubt see further down)).


https://imgur.com/lGosEq6


https://imgur.com/AIRdueC


https://imgur.com/aWNkO9l


The camera locations were arrived at using RW_Tools and a process of trial and error, until a satisfactory outcome was arrived at.



So mission accomplished! That is until I came to the locomotive in this scenario:


https://imgur.com/K8X89hS


The resultant camera coordinates (which have not been altered in these screen-shots), are (I'm sure you would agree), somewhat less than useful.


https://imgur.com/64KNw9X


https://imgur.com/amA9ZxH


The "C36-7_ph1 NS.bin" Engine file refers to "RailVehicles\C36-7\CabView\C36-7ph1Ad Cab.bin", and although it is evident that changes to the camera's 'Z' coordinate have been successful on previously shown assets, no amount of changes made any difference at all. At first, I thought that I may be looking at an external camera, but that was soon discounted when I cycled through all the camera locations on the asset and consist. Therefore I came to the conclusion that the coordinates might have been done this way in order to simulate a Driver's point of view, looking out of the door behind his seat. Regardless, no amount of changing the camera coordinates has changed the camera location; I can change the X and Y locations effectively but the "Z" simply will not change. Which brings me to (hopefully), my last question of this thread; is it possible that the current coordinates are a result of a 'scripted camera location', something that could supersede those coded within the cab view camera file itself?

Thanks in advance once again...
Locked

Return to “[TS] Help for Beginners”