Jump to content
We promise no intrusive ads, Please help keep the community alive
Consider supporting us by disabling your ad blocker / add to whitelist / purchasing VIP.
Mondodimotori

Change Camera FOV using TDUF

Recommended Posts

So, I tryed using TDUF to change the FOV in TDU. This is an abit that I developed in the sim racing community, trying to use a realistic FOV for better immersion and driving.

Starting from this guide (https://github.com/djey47/tdu-cp/wiki/TDUF-Database-Editor-Cameras), I was able to determine that "binoculars" is the actual value that controls the FOV.

Using just small changes to te last two digits, I was able to alter the ingame FOV. 

Here are some results obtained with the "Ferrari LaFerrari" from TDU Platinum MOD.

Spoiler

Here's with the default value of 16697:

  WAxgqsa.jpg

 

And this is with a value of 16675:

L04WuNt.jpg

 

@Djey also added some interesting details in another thread:

36 minutes ago, Djey said:

 

Interesting! Imo that's why when reverse-engineering, I had to guess in Cameras.bin how many bits are used for this or that (and whether they're signed or not...); since most of cameras settings are 16bit encoded, I assumed that would be the same for Binoculars (0..65535, or -32768..32767).

According tou your findings, it seems that only last 8bits are relevant.

e.g

(16b decimal) => binary

16697    0100 0001 0011 1001 DEFAULT
16675    ‭0100 0001 0010 0011‬ + ZOOM

16650    ‭0100 0001 0000 1010‬
10000    ‭0010 0111 0001 0000‬

 

and now, if we'd only keep relevant, last 8bits:

(binary => 8b decimal unsigned)

0011 1001 => 57
0010 0011‬ => 35

0000 1010‬ => 10
0001 0000‬ => 16.

So, first 8bits must have effect on another view setting... hard to guess...

 

Anyway, this conversation may be continued in TDUF thread or new dedicated topic about Cameras.bin research. 🤓

So, if anyone is interested in changing the FOV for TDU, I could use some help in actually relating those values to the actual FOV degrees values.

Share this post


Link to post
Share on other sites

Here is current state of cameras bin structure, see attachment.

Interesting part below:

{
  "name": "binoculars",
    "type": "INTEGER",
      "size": 2
},

Currently, binoculars information is read after 2 bytes data. It seems that only 1 byte is sufficient. That would explain why setting is cyclic.

To validate this assumption, may someone test these values?

- 16640 => should be maximum FOV (min zoom)

- 16768 => should be medium FOV

- 16895 => should be narrowest FOV (max zoom).

 

Thanks.

BIN-cameras-map.json

Share this post


Link to post
Share on other sites

So, this is a pretty old thread and i'm not sure if the people are still around?

I would like to give this a go, as in help test things as i 'think' it might be a solution to the poor viewing angles in many of the current car models (and not being able to adjust the seat position any further).

A wider FOV would indeed allow more cars to have working mirrors in the cockpit view (a view i like to drive in).

So what do i need (tools) and what do i need to do to test this 'binoculars' variable?

@Djey i downloaded your .bin file and had a look at it, but i'm not sure where i would put the '16640', '16768' or '16895' values as they all seem too high for what is in that code packet? Would those need converting down as Mondodimotori had in his post (57, 35 and 10 etc)?

So you might need to give me a very quick and basic 'how to' series of posts so i can do the right thing to get this tested in game :)

Share this post


Link to post
Share on other sites

Cool, thanks for the pointers.

Time to look at tduf tool 🙂

 

Ok just having a quick look over that link and i think i get it to some extent. We would need to enter 'binoculars' values for ALL cars in the game! There is no universal/global value that applies to all instances (like a FOV value in a regualr game (like Morrowind/Fallout etc)). Ouch. And each one would need testing in each car!

And on that note not all car mirrors actually work properly as is! Many reflect 'fuzzy' or are angled wrong etc, so those might all need adjusting too (model work?).

Hmmm. I would need a 'cheat' way to get access to all cars in game to even start to go through this? Is that a feature of tduf tool by any chance?

Edited by ZG264

Share this post


Link to post
Share on other sites

Nope, not to my knowledge at least. Tduf does only modify database files and a few bin files.

Only project paradise uses a dll injection, allowing to override variables in memory.

That's why projects such as tdu platinum are so huge and take time, author has to make changes on each car and test results in game...

Share this post


Link to post
Share on other sites

ok well i just gave some value tweaks a go.

i had in game: (F) Alpha Romeo Brera (my usual 'starting car' choice), a mod added  (E) Mitsubishi GTO Turbo, and a classic (G) Porsche 911 Turbo(930).

TDU database path is to my installed (Platinum mod version) main \Atari\Test Drive Unlimited\TDU\Euro\Bnk path and the database loaded up fine.

So i browsed to the cars (as above) i have in my save game in tduf and changed 'binoculars' values from current defaults:

(4)Brera = 16697 to 16640

(714)Mitsubishi = 17980 to 16640

(382)Porsche = 16697 to 16640

Then 'saved' and 'checked' the changes (all ok according to tduf). The numbers in brackets are those shown in tduf for the specific cars.

I 'think' i noticed a difference when i loaded up the game but am not 100% sure. The mirrors in that Mitsubishi are not fit for purpose (as is the case with many cars sadly).

