Jump to content
⚠ Known Issue: Media on User Profiles ×

Improved cutscenes with cinematic camera, fades, and more


tewlons

Recommended Posts

I have been focusing on developing cinematic cutscenes for my mod over the last week or so. The creation kit doesn't really make this straightforward, but I have found a way to make them work reliably, with some limitations. In developing this functionality I did a lot of searches on this forum and elsewhere for helpful information. I found a few posts with people trying to do this but they didn't seem to have great results. I've gone through a lot of headaches with trying out different script methods and techniques, and am finally satisfied with the results, so I thought I'd share some of what I've found. At the end of the post I'll include some of the portions of the script that enable my techniques. I could go into a lot more detail about how to call the scripts and how to set up the markers, actors, etc. in the editor. If there is an interest I will post more info and possibly write up a short tutorial.

First, here is what is possible:

Fixed cameras - you can set the position and y rotation of the camera to a fixed angle. Limitations: You cannot control the x and z rotation of the camera. A fade out with a short wait is required to allow the cameraman actor to settle.

Animated cameras - you can start the camera at a fixed position/rotation and then animate it to multiple keyframed positions/rotations. Limitations: You cannot control the x and z rotation of the camera. A fade out with a short wait is required to allow the cameraman actor to settle in its starting position. The animation must stop while the camera is still moving. If the camera reaches its final destination before you cut or fade out, the dummy actor used to control the camera will try to settle itself and cause ugly, unpredictable camera movements

Multiple fixed cameras - The above two examples require fade outs between cuts.While most of the time, a fade out is appropriate before setting the camera, it is not always. Imagine a dialogue between two NPCs where you want to cut to a close-up of the speaker when they speak. The way around this is to use multiple cameraman actors. You will have to use a fade to set up the scene initially with your multiple cameramen in position. Then you can simply toggle between them without fading whenever you want.

Better fades - Game.FadeOutGame() just does not work. It's only real use is to hold the screen completely black. A better solution involves using ImageSpaceModifiers to do the actual fades and Game,FadeOutGame() comes in handy for holding the screen completely black in between the fade out/fade in (which, as it turns out, is only really necessary if you have ENB enabled)

Forcing actors into position - in my experience MoveTo and TranslateToRef don't work well for immediately forcing an actor to position. My approach uses SetPosition and SetAngle instead.

Standard actor packages, dialogue, etc. - However you would normally set up your scenes with dialogue, AI packages, etc., works the same with this method.; However, you may want to slightly rethink your approach in order to make use of improved cameras and fades.

And finally, here are some of the bits of script that accomplish the above techniques. In order to use these scripts, you will need to set the properties for the script, and have another script call these functions. If there's enough interest I may write a step by step tutorial on how to set up a scene. For experienced modders, you should be able to figure it out. Note that for animated cameras, you simply set up a fixed camera using a cameraman actor, and then make multiple calls to TranslateToRef, each followed by a call to Utility.Wait. See comments in the script for more detail.

;**************************************
; Player and cameraman actors
;**************************************
Actor Property PlayerREF Auto
Actor Property CameramanREF Auto

;**************************************
; ImageSpaceModifiers for doing fade out/in
;**************************************
ImageSpaceModifier Property FadeToBlack auto
ImageSpaceModifier Property FadeFromBlack auto
;**************************************
; Fade out the game and hold
; Once faded, you should move scene actors into place,
; move the cameraman into place, start music, or whatever else happens at the beginning of your scene,
; and then call DoFadeIn to fade back in
; Note that Game.FadeOutGame does not work on its own.
; The image space modifiers are required for a reliable smooth fadeout
; The call to Game.FadeOutGame here simply holds the screen at pure black
; I found that with ENB enabled, I cannot get pure black with the ImageSpaceModifier alone
; without ENB, the call to Game.FadeOutGame is not necessary
;**************************************
Function DoFadeOut(float time)
FadeToBlack.Apply()
Utility.Wait(time)
Game.FadeOutGame(False,True,50, 1)
EndFunction

