View Issue Details

IDProjectCategoryView StatusLast Update
0001945FSSCPgraphicspublic2009-12-11 12:06
ReporterKeldorKatarn Assigned ToHery  
PriorityhighSeveritymajorReproducibilityalways
Status resolvedResolutionfixed 
PlatformIBM PCOSWindowsOS VersionVista SP1
Product Version3.6.11 
Target Version3.6.12 RC1Fixed in Version3.6.11 
Summary0001945: Black background in nebula missions with cutscene bars activated.
DescriptionIn nebula missions the background turns black during cutscenes. Tested with latest trunk EXE. See two pictures attached.
Steps To ReproduceSimply open a nebula mission and activate a cutscene (using the bars). I don't know if changing camera is needed. That's possible. It happens in Saga's autopilot cutscenes, so using the hardcoded autopilot cutscenes should cause this to show up as well.
TagsNo tags attached.

Activities

2009-06-29 00:05

 

screen0211.jpg (47,939 bytes)   
screen0211.jpg (47,939 bytes)   

2009-06-29 00:06

 

screen0210.jpg (105,109 bytes)   
screen0210.jpg (105,109 bytes)   

Tolwyn

2009-10-02 07:18

reporter   ~0011206

recorded a video to show what'S exactly going wrong

http://www.wcsaga.net/database/tolwyn/fs2_open_3_6_11r_5610_1.avi

chief1983

2009-11-10 03:39

administrator   ~0011234

Bumping since this is a show stopper.

Hery

2009-11-11 17:47

developer   ~0011246

Apparently, someone tried to fix that problem, but failed. Now the background doesn't turn black, but cutscene bars are no longer black (also when player dies).

2009-11-11 21:15

 

cutscene_bars.patch (1,837 bytes)   
Index: code/freespace2/freespace.cpp
===================================================================
--- code/freespace2/freespace.cpp	(revision 5644)
+++ code/freespace2/freespace.cpp	(working copy)
@@ -2803,6 +2803,11 @@
 		// Set the clip region for the letterbox "dead view"
 		int yborder = gr_screen.max_h/4;
 
+		// Ensure that the bars are black
+		gr_set_color(0,0,0);
+		gr_rect(0, 0, gr_screen.max_w, yborder, false);
+		gr_rect(0, gr_screen.max_h-yborder, gr_screen.max_w, yborder, false);
+
 		//	Numeric constants encouraged by J "pig farmer" S, who shall remain semi-anonymous.
 		// J.S. I've changed my ways!! See the new "no constants" code!!!
 		gr_set_clip(0, yborder, gr_screen.max_w, gr_screen.max_h - yborder*2, false );	
@@ -4545,9 +4550,9 @@
 			yborder = gr_screen.max_h/CUTSCENE_BAR_DIVISOR - fl2i(Cutscene_bars_progress*(gr_screen.max_h/CUTSCENE_BAR_DIVISOR));
 
 		//Set rectangles
-		//gr_set_color(0,0,0);
-		//gr_rect(0, 0, gr_screen.max_w, yborder, false);
-		//gr_rect(0, gr_screen.max_h-yborder, gr_screen.max_w, yborder, false);
+		gr_set_color(0,0,0);
+		gr_rect(0, 0, gr_screen.max_w, yborder, false);
+		gr_rect(0, gr_screen.max_h-yborder, gr_screen.max_w, yborder, false);
 		//Set clipping
 		gr_reset_clip();
 		gr_set_clip(0, yborder, gr_screen.max_w, gr_screen.max_h - yborder*2, false );
@@ -4556,9 +4561,9 @@
 	{
 		int yborder = gr_screen.max_h/CUTSCENE_BAR_DIVISOR;
 
-		//gr_set_color(0,0,0);
-		//gr_rect(0, 0, gr_screen.max_w, yborder, false);
-		//gr_rect(0, gr_screen.max_h-yborder, gr_screen.max_w, yborder, false);
+		gr_set_color(0,0,0);
+		gr_rect(0, 0, gr_screen.max_w, yborder, false);
+		gr_rect(0, gr_screen.max_h-yborder, gr_screen.max_w, yborder, false);
 		gr_reset_clip();
 		gr_set_clip(0, yborder, gr_screen.max_w, gr_screen.max_h - (yborder*2), false );
 	}
cutscene_bars.patch (1,837 bytes)   

chief1983

2009-11-12 05:08

administrator   ~0011247

If you're working with the cutscene bars you will almost certainly want to look at 0001768.

Hery

2009-11-19 13:30

developer   ~0011308

chief1983 committed my patch to the trunk.

KeldorKatarn

2009-12-10 16:32

reporter   ~0011397

This still doesn't work with build fs2_open_3_6_11r-20091125_r5686

Hery

2009-12-10 17:55

developer   ~0011398

I can't reproduce this bug, but I found another one (when player dies in nebula with cutscene bars on).

http://quarnos.org/dl/cutscene_bars_build.zip

KeldorKatarn, check if this build fixes your problem.

KeldorKatarn

2009-12-10 21:29

reporter   ~0011399

Yes, no more black background with that one. What did you change?

