Author Topic: Dynamic FoV?  (Read 2003 times)

0 Members and 1 Guest are viewing this topic.

Offline Ace

  • Truth of Babel
  • 212
    • http://www.lordofrigel.com
Currently the FoV SEXP is limited to being able to set a single field of view. Expanding or constraining FoV as a cutscene effect becomes very difficult.

Would it be possible to have a SEXP (or a script) that does the following?

Starting FoV (0 being default)
End FoV (0 being default)
Transition time in ms (0 being instant)
Ace
Self-plagiarism is style.
-Alfred Hitchcock

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Funny you should ask that - I just got finished committing the new camera code to the unstable branch which has that exact effect. It also adds an acceleration time, so you can gradually start changing the FOV.
-C

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
You could do that weird thing they did with the camera in the BSG Miniseries before a jump ;) Anyway, does the new camera code also include the ability to translate the camera over time?

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
Yes; all seven dimensions (x position/y position/z position/pitch/bank/roll/fov) use the same three-part movement curve (acceleration, constant velocity or rate of change, deceleration)

A graph of the movement curve over time looks like this:



And you can set the following values to alter its shape:

Code: [Select]
//Initial
int Ti; //Initial timestamp
float Pi; //Initial position
float Vi; //Initial velocity

//Given
float Pf; //Final position
float Tf; //Final duration
float Tai; //Starting acceleration duration
float Taf; //Ending acceleration duration
float Vf; //Final velocity

//Calculated
float Vm; //Middle velocity
float Ai; //Starting acceleration
float Af; //Ending acceleration

(Calculated values are deduced from the first 8 fields)
-C

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
I ♥ SCP!

 

Offline Ace

  • Truth of Babel
  • 212
    • http://www.lordofrigel.com
You could do that weird thing they did with the camera in the BSG Miniseries before a jump ;)

That isn't at all why I was asking... nope not at all...  :nervous:

Seeing the current camera commands expanded will be great :)
« Last Edit: March 15, 2008, 04:41:47 pm by Ace »
Ace
Self-plagiarism is style.
-Alfred Hitchcock

 

Offline blowfish

  • 211
  • Join the cult of KILL MY ROUTER!!!!!!!!!!1
Yes, I know that's not why, but I just had to say it.

 

Offline Herra Tohtori

  • The Academic
  • 211
  • Bad command or file name
Is it possible to expand this outside the cutscenes and into the gameplay?

What I'm thinking is similar system as in IL-2 Sturmovik - there's three main camera positions; wide angle, normal angle and gunsight (zoom) view that can be accessed via keypresses, and in addition it's possible to change the FOV incrementally (but I don't use that option, the three main settings are very much enough).

It would be rather useful in FS2 too...
There are three things that last forever: Abort, Retry, Fail - and the greatest of these is Fail.

 

Offline WMCoolmon

  • Purveyor of space crack
  • 213
The traditional FS2 view system is updated so that a camera is used to hold all the data, rather than standalone variables in the code. So, yes, it's feasible - but it'd require a little extra code than what's in there now, since you can't get ahold of the main camera object right now.

OTOH, you could do what you're saying with key-pressed, key-reset, and set-fov. I don't see any big gain to hardcoding it rather than just making the main camera and keypresses accessible in scripting.
-C