Animated Mesh, Cutscene Dialog

You are an experienced programmer and have a problem with the engine, shaders, or advanced effects? Here you'll get answers.
No questions about C++ programming or topics which are answered in the tutorials!
Post Reply
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Animated Mesh, Cutscene Dialog

Post by dlangdev »

I've got a sample demo similar to CDemo up and running, but...

I need a way how to incorporate a cutscene containing a dialog of two actors.

Any ideas how to implement it?

For example:

1) Two actors are placed/loaded in scene.

2a) Actor1 plays animation #1.

2b) Actor2 plays animation #2.

3a) Camera1 moves to position focus on Actor1.

3b) Camera2 moves to position focus on Actor2.

3c) Camera3 moves to position focus on Actor1 and Actor2.

4) Actor 1 and 2 continue dialog.

5) at end of conversation, scene cuts to the next scene.

Thanks in advance.

screenshot:

Image
Image
piiichan
Posts: 59
Joined: Thu May 01, 2008 1:20 am
Location: New Caledonia (France - Pacific)
Contact:

Post by piiichan »

I think the important thing with cut scenes is good timing between the sounds and animations.

You could keep track of the time, then at certain specific times, trigger events such as camera transformations, character animation changes or start playing a sound.

You could develop a simple script language, then load the script from a text file for easier timing tweaking. The script language could define, for example, the time of the event (5400 ms), the subject on which to take action (camera1 or character2), the type of event (moveto or lookat or rotate) then any parameters (0.5 10 8). So it would look like

0 character1 playframes 0 50 loop
0 character1 moveto 0 0 0
0 camera1 lookat 0 0 0
5400 character1 playframes 60 120 noloop
5400 camera1 lookat 10 0 20
....


Hope it helps....
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

nice, i like the idea.

i can write a parser for reading the text, just like what you wrote.

for simplicity's sake, i could design it to use only one file per cutscene, and the order will of these cutscenes will be order by filename numbering similar to obj file animation.

for example:

1) chapter1_01.cutscene
2) chapter1_02.cutscene
3) ichapter1_03.cutscene
Image
piiichan
Posts: 59
Joined: Thu May 01, 2008 1:20 am
Location: New Caledonia (France - Pacific)
Contact:

Post by piiichan »

Yes.

Also, it would be easy to add the ability to specify the text and portrait of the character who is speaking.
For example, by adding a subject "screen", you could specify actions like "displaytext" or "displaypicture". These actions could have effect on GUI elements.

So that would give

chapter1_01.cutscene
...
5400 screen displaytext "your dialogue here"
5400 screen displaypicture "your irrlicht texture name here"
...
10000 screen displaytext "second dialogue"
10000 screen displaypicture "portrait of 2nd character"
...
rogerborg
Admin
Posts: 3590
Joined: Mon Oct 09, 2006 9:36 am
Location: Scotland - gonnae no slag aff mah Engleesh
Contact:

Post by rogerborg »

You may want to jump straight to using a 3rd party scripting language, since you'll likely experience feature creep early and often.
Please upload candidate patches to the tracker.
Need help now? IRC to #irrlicht on irc.freenode.net
How To Ask Questions The Smart Way
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

hi,

thanks again for th tip, i'll definitely consider it. though i'm not sure what interpreter is ready (beta quality) and not pre-alpha.

guess i'll have to make a test program first and see how it goes.

anyway, here is the progress, it now includes CTreeSceneNode.h

i'll add some bush billboards in there later.

Image
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

ok, almost done setting up the scene. two more meshes and the custscene is about to start.

Image
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

here's the scene with material lighting set to false.

i'm going to focus on the actor animation and cutscene next.

Image
Image
Dark_Kilauea
Posts: 368
Joined: Tue Aug 21, 2007 1:43 am
Location: The Middle of Nowhere

Post by Dark_Kilauea »

How many polies did you invest in those crosses?

Or are you using a nice smooth normals tactic to make them look that smooth?
rogerborg wrote:Every time someone learns to use a debugger, an angel gets their wings.
Acki
Posts: 3496
Joined: Tue Jun 29, 2004 12:04 am
Location: Nobody's Place (Venlo NL)
Contact:

Post by Acki »

dlangdev, I don't see what all this posts have to do with your question ??? :shock:
it seems you just ask a short question just to show how your prog progresses (you already did so in an other thread, too)... :lol:
would it not be better to post this in the "Project Announcements" forum ??? ;)

don't get me wrong, I like the screen shots, especially the crosses are looking realy nice... ;)
while(!asleep) sheep++;
IrrExtensions:Image
http://abusoft.g0dsoft.com
try Stendhal a MORPG written in Java
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Dark_Kilauea wrote:How many polies did you invest in those crosses?

Or are you using a nice smooth normals tactic to make them look that smooth?
They're low-poly crosses, with some edge offset. The gradient effect was done using ambient occlusion which is used for testing the model in the scene. The low-poly shape do become apparent at close range, tho. So, I'm currently spending some time porting a SubD (Catmull Clark) code over to help with tesselation. So far, working with SubD code made me realize I need to write a Blender quad exporter and an importer to Irrlicht to test it out. Thanks to Gandaldf's B3D exporter code, I can mod it to fit the SubD test.
Last edited by dlangdev on Mon Jul 28, 2008 10:07 pm, edited 2 times in total.
Image
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Acki wrote:dlangdev, I don't see what all this posts have to do with your question ??? :shock:
it seems you just ask a short question just to show how your prog progresses (you already did so in an other thread, too)... :lol:
would it not be better to post this in the "Project Announcements" forum ??? ;)

don't get me wrong, I like the screen shots, especially the crosses are looking realy nice... ;)
so far, the code is progressing as i'm still writing the parser. i did some modeling yesterday but got stuck with IK and FK, it will be figured out later.

I'm not sure if this is exactly an anouncement, as it's just only a test scene with several cutscenes in it. Maybe when testing is done, tho.
Image
bull
Posts: 36
Joined: Wed Sep 12, 2007 8:49 am
Location: s1Ng4p0R3

Post by bull »

You migh want to look at GameMonkey. It is a script language similar to Lua and C with some kind of multi-threading and synchronizing.
It also have a 3rd party library (gmMachineEx) to bind C++ object directly to script.

I'm using it for my projects and it works quite well.

IMHO, that's the only way you can implement that kind of complex cut scene, where multiple actors act the same time.
My name is bull, for we are many ...
dlangdev
Posts: 1324
Joined: Tue Aug 07, 2007 7:28 pm
Location: Beaverton OR
Contact:

Post by dlangdev »

Hi,

I got the simple file parser working and I really learned a lot from it. So, I'm moving to the next test program which is basically stealing code from Blender and copying the 'set key' into a test program.

From my experience, it seems that setting up a Blender-to-Irrlicht workflow can be made by mixing the two codebase. That will come later.

Thanks guys for the help, really appreciate your help.
Image
Post Reply