Author Topic: idea for trail rendering  (Read 11995 times)

0 Members and 1 Guest are viewing this topic.

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
idea for trail rendering
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
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
idea for trail rendering (10% performance increase)
nobody want to respond?

I've got it working, need to do some optomiseing
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
idea for trail rendering (10% performance increase)
GREAT GHOST OF DOOKIE!! :eek2: :eek: :eek2:
look at the diference between them
the old

the new

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!
« Last Edit: November 01, 2003, 11:17:03 pm by 57 »
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
idea for trail rendering (10% performance increase)
eh, uh, I'm going to commit this :D
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
idea for trail rendering (10% performance increase)
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
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
idea for trail rendering (10% performance increase)
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.
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Setekh

  • Jar of Clay
  • 215
    • Hard Light Productions
idea for trail rendering (10% performance increase)
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?
- Eddie Kent Woo, Setekh, Steak (of Steaks), AWACS. Seriously, just pick one.
HARD LIGHT PRODUCTIONS, now V3.0. Bringing Modders Together since January 2001.
THE HARD LIGHT ARRAY. Always makes you say wow.

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
idea for trail rendering (10% performance increase)
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
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Setekh

  • Jar of Clay
  • 215
    • Hard Light Productions
idea for trail rendering (10% performance increase)
10% overall increase in performance? That speaks in any language, Bob. ;) Moved.
- Eddie Kent Woo, Setekh, Steak (of Steaks), AWACS. Seriously, just pick one.
HARD LIGHT PRODUCTIONS, now V3.0. Bringing Modders Together since January 2001.
THE HARD LIGHT ARRAY. Always makes you say wow.

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
idea for trail rendering (10% performance increase)
that looks like more than 10%
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
idea for trail rendering (10% performance increase)
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
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Fractux

  • 28
idea for trail rendering (10% performance increase)
:yes: :yes: :yes:

Looks really good!

Cheers!
-What exactly gets separated in "mechanically separated chicken" ?

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
idea for trail rendering (10% performance increase)
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
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
idea for trail rendering (10% performance increase)
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
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Bobboau

  • Just a MODern kinda guy
    Just MODerately cool
    And MODest too
  • 213
idea for trail rendering (10% performance increase)
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
Bobboau, bringing you products that work... in theory
learn to use PCS
creator of the ProXimus Procedural Texture and Effect Generator
My latest build of PCS2, get it while it's hot!
PCS 2.0.3


DEUTERONOMY 22:11
Thou shalt not wear a garment of diverse sorts, [as] of woollen and linen together

 

Offline Ypoknons

  • Ancient
  • 28
    • http://www.xwaupgrade.com
idea for trail rendering (10% performance increase)
Getting good perofrmance on this one, especially HTL.
Long time ago, you see, there was this thing called the VBB and... oh, nevermind.

 

Offline FreeTerran

  • Master of the apocalypse
    Reset count: 1
  • 210
idea for trail rendering (10% performance increase)
hey nice stuff bob :)
Silva in lumine Lunae arcana est. Domos mea Silva in lumine Stellarum est.

 

Offline Flipside

  • əp!sd!l£
  • 212
idea for trail rendering (10% performance increase)
Oooohhh... just testing :D

Flipside :)

 

Offline Lightspeed

  • Light Years Ahead
  • 212
idea for trail rendering (10% performance increase)
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 (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)
Modern man is the missing link between ape and human being.

 

Offline FreeTerran

  • Master of the apocalypse
    Reset count: 1
  • 210
idea for trail rendering (10% performance increase)
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
Silva in lumine Lunae arcana est. Domos mea Silva in lumine Stellarum est.