Vadru93 / LevelMod

THPS3 LevelMod
Other
20 stars 2 forks source link

Weird skybox rendering (maybe FOV related) #36

Open DCxDemo opened 3 years ago

DCxDemo commented 3 years ago

For some reason, skybox render method differs from the one uised for levels. You can notice that by rotating camera around - objects on the skybox move faster than the distant objects on the level. It feels really weird and games don't do that in general. Would be nice to sync in with level so it moves at the same speed.

Vadru93 commented 3 years ago

It seems skybox uses a different viewport rather than a matrix, this may cause issues. I will look into this more later

DCxDemo commented 1 year ago

confirmed to be FOV related. there are 3 direct calls to SetFOV func in the game.

  1. one call is hardcoded in 42eb20 func for sky with base fov value of 50.0 (0x0058d9b4). it is confirmed that changing sky fov value to 60 fixes the skybox issue.
  2. another call is hardcoded in camera class constructor with fov value of 60.0 (0x0058e86c), changing this has no effect whatsoever.
  3. third call is wrapped in SetFocalLength, controller by script value, but it just zooms camera and doesnt affect fov. the difference is like focal length doesnt distort the picture, while wider FoV does.
DCxDemo commented 1 year ago

probably should make it toggleable too. original sky fov is 50/60 = 83,(3)% of level fov. so like make it toggle between 83,3% and 100% of user selected fov if #119 is implemented to keep the original effect option.