Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Krelus on March 31, 2009, 10:35:26 am

Title: Suggestion: Subtitles Appearing On Top Of Cutscene Bars and Fade-Out
Post by: Krelus on March 31, 2009, 10:35:26 am
Currently, if the screen is faded to black/white/red and you display a subtitle, the subtitle doesn't appear. Also, it's impossible to place a subtitle on top of cutscene bars (a la the level titles in Halo).

Is there any way to alter this? For an opening cutscene I'm planning on having the screen suddenly snap to black with a title image appearing.
Title: Re: Suggestion: Subtitles Appearing On Top Of Cutscene Bars and Fade-Out
Post by: Enioch on April 13, 2009, 08:34:44 am
Good request. It would interest me as well.

Currently, in subtitle images dark=transparent, right? So if I make a big 1240x1024 tga with a black background, It will not show up at all.  :doubt:

Rendering on top of fade outs and bars would be good, but what I really would like is a way to use dds with alpha maps as subtitle images...
Title: Re: Suggestion: Subtitles Appearing On Top Of Cutscene Bars and Fade-Out
Post by: Rodo on April 13, 2009, 10:17:17 am
what?? I'm just fredding a mission/cutscene and I get the subtitles over the cutscene bars alright...

check the order of the sexps... make sure that what's executed first is the cutscene bar and after that the subtitle.
Title: Re: Suggestion: Subtitles Appearing On Top Of Cutscene Bars and Fade-Out
Post by: Enioch on April 13, 2009, 10:52:57 am
Yeah, Rodo's right. If the bars are SEXP'd first, then subs can be rendered over them. I just checked it with 3.6.10 RC2

But it's still impossible to fade the screen to black and then flash an image on it...That's what bothers me. If you fade out, you fade out. It's black (or red, or white, don't quibble... :P). End of story. Nothing is visible.
Title: Re: Suggestion: Subtitles Appearing On Top Of Cutscene Bars and Fade-Out
Post by: Krelus on April 13, 2009, 11:20:50 am
Yeah, Rodo's right. If the bars are SEXP'd first, then subs can be rendered over them. I just checked it with 3.6.10 RC2

But it's still impossible to fade the screen to black and then flash an image on it...That's what bothers me. If you fade out, you fade out. It's black (or red, or white, don't quibble... :P). End of story. Nothing is visible.

Interesting.

So I guess all that has to be done is to add .dds and alpha channel support for subtitle images.
Title: Re: Suggestion: Subtitles Appearing On Top Of Cutscene Bars and Fade-Out
Post by: Enioch on April 13, 2009, 11:31:09 am
Yes, PLEASE! :nervous:
Title: Re: Suggestion: Subtitles Appearing On Top Of Cutscene Bars and Fade-Out
Post by: Enioch on April 14, 2009, 03:21:48 am
@Krelus: I have found a workaround, but I don't think you will like it  :D. It involves A LOT of tedious SEXP'ing, breaks the cutscene bars (at least on 3.6.10 RC2) and is really only suitable for ending a cutscene (i.e., if you want a long cutscene that ends in a black screen which then displays your opening logo/title/credit, this is a suitable solution. But if you want a cutscene that plays for a while, then snaps to black, then fades back in and continues, this solution will work, but probably drive you nuts in the process...) It goes like this:

A) Make a fade-out SEXP and add the fade out time, if necessary. It's probably a good idea to give FS some time, though, considering what follows...

B)Chain in a series of remove-background-image and remove-sun-bitmap SEXPs, that will amount to total removal of all background and sun images. This is the driving-you-nuts part, especially if you have a ton of background images. I had 35 in my cutscene and was seeing stars when I was done... :snipe:

C)This is the important part: make a skybox that has a completely black texture and chain its appearance after the disappearance of all the background images, with a set-skybox (or something similar, it's in the 'Backgrounds and Nebulae SEXP category) SEXP.

So, what you have done so far, effectively is this:

You have removed the background enhancements, ending up with a completely black background. Can you see where this is going, yet? :D

D) Chain in a series of camera positioning SEXPs, that will set the camera really far away from the action, to avoid the remote possibility that a ship will fly across your beautifully black screen...

E) Fade back in.

F) Aaaaaand (drumroll) display your subtitle.

Works for me...But it's really tedious and it's just a workaround. So, yeah, dds and alpha support in subs is a must, I think... :doubt:

One final note: Cutscene bars are not working properly if there's a skybox, or if the mission is a subspace one.  :ick:  :mad2: Keep that in mind... ;)

Oh, and make sure and tell us if this will work for you...
Title: Re: Suggestion: Subtitles Appearing On Top Of Cutscene Bars and Fade-Out
Post by: Krelus on April 14, 2009, 11:38:42 am
This might actually work. I took a slightly zen approach to my backgrounds and I have large areas where there are no nebulae. If I get a coupla hours to burn I'll have to give this a stab.

Hey, another idea is to make a planet bitmap that's just a solid black square (some alpha mapping wizardry is required here...) and that will remove the necessity for a skybox.

EDIT: I just did a quick proof-of-concept test with a hilariously stretched planet bitmap and it works. I'm thinking some FOV-monkeying to ensure the player can't see any space whatsoever could be in order.
Title: Re: Suggestion: Subtitles Appearing On Top Of Cutscene Bars and Fade-Out
Post by: Enioch on April 14, 2009, 12:05:30 pm
That's actually better than my idea. And it doesn't break the cutscene bars.

Good job, mate.

Still, dds and eff support (along with Alpha channels) would be the proper way to solve this. If there's anybody out there who can do it, I'd appreciate it.

Title: Re: Suggestion: Subtitles Appearing On Top Of Cutscene Bars and Fade-Out
Post by: Krelus on April 14, 2009, 01:30:06 pm
That's actually better than my idea. And it doesn't break the cutscene bars.

Good job, mate.

Still, dds and eff support (along with Alpha channels) would be the proper way to solve this. If there's anybody out there who can do it, I'd appreciate it.



I've found that I have a gift for pistol-whipping the SCP engine into doing what I want it to, even if it isn't supposed to XD (example) (http://www.hard-light.net/forums/index.php/topic,58072.0.html)