2009-12-10 21:47

 

nebula_bars.patch (2,235 bytes)   
Index: code/freespace2/freespace.cpp
===================================================================
--- code/freespace2/freespace.cpp	(revision 5710)
+++ code/freespace2/freespace.cpp	(working copy)
@@ -3904,6 +3904,8 @@
 	gr_zbuffer_clear(TRUE);
 	clip_frame_view();
 
+	neb2_set_frame_backg();
+
 #ifndef DYN_CLIP_DIST
 	if (!Cmdline_nohtl) {
 		gr_set_proj_matrix(Proj_fov, gr_screen.clip_aspect, Min_draw_distance, Max_draw_distance);
Index: code/nebula/neb.cpp
===================================================================
--- code/nebula/neb.cpp	(revision 5710)
+++ code/nebula/neb.cpp	(working copy)
@@ -470,6 +470,23 @@
 	}
 }
 
+void neb2_set_frame_backg() {
+	ubyte tr = gr_screen.current_clear_color.red;  
+	ubyte tg = gr_screen.current_clear_color.green;
+	ubyte tb = gr_screen.current_clear_color.blue; 
+
+	neb2_get_fog_color(
+		&gr_screen.current_clear_color.red,
+		&gr_screen.current_clear_color.green,
+		&gr_screen.current_clear_color.blue);
+	
+	gr_clear();
+	
+	gr_screen.current_clear_color.red   = tr;
+	gr_screen.current_clear_color.green = tg;
+	gr_screen.current_clear_color.blue  = tb;
+}
+
 // call before beginning all rendering
 void neb2_render_setup(camid cid)
 {
@@ -485,21 +502,8 @@
 	if (Neb2_render_mode == NEB2_RENDER_HTL) {
 		// RT The background needs to be the same colour as the fog and this seems
 		// to be the ideal place to do it
-		ubyte tr = gr_screen.current_clear_color.red;  
-		ubyte tg = gr_screen.current_clear_color.green;
-		ubyte tb = gr_screen.current_clear_color.blue; 
+		neb2_set_frame_backg();
 
-		neb2_get_fog_color(
-			&gr_screen.current_clear_color.red,
-			&gr_screen.current_clear_color.green,
-			&gr_screen.current_clear_color.blue);
-		
-		gr_clear();
-		
-		gr_screen.current_clear_color.red   = tr;
-		gr_screen.current_clear_color.green = tg;
-		gr_screen.current_clear_color.blue  = tb;
-
 		return;	 
 	}
 
Index: code/nebula/neb.h
===================================================================
--- code/nebula/neb.h	(revision 5710)
+++ code/nebula/neb.h	(working copy)
@@ -140,5 +140,8 @@
 
 void neb2_get_fog_color(ubyte *r, ubyte *g, ubyte *b);
 
+// set frame background color
+void neb2_set_frame_backg();
 
+
 #endif
nebula_bars.patch (2,235 bytes)   

Hery

2009-12-10 21:53

developer   ~0011400

Now, background color is set twice, similarly to the clipping settings. This is necessary because of RTT code which needs to change current configuration for its own purpose, but doesn't restore it afterwards.

Patch attached.

Hery

2009-12-11 12:06

developer   ~0011401

Fix committed.

Issue History

Date Modified Username Field Change
2009-06-29 00:05 KeldorKatarn New Issue
2009-06-29 00:05 KeldorKatarn File Added: screen0211.jpg
2009-06-29 00:06 KeldorKatarn File Added: screen0210.jpg
2009-10-02 07:18 Tolwyn Note Added: 0011206
2009-11-10 03:39 chief1983 Note Added: 0011234
2009-11-10 03:39 chief1983 Priority normal => high
2009-11-10 03:39 chief1983 Target Version => 3.6.12 RC1
2009-11-11 17:47 Hery Note Added: 0011246
2009-11-11 17:47 Hery Status new => assigned
2009-11-11 17:47 Hery Assigned To => Hery
2009-11-11 21:15 Hery File Added: cutscene_bars.patch
2009-11-12 05:08 chief1983 Note Added: 0011247
2009-11-19 13:30 Hery Note Added: 0011308
2009-11-19 13:30 Hery Status assigned => resolved
2009-11-19 13:30 Hery Fixed in Version => 3.6.12 RC1
2009-11-19 13:30 Hery Resolution open => fixed
2009-12-10 16:32 KeldorKatarn Note Added: 0011397
2009-12-10 16:32 KeldorKatarn Status resolved => feedback
2009-12-10 16:32 KeldorKatarn Resolution fixed => reopened
2009-12-10 17:55 Hery Note Added: 0011398
2009-12-10 21:29 KeldorKatarn Note Added: 0011399
2009-12-10 21:47 Hery File Added: nebula_bars.patch
2009-12-10 21:53 Hery Note Added: 0011400
2009-12-11 12:06 Hery Note Added: 0011401
2009-12-11 12:06 Hery Status feedback => resolved
2009-12-11 12:06 Hery Fixed in Version 3.6.12 RC1 => 3.6.11
2009-12-11 12:06 Hery Resolution reopened => fixed