Cut Scenes

Blitz3D Forums/Blitz3D Programming/Cut Scenes

Lilprog(Posted 2003) [#1]
Hi,

I have created the world for my game complete with animations for my character, as well as the terrain etc... I want to have some cut scenes in my game that use my animations etc.. Is there any programs or good ways to record cutscenes for playback?

Rob


_PJ_(Posted 2003) [#2]
not sure if it's the best way or most efficient, but what I would do is build an array or include a file containing a set of DATA statements concerning the movement and animation details of all that i required in your cutscene.

For instance,here is a pseudo-example:

DATA entityhandle,turnx,turny,turnz,movex,movey,movez,animatesequencestart,animateseqencelength


perhaps this data could be stored whilst 'acting' it ot in game by first inserting some code to record entitypitch,yaw,roll;entityx,y,z etc into your game loop.

It will require a LOT of small movements, but the more in it, the better it will look.


jhocking(Posted 2003) [#3]
I don't know of any existing apps which are useful for creating cutscenes but there are a number of techniques which will ease the process (I've been thinking for some time about writing a tutorial:)

First, do some planning. I recommend storyboards but whatever works best for you, do that. This is important so that you know exactly what you are creating. If necessary block out the cutscene in a simple animation tool just to tweak everything and really nail exactly what the final cutscene will look like.

Now create animations for all the characters in the cutscene. This step may or may not be necessary depending on the animations used in your game and in your cutscene. If for example the player's character bends down in your cutscene but there is no bending down animation for your game then you will have to add one to the character. Note that, for memory reasons, if there are a lot of one-time-use animations (ie. a movement which only happens once, during a cutscene) you may want to have a separate copy of the model just for the cutscene. For really complex animations/cutscenes you may want to simply animate the entire cutscene in an animation tool and save the character out to play that single long animation sequence; in this case you will still need special cutscene script-data and playback code because characters need to be placed in the scene, the camera has to be controlled, and sounds must be triggered.

Now to script out the animation/generate the cutscene data. For this part, depending on how complex the cutscene is, you may want to write a custom scripting tool or a custom exporter for an existing animation tool. The tool needs to be able to pick and place objects, scrub the timeline, play individual character's/object's animations, and tag/keyframe stuff like where to place the object at various times and what animation to play when. Oh, and don't forget sound; also have tags for what sound to play when. Oh oh, and camera control; you need to tag/keyframe where the camera is at various times. Then save the script as a file which lists data used in your code to play the cutscene. If you don't write a custom tool you can simply write the script file by hand and use an existing animation tool to work out object placement and animations to play vs. time.

Now for code. There are many ways to code the cutscene; the approach Malice suggests is certainly one (fill in the data when you load the scene using the information from the script file.) The main thing I would add is to put the entire cutscene in a separate function and have everything necessary for playback within that function. That is, define local variables used during the animation at the top of the function and have a complete rendering loop (WaitTimer is useful for simple timing code) so that to play the animation you simply call the function. In other words a cutscene playback function something like this pseudocode:

Function PlayCutscene([cutscene name])
	[load cutscene script, objects, and sounds]
	cutsceneTimer=CreateTimer(30)
	
	While [not finished]
		WaitTimer(cutsceneTimer)
		
		[increment the scene]
		
		UpdateWorld
		RenderWorld
		Flip
	Wend

	[free cutscene objects and sounds]
End Function


Then whenever you want to play a cutscene you just call PlayCutscene("cutscene1.csn") with "cutscene1.csn" being the filename of the cutscene script to load.

***

If I were to write a tool to help do cutscenes would people purchase it?


Lilprog(Posted 2003) [#4]
I would buy it if the cost was resonable


Dock(Posted 2004) [#5]
Apologies for resurrecting this topic, but I'm currently working through ideas for cutscenes myself. I would really prefer not to have to use AVI movies in my game, for many reasons not least of which the additional data size to download.

Joe, did you ever develop such a cutscene tool?

I'm wondering if it might be possible to compose a cutscene in MAX, and export the camera and object locations as dummies, then read these in as data for the locations of your models and cameras. Of course you would also need some way of noting certain animations, but that could probably be done with dummy naming. I'm guessing you would need some sort of custom export tool to pull this off though.

One big problem about making a cutscene tool is making some means of having camera splines, at least - I have no idea how this might be achieved.

Are there any good examples of realtime 3D cutscenes achieved in Blitz?


jhocking(Posted 2004) [#6]
No, I never developed a cutscene tool. It didn't seem like many people were interested. I'll be writing a cutscene editor for internal use soon (ie. for me to use in a game I'm developing,) but I can't imagine anyone else would want it; it's pretty limited and the interface is ugly.


AntonyWells(Posted 2004) [#7]
What you want to do(imo) is create a leaf based time array.

Every action has a reaction right? So just make the reactions constant, and then you only have to record the non constant actions.(I.e player presses A, player lets go of A)
In this case, the player movements. (I.e length of cut-scene has no weight on size, only amount of 'time detail'


leaf based means you can change time and do cut scenes easily, because if you remove say action C, all it's children actions(That it caused) are removed from the time line.

Once you have a robust timeline going on, you can quickly piece together dramatic and cinematic cut scenes.
By piecing together self made scenes.

Or you could write a little script layer on top to do things llike 'playerA.runTo(plauyerB.location) etc.'


Tiggertooth(Posted 2004) [#8]
How much interest would there be in a cut scene application?

I was talking with pudding (maker of the B3DPipeline) about adding my Cinematic Armature to the system. I wasn't sure if very many people would really be interested in such a system.

Ken


aCiD2(Posted 2004) [#9]
What i use is sswifts flux system. I have moded it to allow Flux_AnimQueue. Then in my editor i simple specifify paths for the camera and stuff, and it swoops around seamlessly, pretty much. Might also use A* path checking to make sure the camera doesnt go through walls. Not usre on that tho :P


jfk EO-11110(Posted 2004) [#10]
I haven't seen any useful Cutscene recorder. I guess this should be customized for your engine.
Don't know if it was said before, but I think you could write a very simple recorder this way:

Control Character A in the scene and record everything with a macrorecorder, that stores your actions (keys, mouse, realtime). Then when you have finished recording the role of Character A, replay it and this time you control Character B and record Character B in the same time. Now you can play both recordings together, a Dialog for example.
Imagine a Recording Machine in a Sound Studio with multiple tracks. That's about the same, only with Charcters instead of music instruments. you could add any number of Actors to the scene this way.