Camera.sqs: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Fix…)
 
(28 intermediate revisions by 11 users not shown)
Line 1: Line 1:
[[Category:Editing: Flashpoint]]
{{TOC|side}}
It won't take you long to discover that the original Operation Flashpoint camera options which are found in the editor don't give you the same versatility that you have seen in the official missions or quality user-created cutscenes. The "editor driven cutscene" has long been frowned upon by serious mission makers and for good reason. Seeing the same spinning camera shot and slow zooms over and over make the editor driven cutscene instantly recognisable as novice and that's without mentioning the annoying split second delay before the cutscene gets going.


It won't take you long to discover that the original Operation Flashpoint camera options, that you find in the editor, don't give you the same versatility that you have seen in the official missions or quality user created cutscenes. The "editor driven cutscene" has long been frowned upon by serious mission makers and for good reason. Seeing the same spinning camera shot and slow zooms over and over make the editor driven cutscene instantly recognisable as novice and that's without mentioning the annoying split second delay before the cutscene gets going.
Thankfully BI accounted for this by having its own method of creating camera cutscenes bypassing the editor options altogether. It is a script which simulates a real camera, which literally lets you point and click your angles, thus allowing you to create cutscenes with minimum fuss.
 
Thankfully BIS accounted for this by having it's own method of creating camera cutscenes bypassing the editor options altogether. It is a script which simulates a real camera, which literally lets you point and click your angles. Thus allowing you to create cutscenes with minimum fuss.


This script already exists within Flashpoint. By executing the script in-game you can activate a camera which is controlled using the keyboard. It can be moved into practically any position, and a 'snapshot' can be taken containing all the relevant information for that shot. The information can then be pasted into your cutscene script.  
This script already exists within Flashpoint. By executing the script in-game you can activate a camera which is controlled using the keyboard. It can be moved into practically any position, and a 'snapshot' can be taken containing all the relevant information for that shot. The information can then be pasted into your cutscene script.  




== Usage ==
To execute the script create an object - doesn't need to be a soldier - and in its init field type
To execute the script create an object - doesn't need to be a soldier - and in its init field type


this [[exec]] "camera.sqs"
<sqs>this exec "camera.sqs"</sqs>


Now when you preview the mission you will see the cinematic border at the top and bottom of the screen and a view looking North from the object you created. There will be a crosshair in the centre of the screen.
Now when you preview the mission you will see the cinematic border at the top and bottom of the screen and a view looking North from the object you created. There will be a crosshair in the centre of the screen. If you fail to execute the script from an object, or the object doesn't exist, the camera will be created at 0,0,0 on the map.


=== Controls ===
'''Most of following controls can be easily changed in 'Options -> Controls -> Buldozer controls' menu.'''


Camera movement is controlled using the following keys:
Camera movement is controlled using the following keys:
 
{|
 
| {{Controls|W}} || Forward
'''W'''  forward<br />
|-
'''E'''  forward more quickly<br />
| {{Controls|E}} || Fast forward
'''A'''  left<br />
|-
'''D'''  right<br />
| {{Controls|A}} || Left
'''S'''  backwards<br />
|-
'''Q'''  up<br />
| {{Controls|D}} || Right
'''Z'''  down<br />
|-
 
| {{Controls|S}} || Backwards
|-
| {{Controls|Q}} || Up
|-
| {{Controls|Z}} || Down
|}


The camera can be rotated and tilted using the numeric keyboard:
The camera can be rotated and tilted using the numeric keyboard:
{|
| {{Controls|Num8}} || Tilt upward
|-
| {{Controls|Num2}} || Tilt downward
|-
| {{Controls|Num4}} || Rotate left
|-
| {{Controls|Num6}} || Rotate right
|}


There is also a zoom function, again using the numeric keyboard:
{|
| {{Controls|Num+}} || Zoom in
|-
| {{Controls|Num-}} || Zoom out
|}


'''8'''  tilt upward<br />
Remaining functions:
'''2'''  tilt downward<br />
{|
'''4'''  rotate left<br />
| {{Controls|L}} || Toggle crosshair (and tracked target box)
'''6'''  rotate right<br />
|-
| {{Controls|Num/}}<br>{{Controls|Space}} || Target nearest object OR position on ground
|-
| {{Controls|Delete}} || Turn on/off floating mode
|}