Strange thing is when i load back the tduf database all the values are reported as being back to their defaults, even after having 'saved' the changes. Is that normal?

I think i will carry on experimenting and getting some comparison screenshots done. Is there a reason for the

Quote

16640 => should be maximum FOV (min zoom)

min value for FOV?

Edited by ZG264

Share this post


Link to post
Share on other sites

VawD4mG.jpg

 

Ok that is from the 'starting' Alpha Brera, i used tduf as above to set the 'lowest' value for 'binoculars' (16640). Seat position set in the in game menu is furthest back and lowest to the ground. I 'think' i can see a little more of the wing mirror vs normal, but not 100% sure on that. So if someone else has a default Alpha Brera they could compare what it looks like?

 

Edit: Ok there is some weird 'vodoo' file permission stuff going on when trying to edit these files it seems!

Most times the files are set as 'read only' (i pick the 'Database' folder for example to turn that off and apply the changes to all subfolders and files and 'apply', and next time i check it is 'magically' back to 'read only'! Very strange and must be down to either some deeper layer Atari added to the game files OR my system security settings as the game is installed in a normal 'Program Files' type installation.

Anyway i think i'll be able to work around it and get the changes to 'stick' so i guess the screen shot above we can take as 'default' (16697 for Binoculars) for that car. I'll post another when i get the 16640 to stick and hold 🙂

NOPE! a value of 16640 just gives a total red screen in cockpit view, just with some hud elements visable (satnav and fuel gauge+digital speed and gear readout in bottom corners (left and right) of screen. value 16640 is not accepted by the game!

Edited by ZG264

Share this post


Link to post
Share on other sites

Here are the results:

Binoculars = 16890 (all the range from 16895 to this looked the same, upside down etc! Not sure exactly where the cut off for the upside down is!)

hlFqB2Z.jpg

Edited by ZG264

Share this post


Link to post
Share on other sites

Binoculars = 16645. At the other end of the scale we have this. 16640 produced a red screen, 16641 just the max zoomed in view (only tarmac right in front of the car). In this shot you just see the wheel and hand (i had put on a max right turn to get the hand on wheel in shot):

Vc6skAD.jpg

 

Share this post


Link to post
Share on other sites

Binoculars = 16680. to give maybe the max comfortable zoom in view? Keep in mind this is with the seat position set to max rear, so can be zoomed in even more using the in game seat slider (and will likely be the same for most cars where that is set as furthest back as default?).

rxLhqJX.jpg

Share this post


Link to post
Share on other sites

Binoculars=16720 + Seat Position (set in game options) = max forward. To show how you can adjust the same binocular setting with the in-game seat adjustment.

2EBP8NJ.jpg

 

So that concludes this rounds of tests.

Binoculars seems to have a max starting value of 16641, but is not usable in game. The top ranges of 16895-16880 (and maybe a bit further) give an upside down view!

usuable values seem to be in the 16680 (most zoomed in) to 16730 (most zoomed out) ranges, for the car tested, and i have now chosen 16720 as it's new default setting.

Edited by ZG264

Share this post


Link to post
Share on other sites

No problem, glad to help :)

I'm a newbie to TDU, and one of the first impressions i had was a general 'discomfort' with the in car views, especially in relation to being able to use the mirrors or not, and this issue with not being able to adjust the view-point enough with the in game seat position options was determining which cars i would end up buying and driving.

So with the awesome Platinum mod there are all these hundreds of extra cars, and sadly many of them were also not possible choices for me for the same (and worse!) problems in terms of functional mirrors and if you could use them in the in car view.

I was very happy to find this thread with as it turns out a potential solution for those issues using the Binocular values to adjust FOV.

I've now gone through my game files with TDUF and saved the view changes to the cars i've tested have working functional mirrors (as many do not) and overall my game is much improved using the settings I settled on. 16720 or 16730 (just down to personal preference) seems to be working for all those cars so far, to give better FOV for the in car view point.

 One other aspect of this could be looked at in relation to the seat position ranges? In TDUF that looks like it might be related to the _Z co-ordinate values in the same section as 'Binoculars'? There are two Z values it seems so i'm not sure which one determines the ranges (if it does at all!) for the seat adjustment setting?

Share this post


Link to post
Share on other sites

The Nissan 350 Z Coupe seems to have issues changing it's Binocular settings in game. It saves it ok in the TDUF editor (and changes the value for the other 350 Z options, like Nissamo etc), but in game it does not change the view like it does in the Alpha i posted pics for. All the other cars i've tried so far have also worked, just not the Nissan for some reason?

 

Edit: RE that Nissan 350 Z coupe.

OK for some reason TDUF changes the car view from what is normaly 'cockpit' (as you choose one car type after another) to 'Hood' view. I've been through about 20 cars and it only seems to do this for that Nissan out of those others. So what happens when you pick the Nissan the values you get for 'Binoculars' are under the Hood view not the cockpit. So after chosing that car in TDUF, check that the view is on 'cockpit' before changing Binocular values.

Once that is done the changes work as expected (and 16720/16730 works well for this car also as it has working mirrors in the cockpit view).

Edited by ZG264
New info

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


×
×
  • Create New...