Difference between revisions of "Tutorial - Cutscenes"
(Wiki'd page.) |
(No difference)
|
Revision as of 15:18, 7 November 2008
Introduction : If you want to make cool cutscenes, you have to have some experience with FRED already, otherwise it may be difficult to arrange certain effects....
Contents
1. DEFAULT knowledge
For cutscene art it is important to know a few traits of FRED, the editor. First of all, the order of the entries in a SEXP matters. They are carried out one after another. So, for example, if you let the camera look at an object and then change camera position, you will get other results as if you had set camera position BEFORE letting it look at an object. Second.... The mission itself continues and is not interrupted or paused in any way. When a cutscene is shown, the player's ship can still be shot and destroyed, which means you have to take precautions this does not happen if you let a cutscene play. There are other SEXPS granting the player's ship AI-control and invulnerability. These have to be used as well, nothing is as stupid as being shot while being forced to look a cutscene.
These are the most important SEXPS :
set camera position
This SEXPS positions the camera at a place in the 3-dimensional space. You will have to state x, y and z coordinates. This SEXP also starts a cutscene. If a cutscene is already running, it only changes camera position.
A set camera position SEXP could look like this :
( - ) Set camera position 1 - when - has time elapsed 25 - set camera position 35 0 400
This SEXP sets camera in position ( 35 / 0 / 400 ) after 25 seconds playtime.
set camera facing ( object )
This SEXPS defines the place ( or the object ) the camera is looking at. In addition, the sexp lets you define the time for the camera angle to change. So, if your camera is in position and "looks around", this is the SEXP to use for the effect. This SEXP also starts a cutscene, camera position will be where it was last time. If camera position has not been stated yet, it will be ( 0 / 0 / 0 )
reset camera
This SEXP ends the cutscene and takes you back in your cockpit. If you have put the player's ship under AI control, don't forget to deactivate. A typical SEXP to end cutscene could look like that :
( - ) End Cutscene and take player back to cockpit - when - has time elapsed 40 - player-not-use-AI - unlock-primaries Alpha - reset camera
show subtitle
This SEXP lets you show subtitles on the screen. They nicely add to the atmosphere when used properly. Commonly, the subtitles are .tga pictures stored in the /data/maps folder. In older builds, you have to enable tga/jpg textures in the launcher, otherwise they don't show up. If you look up the SEXP in fred, it is pretty self-explaining. If you have seen EACW examples, they are done like that :
( - ) Show Sub1.tga as subtitle - When - has time elapsed 4 - show subtitle 0 600 4000 sub1 1000 true
The "true" entry at the end of the list applies to the center-horizontally tag and makes fred ignore the "0" for x coords at beginning of the list. The y coord of 600 places the subtitle somewhere near the bottom of the screen, if resolution is set to 1024 * 768 This may cause problems when playing 640*480, but we ignore that for now. The third line of the subtitle SEXP is empty. If you state something here, it will be shown as text in addition to the sub1.tga, which would look rather silly. We don't need any txt, self-made .tga files are much more beautiful ;) The other entries mean the subtitle is shown for 4000 milliseconds and takes an additional second to fade in and later to fade out.
2. FRED knowhow
Unless you are a really talented artist, things don't always look ingame as good as you thought they would. You will have to make many changes in FRED here and there, and you will always have to check them again and again ingame, until you are satisfied with the results.
For this, it is wise to let FS2 run in windowed mode. You can easily switch between fred and the game. Just make changes to the mission in Fred, save them, then just restart the mission ingame and you an instantly see what you have changed.
In order to get the timing right and to find really nice camera positions and angles, it is easier to use the SEXPs in this way :
Use WAYPOINTS in Fred to mark positions in 3d space. Eventually TARGETS do also work, but I am fine with WAYPOINTS.
Example :
If you want the camera in a special place, then - place a waypoint - name it ( for example CAM1 ) - do the SEXP this way :
( - ) Set camera to Postion 1 - when - has time elapsed 15 - set-camera-position - getobjectx CAM1 - getobjecty CAM1 - getobjectz CAM1
This way, if you play around with camera positions and stuff, you just have to drag around the waypoint in 3d space, that’s much easier than typing in coords in the SEXP itself.
You can also use the waypoint trick to let the camera look into your desired directions. For example, place a second waypoint ( CAM2 ) somewhere and do it like this :
( - ) Face Camera position 2 - When - has time elapsed 15 - set camera facing object CAM2
Easy, isnt it ?
Sometimes, you will want to let the camera follow an object in motion. For example, you want it to stay focused on the player for 10 seconds. In my experience I have had no problems doing it THIS way :
( - ) Cam follows player - Every time - AND - has time elapsed 15 - NOT - has time elapsed 25 - set camera facing object Alpha 1
Here we use the EVERY TIME expression, because the camera angle has to be updated continuously to a new position.
!!!!! WARNING !!!!!
Do not use waypoint paths in any way !! The cutscene SEXPs do not discriminate waypoints belonging to a path and cannot utilize them, they do only use the FIRST waypoint of the entire path. So, for cutscenes, use standalone-waypoints only. I put a warning here coz if you try to use path and it doesnt work, you might accidentally **** up things when trying to delete non-functional waypoints..
A BUG :
So far, there is a bug that has not been solved yet. You cannot set camera position DIRECTLY at beginning of a mission. So, a "when has time elapsed 0 -> set camera position" SEXP does not work..
However, you can bypass the bug using an every-time expression :
( - ) Set cam position 1 at beginning of mission - Every time - AND - has time elapsed 0 - NOT - has time elapsed 1 - set camera position getobjectx CAM1 getobjecty CAM1 getobjectz CAM1
That is not very elegant, but at least it works.
Arranging Stuff.
Even though you may be able to handle the camera, you might have some problems with not having a beautiful setting to look at. To solve this problem, you will want to look at the SET-OBJECT-POSITION Sexp Actually, if you do it with a cutscene, you don't get "jumpy" effects. Especially fighters and smaller vessels can easily change position, you do it the same way you set camera position, only with the SET OBJECT POSITION SEXP.
A problem can be larger objects like capital ships and stations. One way to do it is to place a new ship or station on the screen, and when you are satisfied with positioning, you can change the object type to TARGET. You cannot change to waypoint, so we use TARGET. targets are also immaterial. Yet another method to arrange cutscenes is to place doubles of all vessels somewhere in 3d-space. Make the cutscene, and use the SHIP-VANISH SEXP to let em disappear at its end. No one will notice you have been looking at doubles, and the original ships are still where they used to be.
FADE IN and FADE OUT Although you will find the fade SEXPs easy to understand, there is a minor thing you have to pay attention to : You can only fade in after you faded out. So, if you, for example, want to fade in from black at beginning of mission, you have to fade out before. This fade out has to be instantenious, for example :
( - ) Fade in at mission start - when - has time elapsed 0 - fade out 0 - fade in 3000
This creates a nice fade-in effect from black.
3. Advanced stuff with post 3.4b releases
Advanced [b]SET CAMERA POSITION [/b] SEXP. The new SEXP-camera position SEXP allows cannot only simply place the camera in a new position, it allows you to let it smoothly move to this point, starting from its last whereabout. The transit time is to be noted after the three coordinates. In addition, you can specify time used for accelerating camera and for decelerating...
Example
( - ) Camera moves to new position - when - has time elapsed 10 - set camera position - getobjextx cam1 - getobjecty cam1 - getobjectz cam1 10000 1000 5000
This SEXP lets the camera travel to waypoint CAM1 . after 10 seconds playtime. The camera takes a total of 10000 miliseconds ( = 10 seconds ) for this way, accelerating rather quickly at beginning and coming to a smooth standstill.
Without acceleration and decelertation time the camera moves with a constant speed all the time. Fancy stuff The POV SEXP allows to change the POV setting. The POV setting defines the size of the area that is in view when looking in a direction. The larger the POV setting, the more of your surrounding may be still inside the screen. Changing POV is a rare element of dramatization when looking at one object ( seen in the episode SEVERED DREAMS, when Sheridan hears from Hiroshi of the Earthgov fleet heading to arrest him, and the camera seems to blend out his surrounding ) You may experiment with this SEXP, but it is not vital for most cutsenes.
Camera Shudder and rotation
Those SEXPS are yet premature, as they cannot be used to any effect right now. The camera rotation SEXP still is far from beeing easily applied, and does not allow for nice effects like rotating the camera around its own z-axis. Yet. Camera shudder is only for first person view so far, and cannot be employed for cutscenes yet.
As of now, there is no more to say about the technical side of cutscenes.
4. Cutscening Art
Cutscene Art is done step by step. You start with the common triggers to set camera position, with WHEN ( or with EVERY TIME at beginning of mission ) Then you employ a set of SET-CAMERA-POSITION and SET-CAMERA-FACING-OBJECT SEXPs, after you placed some waypoints in 3d space.
To prevent confusion, you should stick to some naming conventions. - Name all waypoints having to do with the camera cam1, cam2, cam3, cam4... - Name models that shall only appear in cutscenes accordingly, for example Alpha1_double, Agrippa_double, etc.... - Same goes for waypoints that are coordinates for change-object-position SEXP....
When watching a cutscene, you may still hear your own annoying engine sound all the time. Especially when a cutscene is on the calm side, this may be a problem. The solution is : The player ship should have the only goal to play dead. If your cutscene shall feature yourself flying around, use a double.
The rest is just experience and feeling...
Greetings and have fun Skullar