==== Introduced in {{arma1}} ====
{|
| {{Controls|F}} || (same as {{Controls|Num/}} / {{Controls|Space}}) tracks targeted object OR position on ground nearest to crosshair
* Targeted objects are indicated with a red crosshair box.
* Targeted ground position is indicated with a  yellow crosshair box.
* Moving objects will be tracked by camera.
* Pressing any camera movement key will cancel object/ground tracking
|-
| {{Controls|A}}/{{Controls|D}} || rotate camera around focused object or position on ground (used after '''F''' option)
|-
| {{Controls|Shift|WASD}} || Faster camera movement
|}


There is also a zoom function, again using the numeric keyboard:
==== Introduced in {{arma2oa}} ====
{|
| {{Controls|N}} || Cycle between normal view / NVG / TI BW / TI WB
|-
| {{Controls|M}} || Open/Close map
|-
| {{Controls|LMB}} || in map - teleport camera to given location
|-
| {{Controls|Ctrl|LMB}} || in map - teleport player to given location
|-
| {{Controls|Num.}} || Teleport camera to position where it was previously terminated
|-
| {{Controls|Num*}} || Copy cursor's position to clipboard
|-
| {{Controls|Ctrl|Num*}} || Teleport player under cursor
|-
| {{Controls|<nowiki/>;}} || Disable camera postprocess
|-
| {{Controls|1}}..{{Controls|9}} || Set pre-defined camera postprocess (stored in ''BIS_DEBUG_CAM_PPEFFECTS'' array, cen be rewritten)
|-
| {{Controls|MSW}} || Modify focus length
* starting at 0, moving up will increase distance
* decreasing it back to 0 will reset to effect and enable autofocus
|}


Pressing {{Controls|V}} will cancel the camera view and return back to normal control.


'''+'''  zoom in<br />
=== Using in Script ===
'''-'''  zoom out<br />


Finally, once you have framed your shot, press the Fire key ({{Controls|Ctrl}} key in {{ofp}} or {{Controls|LMB}} in {{arma}}).
This stores the camera information in the clipboard. You can then press {{Controls|Alt|Tab}} to return to the desktop, and paste the camera information into a text-editor such as Notepad using {{Controls|Ctrl|V}}.
Text is also saved into the '''clipboard.txt''' file in OFP main directory.


Pressing '''L''' will get rid of the crosshair.
For every click you will get an entry in this file that will look something like this:
<sqs>
;=== 22:11:02
_camera camPrepareTarget [684.73,98559.95,-27662.98]
_camera camPreparePos [2545.07,2486.85,9.91]
_camera camPrepareFov 0.700
_camera camCommitPrepared 0
@camCommitted _camera
</sqs>


Note that the keyboard controls above are the default settings. If you have reconfigured your keyboard controls you'll have to find the equivalent keys.


Finally, once you have framed your shot, press the right-hand '''Ctrl''' key. This stores the camera information in the clipboard. You can then press Alt+Tab to return to the desktop, and paste the camera information into a text-editor such as Notepad using Ctrl+V.
== Notes ==


In {{GameCategory|arma1|link= y}} the '''clipboard.txt''' file is created in your {{hl|user\application data}} folder.


The result will look something like this:
'''Example:'''
C:\Documents and Settings\'''WINDOWSUSERNAME'''\Local Settings\Application Data\ArmA\clipboard.txt


Also note there is different way to take camera data in ArmA (see above).


_camera camSetTarget [104843.30,23202.12,-23940.18] <br />
_camera camSetPos [9673.62,4028.58,12.44] <br />
_camera camSetFOV 0.700 <br />
_camera camCommit 0 <br />
@camCommitted _camera


== External links ==