;**************************************
; Fade the game back in after a call to DoFadeOut
;**************************************
Function DoFadeIn(float time)
Game.FadeOutGame(False,True,0.1, 0.1)
FadeToBlack.PopTo(FadeFromBlack)
EndFunction
;**************************************
; Set up a static camera angle using the cameraman actor
; player controls should be completely disabled using Game.DisablePlayerControls
; The marker parameter should be set to an XMarkerHeading reference placed in the editor
; The actor should be set to ghost and have an alpha of 0 (in script)
; The actor should also be defined with the InvisibleRace race (on the actor dialog box)
; The camera can be animated from this position using TranslateToRef
;**************************************
Function StaticCameraman(ObjectReference marker)
CameramanREF.StopTranslation() ; stop any existing translation that may be taking place
CameramanREF.SetPosition(marker.X, marker.Y, marker.Z) ; set position
CameramanREF.SetAngle(marker.GetAngleX(), marker.GetAngleY(), marker.GetAngleZ()) ; set rotation
Game.SetCameraTarget(CameramanREF) ; set target
Game.ForceFirstPerson() ;toggle to first person. Force the game to update the camera when we..
Game.ForceThirdPerson() ;force third person
EndFunction

;**************************************
; Set up a static camera angle using the player actor.
; This version of the static cameraman has the advantage of allowing you to use
; first person view, but it cannot be animated.
; player controls should be completely disabled using Game.DisablePlayerControls
; The marker parameter should be set to an XMarkerHeading reference placed in the editor
; The player should be set to ghost and have an alpha of 0 (in script - and remember to set it back when the scene is done)
;**************************************
Function StaticPlayerCameraman(ObjectReference marker)
PlayerREF.StopTranslation(); stop any existing translation that might already be taking place
PlayerREF.SetPosition(marker.X, marker.Y, marker.Z) ;set position
PlayerREF.SetAngle(marker.GetAngleX(), marker.GetAngleY(), marker.GetAngleZ()); set rotation
Game.SetCameraTarget(PlayerREF) ;set target
Game.ForceThirdPerson(); toggle to third person. Force the game to update the camera when we..
Game.ForceFirstPerson(); force first person
EndFunction

;**************************************
; Force the actor immediately into the position and rotation of the specified marker
; Useful for moving scene actors into place before a camera cut
;**************************************
Function ForceMoveTo(Actor theActor, ObjectReference marker)
theActor.StopTranslation() ;stop any existing translation that may be taking place
theActor.SetPosition(marker.X, marker.Y, marker.Z) ;set the actors position to that of the marker
theActor.SetAngle(marker.GetAngleX(), marker.GetAngleY(), marker.GetAngleZ()) ;set the actor's rotation to that of the marker
EndFunction


Here's a script that calls upon those methods to create a short cutscene. It starts with a fixed camera, focusing on some actors walking into place. Then it cuts to another angle, pans around the actors and continues animating to show off a location in the world.

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; start cutscene
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

CameramanREF.Enable()
CameramanREF.SetAlpha(0.0)
CameramanREF.SetGhost(true)

PlayerREF.SetAlpha(0.0)
PlayerREF.SetGhost(true)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Disable all player controls
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Game.DisablePlayerControls(True, True,True,True, True,True, True, True) ;<br />

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Fade out
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

DoFadeOut(3.0)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Move our actors into starting position.
; These actors have been given AI packages that make
; them behave how we want them to
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
ForceMoveTo(Actor1, Actor1Start)
ForceMoveTo(Actor2, Actor2Start)
ForceMoveTo(Actor3, Actor3Start)
ForceMoveTo(Actor4, Actor4Start)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Set up a static cutscene using the player camera
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

StaticPlayerCameraman(FixCamera1)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Start some music for the scene
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

SceneMusic.Add()

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Fade in
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

DoFadeIn(3.0)

Utility.Wait(12.0)


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;Fade out
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

DoFadeOut(3.0)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Move cameraman into position
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
StaticCameraman(AnimCamera1)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Fade in
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
DoFadeIn(3.0)

MyScene.Start(); for now I am only controlling actor dialogue with the quest scene

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Begin camera animation
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CameramanREF.TranslateToRef(AnimCamera2, 50)
Utility.Wait(10.0)

CameramanREF.TranslateToRef(AnimCamera3, 200)
Utility.Wait(13.0)

CameramanREF.TranslateToRef(AnimCamera4, 200)
Utility.Wait(4.0)

CameramanREF.TranslateToRef(AnimCamera5, 200)
Utility.Wait(4.0)

CameramanREF.TranslateToRef(AnimCamera6, 200)
Utility.Wait(3.0)

CameramanREF.TranslateToRef(AnimCamera7, 200)
Utility.Wait(3.0)

DoFadeOut(2.5)

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Re-enable the player
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

CameramanREF.SetGhost(false)
CameramanREF.SetAlpha(1.0)
CameramanREF.disable()

PlayerREF.SetAlpha(1.0)
PlayerREF.SetGhost(False)
Game.SetCameraTarget( PlayerREF )
Game.EnablePlayerControls()

