Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: Bobboau on November 01, 2003, 03:32:04 pm

Title: idea for trail rendering
Post by: Bobboau on November 01, 2003, 03:32:04 pm
I just had an idea for rendering trails, what if we use tristrips?
I'm not the first person to think this am I?
it would also be good if we sorted them by texture
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 01, 2003, 10:28:43 pm
nobody want to respond?

I've got it working, need to do some optomiseing
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 01, 2003, 11:14:13 pm
GREAT GHOST OF DOOKIE!! :eek2: :eek: :eek2:
look at the diference between them
the old
(http://freespace.volitionwatch.com/blackwater/oldscreen00.jpg)
the new
(http://freespace.volitionwatch.com/blackwater/screen00.jpg)
note how much smaller those blue lines are on the second one
:eek2: :eek: :eek2:

were looking at at least a 10% overall perfomence increse from just this alone!
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 01, 2003, 11:41:41 pm
eh, uh, I'm going to commit this :D
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 01, 2003, 11:44:32 pm
OGL people you will now have to handel tristrips in your draw primitive comand, you will also have to raise the maximum number of verts in a poly to 129, yes that is a bit much but I don't realy think it's going to hurt anything
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 01, 2003, 11:50:40 pm
were the hell is everybody this place has been dead as death all day

it's commited, I'm going to see about organising by texture.
Title: idea for trail rendering (10% performance increase)
Post by: Setekh on November 01, 2003, 11:53:03 pm
Quote
Originally posted by Bobboau
this place has been dead as death all day


You're right, that's pretty dead. That's seriously impressive, btw... It'll be huge in intense missions. :yes: Want me to move this to the public forum?
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 02, 2003, 12:05:44 am
well aside from telling people I've come up with a way to render trails faster it realy wouldn't serve any perpose, but it wouldn't hurt, meh, I don't care
Title: idea for trail rendering (10% performance increase)
Post by: Setekh on November 02, 2003, 12:11:30 am
10% overall increase in performance? That speaks in any language, Bob. ;) Moved.
Title: idea for trail rendering (10% performance increase)
Post by: phreak on November 02, 2003, 12:15:36 am
that looks like more than 10%
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 02, 2003, 12:19:28 am
10 was sort of a conservitve estimate actualy, once you get more than just a bunch of missle trails on screen it's going to be less of a factor on overall perfomence, but I did go from 5 bars to 1 in the untransformed and lit polys wich in that shot was almost entierly trails being drawen
Title: idea for trail rendering (10% performance increase)
Post by: Fractux on November 02, 2003, 12:23:23 am
:yes: :yes: :yes:

Looks really good!

Cheers!
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 02, 2003, 12:30:41 am
I'm out of my mind tierd at the moment, I think I made something that will render only trails of one texture at a time, and cycle through all textures, it seems to work, but it looks so hackish I'm not going to commit it any time soon,
it kinda reminds me of the code I made for moveing active lights in the buffer rendering code

Code: [Select]

int used_textures[256];

bool has_been_used(int t){
for(int i = 0; i<256; i++)if(used_textures[i]=t)return false;
return true;
}
void trail_render_all()
{
trail *trailp;
trail *firsttrail;

if ( !Detail.weapon_extras ) {
// No trails at slot 0
return;
}

memset((void*)used_textures,-1,sizeof(int)*256);
int n_used_t = 0;

firsttrail=trailp=GET_FIRST(&Trail_used_list);

int current_texture = -2;
while ( trailp!=END_OF_LIST(&Trail_used_list) ) {
if(!has_been_used(current_texture)){
current_texture = trailp->info.bitmap;

while ( trailp!=END_OF_LIST(&Trail_used_list) ) {
if(current_texture != trailp->info.bitmap)break;
trail_render(trailp);
trailp=GET_NEXT(trailp);
}
}

used_textures[n_used_t++] = current_texture;
}

}


what we need now is a point sprite based particle rendering system, but that is going to require something more creative than just simple changeing draw bit map to render point sprite, were gona have to realy sort by texture and were probly going to have to do some crazy **** to said textures, I'm thinking something like moveing all textures of an animation into a single texture ether chaining them or doing 3d textures or just haveing each frame somewere on a single texture (like if you pasted them all to a texture that was realy wide) and altering the UV coords of the sprites, if that's posable
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 02, 2003, 12:33:27 am
oh, and you may note a bug in that first one somehow lighting was getting turned back on before trails were getting rendered, I couldn't figure out how or were, I just had to turn it off before rendering the trails
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 02, 2003, 01:02:05 am
http://freespace.volitionwatch.com/blackwater/fs2_open_t.zip
play,
if you note trails not showing up when they should be that would most likely be due to that texture sorting thing not working, tell me if that happens

also tell me if anyone cann sence any boost in rendering rates, most people will probly get only marginal increses of 10-5 fps

you should note that this is the most up to date EXE avalable and many of the common TH&L bugs are sorted out, the only big one still left is the subspace-node-not-rendering bug, there are a few nebula bugs to be sorted as well
Title: idea for trail rendering (10% performance increase)
Post by: Ypoknons on November 02, 2003, 03:47:41 am
Getting good perofrmance on this one, especially HTL.
Title: idea for trail rendering (10% performance increase)
Post by: FreeTerran on November 02, 2003, 04:00:41 am
hey nice stuff bob :)
Title: idea for trail rendering (10% performance increase)
Post by: Flipside on November 02, 2003, 05:51:20 am
Oooohhh... just testing :D