Note that the keyboard controls above are the default settings. If you have reconfigured your keyboard controls you'll have to find the equivalent keys.
For more advanced cutscene tutorials visit {{Link|http://www.ofpec.com/ed_depot/|OFPEC}}.




For more advanced cutscene tutorials visit [http://www.ofpec.com OFPEC]
{{GameCategory|ofp|Editing}}

Latest revision as of 15:03, 10 March 2023

It won't take you long to discover that the original Operation Flashpoint camera options which are found in the editor don't give you the same versatility that you have seen in the official missions or quality user-created cutscenes. The "editor driven cutscene" has long been frowned upon by serious mission makers and for good reason. Seeing the same spinning camera shot and slow zooms over and over make the editor driven cutscene instantly recognisable as novice and that's without mentioning the annoying split second delay before the cutscene gets going.

Thankfully BI accounted for this by having its own method of creating camera cutscenes bypassing the editor options altogether. It is a script which simulates a real camera, which literally lets you point and click your angles, thus allowing you to create cutscenes with minimum fuss.

This script already exists within Flashpoint. By executing the script in-game you can activate a camera which is controlled using the keyboard. It can be moved into practically any position, and a 'snapshot' can be taken containing all the relevant information for that shot. The information can then be pasted into your cutscene script.


Usage

To execute the script create an object - doesn't need to be a soldier - and in its init field type

this exec "camera.sqs"

Now when you preview the mission you will see the cinematic border at the top and bottom of the screen and a view looking North from the object you created. There will be a crosshair in the centre of the screen. If you fail to execute the script from an object, or the object doesn't exist, the camera will be created at 0,0,0 on the map.

Controls

Most of following controls can be easily changed in 'Options -> Controls -> Buldozer controls' menu.

Camera movement is controlled using the following keys:

W Forward
E Fast forward
A Left
D Right
S Backwards
Q Up
Z Down

The camera can be rotated and tilted using the numeric keyboard:

NUM 8 Tilt upward
NUM 2 Tilt downward
NUM 4 Rotate left
NUM 6 Rotate right

There is also a zoom function, again using the numeric keyboard:

NUM + Zoom in
NUM - Zoom out

Remaining functions:

L Toggle crosshair (and tracked target box)
NUM /
Space
Target nearest object OR position on ground
Del Turn on/off floating mode

Introduced in Armed Assault

F (same as NUM / / Space) tracks targeted object OR position on ground nearest to crosshair
  • Targeted objects are indicated with a red crosshair box.
  • Targeted ground position is indicated with a yellow crosshair box.
  • Moving objects will be tracked by camera.
  • Pressing any camera movement key will cancel object/ground tracking
A/D rotate camera around focused object or position on ground (used after F option)
⇧ Shift + WASD Faster camera movement

Introduced in Arma 2: Operation Arrowhead

N Cycle between normal view / NVG / TI BW / TI WB
M Open/Close map
Left Mouse Button in map - teleport camera to given location
Ctrl + Left Mouse Button in map - teleport player to given location
NUM . Teleport camera to position where it was previously terminated
NUM * Copy cursor's position to clipboard
Ctrl + NUM * Teleport player under cursor
; Disable camera postprocess
1..9 Set pre-defined camera postprocess (stored in BIS_DEBUG_CAM_PPEFFECTS array, cen be rewritten)
Mouse Scrollwheel Modify focus length
  • starting at 0, moving up will increase distance
  • decreasing it back to 0 will reset to effect and enable autofocus

Pressing V will cancel the camera view and return back to normal control.

Using in Script

Finally, once you have framed your shot, press the Fire key (Ctrl key in Operation Flashpoint or Left Mouse Button in Arma). This stores the camera information in the clipboard. You can then press Alt + ↹ Tab to return to the desktop, and paste the camera information into a text-editor such as Notepad using Ctrl + V. Text is also saved into the clipboard.txt file in OFP main directory.

For every click you will get an entry in this file that will look something like this:

;=== 22:11:02 _camera camPrepareTarget [684.73,98559.95,-27662.98] _camera camPreparePos [2545.07,2486.85,9.91] _camera camPrepareFov 0.700 _camera camCommitPrepared 0 @camCommitted _camera

Note that the keyboard controls above are the default settings. If you have reconfigured your keyboard controls you'll have to find the equivalent keys.

Notes

In ArmA: Armed Assault the clipboard.txt file is created in your user\application data folder.

Example:

C:\Documents and Settings\WINDOWSUSERNAME\Local Settings\Application Data\ArmA\clipboard.txt

Also note there is different way to take camera data in ArmA (see above).


External links

For more advanced cutscene tutorials visit OFPEC.