Utility.Wait(1.0)
DoFadeIn(2.5)

Edited by tewlons
Link to comment
Share on other sites

  • 3 weeks later...

Seems what you have done is exactly what i'm looking for. Frankly I found myself frustrated that they designed the camera system to be hard coded locked to character perspectives. I am, however, very very new to modding skyrim (although i've possessed the CK for over a year now, i've just recently begun really looking into it), and utterly incompetent with scripting atm. Your mention of a full tutorial would be a dream come true for me, as it would assist my learning curve with the actual scripting as well as provide a function i'd like to eventually implement. There has been a great number of mods out there that extend the ability to animate, but virtually none that attempts to utilize them in an aspect where they can are story driven cutscenes, often forcing the player to toggle the clunky ufo cam to actually see what's going on, and just as often discovering that their 'choice' of location has resulted in horrendous clipping, displacement, or other (pardon the pun) condition which wreaks 'havoc' on your viewpoint.

 

In short, i'm begging you. PLEASE make the full tutorial. I'm sure me and thousands of other noob modders would worship you for it (some veterans too, since i've seen little to nothing from that crowd dealing with camera controls either).

Link to comment
Share on other sites

  • 1 month later...

Hey man, thanks for your interest. Honestly, I don't know that I have enough time to devote to Skyrim modding anymore. I started to work on an epic quest mod, and cinematic cameras were only a very small piece of the larger puzzle that I tried to tackle. My background is in game programming. I no longer program games for a living, but I enjoy doing them as a hobby. The mod I was working on was consuming in excess of 60 hours a week and I can't sustain that. My attempts to reach out to the community were mostly fruitless, whether it was trying to share any of what I had learned from the creation kit, or trying to get others interested in helping, and even down to people smiting me for suggesting that it should be more of an open source community.

 

I could have gone on working on it, but eventually the tedium of accomplishing the most basic tasks with the creation kit, the long hours of working on it, and the lack of reception from the community led me to pretty much give up. It's really a shame because I was doing some pretty cool stuff with the mod and it was my goal to bring a really cool, story-rich quest to skyrim.

 

Unfortunately, Skyrim and the creation kit make camera animation unnecessarily difficult. I would like to think think that I have maybe tackled the problem as best as anyone could possibly do. I can only hope that the next Bethesda game will address the problems with camera control, actor dialogue, AI, etc. If they do, I'll be right there modding again.

 

All that said, if you want to see what I have, send me a private message and I will send you my unfinished mod.

Edited by tewlons
Link to comment
Share on other sites

and even down to people smiting me for suggesting that it should be more of an open source community.

 

I agree with that comment, if more people did release their own sources perhaps the quality of mods would improve...(I hope I am using it in the same context as you implied if not I am sorry.)

 

I don't think I would ever find a use for these functions but they are fairly well produced (I use my own manage fades and manage camera functions anyway but they are designed for general play not cutscenes.) This is a nice attempt at something different and a shame to see it stopped not many people use scenes but I find them brilliant.

Edited by BotOwned
Link to comment
Share on other sites

  • 1 month later...

This is what i have been feverishly trying to find or do for the past month.... salvation at last.... Ive been really wanting to setup cutscenes and the internets have failed me.... If you could maybe make a short video tutorial on the effects of the methods I would be most obliged...

 

Amazing work. Sadly I just started to learn papyrus this week to start on my mod and well... I have nowhere near the skills you do...

 

Good Job :D!

Edited by Argrista
Link to comment
Share on other sites

  • 3 months later...

Hey Agrista thanks for the reply.

 

I havent played Skyrim in months and havent been doing any modding. I'm glad to see a few people still finding this thread. I know what a headache it was for me when I started to mod Skyrim and there was absolutely no information out there on how to control the camera.

 

I've got a few private messages asking about stuff I've done, and hmmm, maybe its time for me to revisit some of the work I've done...

Link to comment
Share on other sites

I would love if you could post a tutorial for this. I'm new to modding and have very little knowledge of scripting, but creative writing and story telling is my passion so I have big things planned including massive new quest-lines. I'd love to be able to use this in some of my future mods. Thanks to people like you for sharing their success so that the modding community can grow and improve!!

Link to comment
Share on other sites

  • 10 months later...

I'm not sure if this could be helpful to you. Just wanted to mention this additional way.

 

With FNIS you can use animations with animated camera. Simply define Camera3d in the animation, and set the "-ac" option in the FNIS list for the particular animation definition. The animation can be a one-time, or cyclic.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...