Help on sun settings in RBR

It seems that moving the sun in btb does not effect the sun position in RBR. Actually, the settings.ini contains three lines with "sun direction" and 3 numbers per line. These numbers are always the same when exporting, and I cannot figure out how they are related to the coordinates of the sun, maybe I missed a thread about it...
 
  • jharro

It seems that moving the sun in btb does not effect the sun position in RBR. Actually, the settings.ini contains three lines with "sun direction" and 3 numbers per line. These numbers are always the same when exporting, and I cannot figure out how they are related to the coordinates of the sun, maybe I missed a thread about it...

2 of those lines have ";" at start which means they are commented, so they are ignored.

the 3 values are the X, Z and Y of the the sun direction, not position, in example :
zenith(above): sunDirection = 0, -1, 0
right(east) 45degree: sunDirection = -0.707107, -0.707107,
left(west) 45degree: sunDirection = 0.707107, -0.707107, 0.0
back(south) 45degree: sunDirection = 0, -0.707107, 0.707107
etc.

you can use a sun position calculator to obtain the angles

if:
azimuth = 176.05
altitude = 48.42
then:

x = sin(176.05) * sin(48.42) = 0.0688859 * 0.7480298 = 0.0515287
z = cos(176.05) * sin(48.42) = -0.99762455 * 0.7480298 = -0.74625289
y = cos(48.42) = 0.66367

sunDirection = 0.0515287, -0.74625289, 0.66367

if you don't want to bother with the math you can always draw a line with length 1 unit in max or any other 3d editor, rotate the line by x for altitude and z for azimuth. if the line's start is at origin(0,0,0) then the coordinates for the other end are exactly the values you need for sun direction.
 

Attachments

  • sun_vector.JPG
    sun_vector.JPG
    40.4 KB · Views: 266

Latest News

To join the OverTake Racing Club races I want them to be: (multiple choice)

  • Free to access

    Votes: 33 86.8%
  • Better structured events

    Votes: 7 18.4%
  • Better structured racing club forum

    Votes: 6 15.8%
  • More use of default game content

    Votes: 3 7.9%
  • More use of fixed setups

    Votes: 13 34.2%
  • No 3rd party registration pages

    Votes: 13 34.2%
  • Less casual events

    Votes: 6 15.8%
  • More casual events

    Votes: 14 36.8%
  • Other, specify in thread

    Votes: 1 2.6%
Back
Top