Flipside :)
Title: idea for trail rendering (10% performance increase)
Post by: Lightspeed on November 02, 2003, 06:06:16 am
Test results:

good stuff:
- flickering effect bugs disappeared
- lighting effects improved
- framerate goes from 20-30 situations (last non-HT&L build) to 90-120
- nebula effects on capships look more realistic

still to fix:
- still getting the multiplayer problem multiplayer problem (http://www.hard-light.net/forums/index.php/topic,18455.0.html) (it wants me to set an internet connection and when i do, it crashes when i want to create a game (i get to the gameroom OK)
- The trails sometimes have ghosts that are totally out of place (best situation to see that is in nebulas, since youll b e getting white blocks sometimes as the trail moves to the side instead of backwards)
- Sometimes theres lockups of 0.2 to 0.4 seconds (the framerate drops waayyyyy down) and then it goes back up to 120 FPS. This effect is not reproducable, i.e. if you turn the same direction again, face the same ships, have the same speed, you will not get the effect again.
- explosions and particle stuff seem to have problems: Normally they're always turned to face the current view point, but it seems to fail in this build, i'm getting flat explosions viewable from the side.
- Last & Most important: if i disable HT&L the game crashes whenever i enter the tech room. (works fine with HT&L)
Title: idea for trail rendering (10% performance increase)
Post by: FreeTerran on November 02, 2003, 06:14:02 am
Quote
Originally posted by Lightspeed
- Last & Most important: if i disable HT&L the game crashes whenever i enter the tech room. (works fine with HT&L)

If i disable HT&L the work the tech room fine but if i press the mission start button and enter the mission they jump out to the desktop
Title: idea for trail rendering (10% performance increase)
Post by: Kakis on November 02, 2003, 06:14:52 am
Nice

got some bugs for you though :D

First when a beam is fired, there is a small beam in the upper left corner as well.

(http://w1.213.telia.com/~u21313032/beam.jpg)


The second bug is sometimes missile trails gets a duplicate (not sure if it's always a duplicate could possibly be just one) that at first view seems to point in a (random?) direction infinitly long.

(http://w1.213.telia.com/~u21313032/dup.JPG)

This might have something to do with the following which occured once in a while when playing a nebula mission

(http://w1.213.telia.com/~u21313032/glow.JPG)

The performance seems to be better, not sure what I'm suppose to compare with though. But it feels nice :yes:
Title: idea for trail rendering (10% performance increase)
Post by: Setekh on November 02, 2003, 06:27:50 am
Quote
Originally posted by Kakis
Nice

got some bugs for you though :D

First when a beam is fired, there is a small beam in the upper left corner as well.

(http://w1.213.telia.com/~u21313032/beam.jpg)


:blah:

Maybe I'm going blind, dude, but I can't see any beam in the upper left corner. :o
Title: idea for trail rendering (10% performance increase)
Post by: FreeTerran on November 02, 2003, 06:32:33 am
Quote
Originally posted by Setekh


:blah:

Maybe I'm going blind, dude, but I can't see any beam in the upper left corner. :o

ok then i'm blind too :doubt:
Title: idea for trail rendering (10% performance increase)
Post by: Flipside on November 02, 2003, 06:36:13 am
Maybe he means that little white light in the very top left that looks a bit like a sun almost off the screen?

Flipside :D
Title: idea for trail rendering (10% performance increase)
Post by: Kakis on November 02, 2003, 06:40:47 am
Quote
Originally posted by Setekh


:blah:

Maybe I'm going blind, dude, but I can't see any beam in the upper left corner. :o



Bleh...made it a bit more clear:

(http://w1.213.telia.com/~u21313032/beam2.JPG)

The green quarter of a beam in the upper left corner is drawn when a beam is fired (as seen on the picture). It dissapears as the beam stopps.
Title: idea for trail rendering (10% performance increase)
Post by: Setekh on November 02, 2003, 06:44:05 am
Oh, beamglow. Gotcha. Yeah, that's wierd. :)
Title: idea for trail rendering (10% performance increase)
Post by: Flipside on November 02, 2003, 06:52:36 am
Naaaa... that's your green in-cockpit 'some buggers firing a beam weapon' light, it's a new feature ;)

Flipside :D
Title: idea for trail rendering (10% performance increase)
Post by: Fineus on November 02, 2003, 06:54:51 am
Say, that's not a bad idea ;)

Nice alteration by the way Bob - well done!
Title: idea for trail rendering (10% performance increase)
Post by: Lightspeed on November 02, 2003, 07:51:22 am
another thing. Why does it turn V-Sync off?
Title: idea for trail rendering (10% performance increase)
Post by: Kakis on November 02, 2003, 08:00:52 am
Quote
Originally posted by Lightspeed
another thing. Why does it turn V-Sync off?


Yeah...I noticed that too. It was quite annoying to have it on as it was before.

I also got some funny sound effects one time I tested. Like the speech got some EAX filter that was uhm...unusual. :wtf:
Title: idea for trail rendering (10% performance increase)
Post by: Ypoknons on November 02, 2003, 08:06:48 am
The beamglow seems to flicker in size a lot too - sometimes it covers the whole screen (INF situations).
Title: idea for trail rendering (10% performance increase)
Post by: RandomTiger on November 02, 2003, 08:12:27 am
V-Sync off is my fault I think.
Title: idea for trail rendering (10% performance increase)
Post by: Starks on November 02, 2003, 09:08:38 am
Quote
Originally posted by Bobboau
http://freespace.volitionwatch.com/blackwater/fs2_open_t.zip
play,
if you note trails not showing up when they should be that would most likely be due to that texture sorting thing not working, tell me if that happens

also tell me if anyone cann sence any boost in rendering rates, most people will probly get only marginal increses of 10-5 fps

you should note that this is the most up to date EXE avalable and many of the common TH&L bugs are sorted out, the only big one still left is the subspace-node-not-rendering bug, there are a few nebula bugs to be sorted as well
Is this 3.5.6a or 3.5.5?
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 02, 2003, 10:48:29 am
Lightspeed

ok, multi-player is still WIP and not my responsibility, you shouldn't use it if the master game server isn't on, wich it isn't

can you give me a screen shot of these ghosts, maybe tell me when they seem to show up if you can find a paturn

the locking is probly due to the game loading things, this is a problem that FS has alays had

the thing that renders bitmaps in this build is sort of a hack, it's going to be replaced with something beter and faster eventualy

I think I know why it's crashing


Kakis

that's weird,

and could you get a better pic of that traill bug like up close in high resolution
Title: idea for trail rendering (10% performance increase)
Post by: Kakis on November 02, 2003, 12:03:12 pm
Quote
Originally posted by Bobboau

[...]

Kakis

that's weird,

and could you get a better pic of that traill bug like up close in high resolution


Why don't you reproduce it instead. Play "The six wonder" mission and just look at the NTC Cato from your starting position. Thats where I got the screen and so far it has always apperad there.

I have seen the bug several times (also in fighter/bomber battles) but usually it's very short (but indeed noticable since it could go stragiht across the screen) but since it appears here from a slow straight firing ship it's kind of stable. It seems to have something with angle to do. Try to fly around it.
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 02, 2003, 12:13:28 pm
ok, I think I fixed it, zip has been updated
Title: idea for trail rendering (10% performance increase)
Post by: IceFire on November 02, 2003, 12:38:02 pm
Great work...I'll still wait a bit before I jump to the newest EXE's but things are looking great!
Title: idea for trail rendering (10% performance increase)
Post by: Kakis on November 02, 2003, 12:44:37 pm
Quote
Originally posted by Bobboau
ok, I think I fixed it, zip has been updated


Yup seems gone.

Now this is what I like!

I report a bug (okay, explained it a bit better, buy anyway). Go down for dinner. When I come back the bug is fixed! :yes: :yes: :yes:
Title: idea for trail rendering (10% performance increase)
Post by: Kakis on November 02, 2003, 12:52:05 pm
doh...made a mistake

But I might as well use it for saying that it seems to have fixed those weird effects in the nebula as well.
Title: idea for trail rendering (10% performance increase)
Post by: Flipside on November 02, 2003, 01:48:55 pm
One little buglet, the Sun is still shining through things, or at least, it shone through an asteroid :)

Flipside :D
Title: idea for trail rendering (10% performance increase)
Post by: Carl on November 02, 2003, 03:47:50 pm
it does that in vanilla FS2.
Title: idea for trail rendering (10% performance increase)
Post by: Solatar on November 02, 2003, 04:00:22 pm
It crashes for me whenever I go to the tech room.

P4 1.8Ghz
1024mb RAM
ATI Radeon 9000 Pro 128mb
windows XP
Title: idea for trail rendering (10% performance increase)
Post by: GT-Keravnos on November 02, 2003, 04:59:40 pm
Those trails along with the other ones. Hmm good to be able to choose, although with 10% increase in FPS, I think we have a winner.
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 02, 2003, 10:07:17 pm
Solatar
A) are you useing the -htl comand line option
B) what was the last build that worked for you

and becase I did a little experement that failed miserably I'm going to post the change to the trail rendering function so I can copy and paste it into a fresh copy

Code: [Select]

void trail_render( trail * trailp )
{
TIMERBAR_PUSH(6);
gr_set_lighting(false,false);//this shouldn't need to be here but it does need to be here, WHY!!!!!!!?-Bobboau
trail_info *ti;

if ( trailp->tail == trailp->head ) return;

ti = &trailp->info;

vector topv, botv, *fvec, last_pos, tmp_fvec;
vertex  top, bot;

int sections[NUM_TRAIL_SECTIONS];
int num_sections = 0;

int n = trailp->tail;

// if this trail is on the player ship, and he's in any padlock view except rear view, don't draw
if((Player_ship != NULL) && trail_is_on_ship(trailp - Trails, Player_ship) && (Viewer_mode & (VM_PADLOCK_UP | VM_PADLOCK_LEFT | VM_PADLOCK_RIGHT)) ){
return;
}

do {
n--;
if ( n < 0 ) n = NUM_TRAIL_SECTIONS-1;


if ( trailp->val[n] > 1.0f ) {
break;
}

sections[num_sections++] = n;

} while ( n != trailp->head );

int i;

vertex *vlist[MAX_TRAIL_POLYS];
vertex v_list[MAX_TRAIL_POLYS];
int nv = 0;

for (i=0; i {

if(nv>MAX_TRAIL_POLYS-3)Error( LOCATION, "too many verts in trail render\n" );

n = sections[i];

float w;
ubyte l;

w = trailp->val[n]*(ti->w_end - ti->w_start) + ti->w_start;
l = (ubyte)fl2i((trailp->val[n]*(ti->a_end - ti->a_start) + ti->a_start)*255.0f);

vector pos;

pos = trailp->pos[n];

if ( i == 0 ) {
//fvec =
//&objp->orient.fvec;
if ( num_sections > 1 ) {

vm_vec_sub(&tmp_fvec, &pos, &trailp->pos[sections[i+1]] );
vm_vec_normalize_safe(&tmp_fvec);
fvec = &tmp_fvec;

} else {
fvec = &tmp_fvec;
fvec->xyz.x = 0.0f;
fvec->xyz.y = 0.0f;
fvec->xyz.z = 1.0f;
}
} else {
vm_vec_sub(&tmp_fvec, &last_pos, &pos );
vm_vec_normalize_safe(&tmp_fvec);
fvec = &tmp_fvec;
}

trail_calc_facing_pts( &topv, &botv, fvec, &pos, w );

if(!Cmdline_nohtl){
g3_transfer_vertex( &top, &topv );
g3_transfer_vertex( &bot, &botv );
}else{
g3_rotate_vertex( &top, &topv );
g3_rotate_vertex( &bot, &botv );
}
top.a = bot.a = l;

if ( i > 0 ) {

if ( i == num_sections-1 ) {
// Last one...
vector centerv;
vm_vec_avg( ¢erv, &topv, &botv );
if(!Cmdline_nohtl){
g3_transfer_vertex( &v_list[nv+2], ¢erv );
}else{
g3_rotate_vertex( &v_list[nv+2], ¢erv );
}
v_list[nv].a = l;

vlist[nv] = &v_list[nv];
vlist[nv]->u = float(i);  vlist[nv]->v = 1.0f;
vlist[nv]->r=vlist[nv]->g=vlist[nv]->b=l; vlist[nv]->spec_r=vlist[nv]->spec_g=vlist[nv]->spec_b=0;;
nv++;
vlist[nv] = &v_list[nv];
vlist[nv]->u = float(i);  vlist[nv]->v = 0.0f;
vlist[nv]->r=vlist[nv]->g=vlist[nv]->b=l; vlist[nv]->spec_r=vlist[nv]->spec_g=vlist[nv]->spec_b=0;
nv++;
vlist[nv] = &v_list[nv];
vlist[nv]->u = float(i+1);  vlist[nv]->v = 0.5f;
vlist[nv]->r=vlist[nv]->g=vlist[nv]->b=0; vlist[nv]->spec_r=vlist[nv]->spec_g=vlist[nv]->spec_b=0;
nv++;



} else {

vlist[nv] = &v_list[nv];
vlist[nv]->u = float(i);  vlist[nv]->v = 1.0f;
vlist[nv]->r=vlist[nv]->g=vlist[nv]->b=l; vlist[nv]->spec_r=vlist[nv]->spec_g=vlist[nv]->spec_b=0;
nv++;
vlist[nv] = &v_list[nv];
vlist[nv]->u = float(i);  vlist[nv]->v = 0.0f;
vlist[nv]->r=vlist[nv]->g=vlist[nv]->b=l; vlist[nv]->spec_r=vlist[nv]->spec_g=vlist[nv]->spec_b=0;
nv++;

}
}


last_pos = pos;
v_list[nv] = top;
v_list[nv+1] = bot;
}
if(!nv)return;
if(nv<3)Error( LOCATION, "too few verts in trail render\n" );
if(nv>MAX_TRAIL_POLYS-1)Error( LOCATION, "too many verts in trail render\n" );

gr_set_bitmap(ti->bitmap, GR_ALPHABLEND_FILTER, GR_BITBLT_MODE_NORMAL, 1.0f );
if ( D3D_enabled || OGL_inited ) {
if(Cmdline_nohtl)g3_draw_poly( nv, vlist, TMAP_FLAG_TEXTURED|TMAP_FLAG_ALPHA|TMAP_FLAG_GOURAUD | TMAP_FLAG_RGB | TMAP_FLAG_TRISTRIP );
else g3_draw_poly( nv, vlist, TMAP_FLAG_TEXTURED|TMAP_FLAG_ALPHA|TMAP_FLAG_GOURAUD | TMAP_FLAG_RGB | TMAP_HTL_3D_UNLIT | TMAP_FLAG_TRISTRIP );
} else {
if(Cmdline_nohtl)g3_draw_poly( nv, vlist, TMAP_FLAG_TEXTURED | TMAP_FLAG_TRISTRIP);
else g3_draw_poly( nv, vlist, TMAP_FLAG_TEXTURED | TMAP_FLAG_TEXTURED | TMAP_HTL_3D_UNLIT | TMAP_FLAG_TRISTRIP);
}
TIMERBAR_POP();
}
Title: idea for trail rendering (10% performance increase)
Post by: Unknown Target on November 02, 2003, 10:13:56 pm
Quote
Originally posted by Bobboau
GREAT GHOST OF DOOKIE!! :eek2: :eek: :eek2:
 


lmao, made me chuckle :D

Anyway, looks good, but are the trails supposed to look any different than just drawing closer to the player?
And how is the performance increased (what things are cut out, inserted, etc?)?
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 02, 2003, 10:27:58 pm
they should look exactly the same, but just render a lot faster, rather than rendering one segment of the trail at a time the whole lot gets sent off in one go, not only that but the pacage they are sent off in is one of the most efecent ways to store polygon data so even there it is getting a boost.

rather than a bunch of trifans
Code: [Select]

 __   __   __
|\ | |\ | |\ |
|_\| |_\| |_\|

it is end out as a tri strip
Code: [Select]

 _________
|\ |\ |\ |
|_\|_\|_\|


as you can see not only are fewer calls made to draw primitive but less is sent with the first one requireing 12 verts and the tristrip version requireing a mear 8, and the diference only gets bigger with larger trails

you wouldn't beleve the number of times I had to edit that to get my ACII art to look right,
and that line was from invader Zim, see thread in gen discus
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 02, 2003, 11:08:40 pm
just notised, it doesn't seem to work outside HT&L, it should work hmm
Title: idea for trail rendering (10% performance increase)
Post by: IPAndrews on November 03, 2003, 04:13:43 am
Any work to squeeze extra FPS out of the engine by making it slicker and more efficient is worthwhile work. So thanks for your continued effort in this respect Bobboau. Unfortunately I have to report that I've this latest work has resulted in an infinite performance decrease on my system.

The first version of the executable to incorperate HT&L was playable and quite a bit smoother. At least on the rare occasions the system wasn't swapping out due to the huge memory requirements. This latest version however, reliably crashes to desktop as soon as a model is rendered. ie: tech room or mission start. RIP FSOpen. Someone play the death march.
Title: idea for trail rendering (10% performance increase)
Post by: Lightspeed on November 03, 2003, 07:17:31 am
Quote
Originally posted by Bobboau
Lightspeed

ok, multi-player is still WIP and not my responsibility, you shouldn't use it if the master game server isn't on, wich it isn't

can you give me a screen shot of these ghosts, maybe tell me when they seem to show up if you can find a paturn

the locking is probly due to the game loading things, this is a problem that FS has alays had

the thing that renders bitmaps in this build is sort of a hack, it's going to be replaced with something beter and faster eventualy

I think I know why it's crashing


Kakis

that's weird,

and could you get a better pic of that traill bug like up close in high resolution


the ghosts are what kakis posted (the nebula pic) At the end of the trail a fine line points away to some random direction, making funny effects with nebula trails and missiles trails (missile trails will look okay, except for the little line though, whereas nebula trails create that funny effect posted earlier). Note that this doesnt happen always, but sometimes. The locking up did not happen in the last build running without HT&L, so it's gotta be something HT&L specific.
Title: idea for trail rendering (10% performance increase)
Post by: Lightspeed on November 03, 2003, 07:18:46 am
oh, and pleeaassee could you slam in an ambient light command line in the next build? :D
Title: idea for trail rendering (10% performance increase)
Post by: Setekh on November 03, 2003, 07:42:29 am
Quote
Originally posted by IPAndrews
The first version of the executable to incorperate HT&L was playable and quite a bit smoother. At least on the rare occasions the system wasn't swapping out due to the huge memory requirements. This latest version however, reliably crashes to desktop as soon as a model is rendered. ie: tech room or mission start. RIP FSOpen. Someone play the death march.


Same report here. Been able to run all the previous SCP builds, just this one that splutters and dies as soon as a model is on-screen.

P3-500, 384MB SDRAM
GF4 MX420, 64MB
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 03, 2003, 09:13:34 am
you all are usieing the -thl comand line right?
Title: idea for trail rendering (10% performance increase)
Post by: phreak on November 03, 2003, 09:44:05 am
i didn't get this yet for opengl non-tnl.  i think there may be some underlying bugs in the setup code

i still need to flesh out a bug or two for tnl stuff.  mainly ships don't rotate in the techroom but the turrets do.  it looks odd.
Title: idea for trail rendering (10% performance increase)
Post by: Lightspeed on November 03, 2003, 10:56:50 am
Quote
Originally posted by Bobboau
you all are usieing the -thl comand line right?


-using htl: works fine, except for some minor bugs i stated earlier

-not using htl: crashes when i try entering the tech room (havent tried to actually play a mission, but my guess is that it would crash too)
Title: idea for trail rendering (10% performance increase)
Post by: Merlin-TC on November 03, 2003, 10:57:35 am
I tested it and D3D8 seems to run quite nice. I am still impressed by this project though I only test it for some days now :)

I cannot see the jump node but this is a known bug. The framerate is really smooth and mostly I am at around 100fps.

TnL doesn't work with opengl yet I guess?
Title: idea for trail rendering (10% performance increase)
Post by: phreak on November 03, 2003, 11:02:54 am
its probably not working in bob's trail build.  i have a semi-working version right now.  i just probably squashed another bug in the internal so it should at least be playable  (which is all that im hoping for at this point :D)
Title: idea for trail rendering (10% performance increase)
Post by: Lightspeed on November 03, 2003, 12:09:34 pm
uhm, i just found out the updated zip crashes me in-game too :(

i'll test some more


-edit-

as it seems it depends on the mission whether it crahes or not.

"A Monster in the Mist" crashes me after 2 seconds in-mission.

I thought that maybe full nebula is screwed but any other nebula mission seems to work fine (i tried it with "the Mystery of the Trinity")

... odd :wtf:

-edit2-

after some more testing i can say its not the fault of HT&L or the new build. I have also tried with the older 32 bit build and get the same crash (only in that specific mission, as it seems)

any idea as to why that mission crashes? anyone had any similar problems? O.o

this is what the errorlog says:

FS2_OPEN caused an Access Violation in module
FS2_OPEN.EXE at 0177:004bfb8e.
Exception handler called in Freespace 2 Main Thread.
Error occurred at 11/3/2003 19:23:20.
C:\GAMES\FREESPACE2\FS2_OPEN.EXE, run by Lightspeed.
1 processor(s), type 586.
511 MBytes physical memory.
Read from location ffffffff caused an access violation.

:(
Title: idea for trail rendering (10% performance increase)
Post by: Kakis on November 03, 2003, 12:57:40 pm
Odd, it worked for me.

Ah...well actually I was going to jump out and was just pressing tab to get away from the shatanas and pressed alt+j to jump...which switched task to this browser window...damn windows hotkeys...:hopping:

When I got back the game had kind of frozen, the nebula effect kept floating but the game stood still...pretty cool actually. :nod:
Title: idea for trail rendering (10% performance increase)
Post by: karajorma on November 03, 2003, 01:52:18 pm
Quote
Originally posted by Kakis
When I got back the game had kind of frozen, the nebula effect kept floating but the game stood still...pretty cool actually. :nod:


That reminds me. If I ALT-Tab out of FS2 when I come back the resume/quit box is completely missing.

It's not a big problem but I mention it cause it may be symptomatic of something else :)
Title: idea for trail rendering (10% performance increase)
Post by: Lightspeed on November 03, 2003, 02:22:11 pm
Quote
Originally posted by Lightspeed
-edit2-

after some more testing i can say its not the fault of HT&L or the new build. I have also tried with the older 32 bit build and get the same crash (only in that specific mission, as it seems)

any idea as to why that mission crashes? anyone had any similar problems? O.o

this is what the errorlog says:

FS2_OPEN caused an Access Violation in module
FS2_OPEN.EXE at 0177:004bfb8e.
Exception handler called in Freespace 2 Main Thread.
Error occurred at 11/3/2003 19:23:20.
C:\GAMES\FREESPACE2\FS2_OPEN.EXE, run by Lightspeed.
1 processor(s), type 586.
511 MBytes physical memory.
Read from location ffffffff caused an access violation.

:(


The buggiest part about FS2 is my own stupidity. After messing around trying to find out what the hell was wrong with the mission i realized I had a missing file somewhere. Put it back in and the thing works fine :doubt:

:lol:
Title: idea for trail rendering (10% performance increase)
Post by: Solatar on November 03, 2003, 03:17:29 pm
Bob)
I'm using the -htl command line. HT&L worked a long time ago, but now the most recent build that works with DX8 is one dated the 27th of October. Hope that helps.:)
Title: idea for trail rendering (10% performance increase)
Post by: Setekh on November 04, 2003, 02:08:29 am
Quote
Originally posted by Bobboau
you all are usieing the -thl comand line right?


My computer had issues with the last HT&L build, so I had it toggled off. I'll try putting it in now. :)
Title: idea for trail rendering (10% performance increase)
Post by: Bobboau on November 04, 2003, 02:10:36 am
it will defenantly crash the non HTL mode, that is for sure, becase I forgot to hide some things that should be hidden from the non HTL codepath
Title: idea for trail rendering (10% performance increase)
Post by: Setekh on November 04, 2003, 03:04:09 am
Okay, I gave HTL mode a go. It's definitely faster, but all the ships render super-dark - close to black. :confused:
Title: idea for trail rendering (10% performance increase)
Post by: Lightspeed on November 04, 2003, 06:08:23 am
Quote
Originally posted by Setekh
Okay, I gave HTL mode a go. It's definitely faster, but all the ships render super-dark - close to black. :confused:


thats what "no ambient light" means :o

/me wants it back! (adjustable would be sooooo cool)
Title: idea for trail rendering (10% performance increase)
Post by: Setekh on November 04, 2003, 06:34:55 am
*echoes Lightspeed* Ambient tag would rock. :)
Title: idea for trail rendering (10% performance increase)
Post by: Merlin-TC on November 04, 2003, 08:33:00 am
Well, I actually like the lightning how it is no.
It only emits light that are sent from real light sources.
It makes fighting the shivans even more fun and that's what it's like in space ;)
Title: idea for trail rendering (10% performance increase)
Post by: Lightspeed on November 04, 2003, 08:54:28 am
Quote
Originally posted by Merlin-TC
Well, I actually like the lightning how it is no.
It only emits light that are sent from real light sources.
It makes fighting the shivans even more fun and that's what it's like in space ;)


thats why a tag like -amb 1.0 (normal ambient), -amb 0.0 (no ambient), -amb 2.0 (double ambient), etc. would rock.
Title: idea for trail rendering (10% performance increase)
Post by: Merlin-TC on November 04, 2003, 09:42:27 am
I think that would satisfy everyone :)
But I have no clue about coding so I cannot say if it is difficult or not to do it.

Too bad there is nothing about Star Trek in it *g*
I am outing myself as trekkie now  ;)
Title: idea for trail rendering (10% performance increase)
Post by: phreak on November 04, 2003, 09:55:04 am
wouldn't specifying ambient light be done using 4 numbers (r,g,b,i) instead of using a single value?  this way you can get some freaky ambient shades
Title: idea for trail rendering (10% performance increase)
Post by: kasperl on November 04, 2003, 10:40:19 am
what about using the average between a setting on the command line and the one in mission?
that way you can set creepy lights in mission, but still allow users to adjust it to their monitor.
Title: idea for trail rendering (10% performance increase)
Post by: Trivial Psychic on November 04, 2003, 01:01:35 pm
The FS2_Open_t build won't work for me.  As soon as I either commit to a mission or enter the techroom, it crashes to desktop.  The extensions I was using were -t32 -32bit -htl, but it wouldn't work.  I should note, that I hadn't tried any previous tags before so I haven't tried HT&L on my system before.  I have currently reverted back to PhReAk's latest _r build without any tags.  My system specs are as follows:

AMD 800 (thunderbird)
ASUS A7V-100
256MB SDRAM-133
ASUS V7100 GF2-MX (pre 200 or 400) 32MB AGP

Also, I'm using a version of the nVidia drivers that is a few years old, since I found out that a more recent build was causing problems for one of my games.  I haven't updated the driver since then (12.41 I think).  I'd prefer not to have to update my driver, but it may be a contributing factor to this problem.

Later!
Title: idea for trail rendering (10% performance increase)
Post by: Lightspeed on November 04, 2003, 01:22:06 pm
Quote
Originally posted by PhReAk
wouldn't specifying ambient light be done using 4 numbers (r,g,b,i) instead of using a single value?  this way you can get some freaky ambient shades


yes, but the colour is already specified by the current sun of the system

imagine red ambient light with a green sun *ugh*
Title: idea for trail rendering (10% performance increase)
Post by: Flipside on November 04, 2003, 01:26:41 pm
Ohhh good if you have 3D Glassses though ;o)
Title: idea for trail rendering (10% performance increase)
Post by: Trivial Psychic on November 04, 2003, 02:19:58 pm
A slight update to my above complaint... I just tried to run the same mission under PhReAk's latest _r build with the -htl flag and it worked.  The problem must either be _t, or it has something to do with the order of the command line flags, that -htl must be first in order to be activated properly.

Later!
Title: idea for trail rendering (10% performance increase)
Post by: Setekh on November 05, 2003, 06:13:24 am
Quote
Originally posted by Merlin-TC
Well, I actually like the lightning how it is no.
It only emits light that are sent from real light sources.
It makes fighting the shivans even more fun and that's what it's like in space ;)


Sure, that's what it's like in space, but try fighting for any much more than 5 minutes in total blackness. Gameplay = down the drain, dude. :sigh:
Title: idea for trail rendering (10% performance increase)
Post by: Kakis on November 05, 2003, 07:13:48 am
I also like the current lightning system, but it do gets annoying to bump in big things that you thought was space from time to time.

Just enough ambient light to be able to see the outlining of the ships would be a nice addition which hopefully doesn't spoil the so cool rendering effects that are in right now.
Title: idea for trail rendering (10% performance increase)
Post by: Lightspeed on November 05, 2003, 07:28:05 am
Well, i think there can be more ambient light, since, if theres no ambient light you don't see all the precious textures of those cool ships :D
That, and shinemaps don't look as good as they could.

That's why I want adjustable ambient lighting since you can have a wide variety of missions (really high ambient light in nebulae (looks weird with those black ships inside), no ambient light in some deserted sector of space, etc.).

And no, it shouldn't be too hard to be coded in since it lightens every texture the same way and intensity. And then again, the original already had it.