Author Topic: Using DX8.1 pointsprites to replace particle trails  (Read 5162 times)

0 Members and 1 Guest are viewing this topic.

Offline JC Denton

  • Node For Me
  • 27
Using DX8.1 pointsprites to replace particle trails
By particle trails I mean the little fiery stuff when you hit a target.  Since daveb thought it'd be neat to upgrade the FS2 engine to the DirectX 8.1 standard, here's my proposal:  replace the particle glows with pointsprites.  Several advantages:

1) The effect is much more realistic-looking, complete with the "streaking" effect when the particles are in motion.

2) We can add bits to the code to make for race-specific glowtrails (i.e. gold for Terran, green for Vasudan, red for Shivan)

3) Darn it, it just looks cool. :D

Of course, the major downfall with this technique is that not all video cards support it.  I know it works on a Geforce3/4 (since that's what I'm using), but how's I get user feedback on the effect?  I've got a demo you can download here.  Please note you will have to have the latest version of DirectX to even see the effect.

Just a slightly tweaked version of the DX81SDK sample.

As it's currently set, the glow doesn't shoot up very high.  Since the current particle trails in FS2 don't go fountaining out of a corvette when you shoot it, I thought the same should be applied to this.  

There's even a framerate counter in the corner (and this demo supports reflection mapping, but you can turn that off :) )  

I am having problems with it, however.  First and foremost, I can't tell the thing to kill the old particles when they get to so high off the ground.  Therefore, I can't tell it to use zero-gravity in the demo to properly simulate what it'll do in the FS2 engine.  If you want to see the source for it, I'll post up the link.
« Last Edit: July 19, 2002, 10:47:10 am by 480 »
"I condemn false prophets, I condemn the effort to take away the power of rational decision, to drain people of their free will -- and a hell of a lot of money in the bargain. Religions vary in their degree of idiocy, but I reject them all. For most people, religion is nothing more than a substitute for a malfunctioning brain."  - Gene Roddenberry

"Democracy substitutes election by the incompetent many for appointment by the corrupt few." - George Bernard Shaw

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
Using DX8.1 pointsprites to replace particle trails
this page can not be found
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
Using DX8.1 pointsprites to replace particle trails
yup, bad link

you'll need to get dx8 into FS first, I'd love to see just this if you can
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 LtNarol

  • Biased Banshee
  • 211
    • http://www.3dap.com/hlp/hosted/the158th
Using DX8.1 pointsprites to replace particle trails
<- poor; gots a 32meg-16bit-offbrand-peiceofyouknowwhat-10buck 3d accelerator.

Please tell me all I need is DirectX 8.1 for this :D

 

Offline JC Denton

  • Node For Me
  • 27
Using DX8.1 pointsprites to replace particle trails
:o

Oops. :D Typed the filename in wrong.

Try again.
"I condemn false prophets, I condemn the effort to take away the power of rational decision, to drain people of their free will -- and a hell of a lot of money in the bargain. Religions vary in their degree of idiocy, but I reject them all. For most people, religion is nothing more than a substitute for a malfunctioning brain."  - Gene Roddenberry

"Democracy substitutes election by the incompetent many for appointment by the corrupt few." - George Bernard Shaw

 
Using DX8.1 pointsprites to replace particle trails
Very pretty, but if we're gonna bring DX8 into Freespace I think we'd need to organize some collaboration - that's a fairly large task. However, if we're doing this may I suggest we also get hardware T&L in there?

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
Using DX8.1 pointsprites to replace particle trails
its not working on my GF2

i have the newest drivers and DX8.1b
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline Inquisitor

Using DX8.1 pointsprites to replace particle trails
agreed on the collaboration, and we probably should avoid card specific implementations.

Let's get the DX8 interested coders into a chat some time in the next week, I have some ideas I want to explore on a DX upgrade.
No signature.

 

Offline vadar_1

  • Mr. Crispy
  • 29
  • .
    • http://dynamic4.gamespy.com/~freespace/hosted/fullcircle/
Using DX8.1 pointsprites to replace particle trails
Not working for me... i have the latest DX, but i keep getting loads of errors before it crashes. Dispite its so called "brilliance"... you might need to find something more... "universal".
"Shockingly, checking Draw Lines Between Marked Icons draws lines between the marked icons. " -Volition quality help files

Projects;
The Full Circle Project (site down - server side problem)
Paradox (site down - server side problem)

 

Offline DTP

  • ImPortant Coder
  • 28
    • http://www.c4-group.dk
Using DX8.1 pointsprites to replace particle trails
invalid file, download again.

dam cache, dont want to restart right now.
VBB member; reg aug 1999; total posts 600.
War is a lion, on whos back you fall, never to get up.
Think big. Invade Space.

 

Offline Redfang

  • 28
Using DX8.1 pointsprites to replace particle trails
If I'd have a better computer, I'd try it out...
 
Radeon 8500 and newer support pointsprites, and I think Radeon 7500 does too (works in 3Dmark2001), but it's very slow with them. I'm not sure if Geforce 2 supports it or not.
 
But I don't think that the particles look too bad at the moment, and this works only on newer video cards so at least it should have an option to turn it on/off. :)

 

Offline JC Denton

  • Node For Me
  • 27
Using DX8.1 pointsprites to replace particle trails
:sigh: Oh well, another idea of mine that falls on its face...guess this is a "GF3+ and Radeon 7500+"-only trick then...

IDEA!!!

We could add this effect (not replace the current one) and add a card capability detect so that if the card doesn't support the pointsprites it'll default to the original particle fx.  The DirectX SDK has pretty good documentation on this "feature-finder" implement.
"I condemn false prophets, I condemn the effort to take away the power of rational decision, to drain people of their free will -- and a hell of a lot of money in the bargain. Religions vary in their degree of idiocy, but I reject them all. For most people, religion is nothing more than a substitute for a malfunctioning brain."  - Gene Roddenberry

"Democracy substitutes election by the incompetent many for appointment by the corrupt few." - George Bernard Shaw

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
Using DX8.1 pointsprites to replace particle trails
can someone post a screenie so we can see what it looks like?
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline JC Denton

  • Node For Me
  • 27
Using DX8.1 pointsprites to replace particle trails
Here ya go.  But it's so much better when it's animating. :nod:

"I condemn false prophets, I condemn the effort to take away the power of rational decision, to drain people of their free will -- and a hell of a lot of money in the bargain. Religions vary in their degree of idiocy, but I reject them all. For most people, religion is nothing more than a substitute for a malfunctioning brain."  - Gene Roddenberry

"Democracy substitutes election by the incompetent many for appointment by the corrupt few." - George Bernard Shaw

 

Offline phreak

  • Gun Phreak
  • 211
  • -1
Using DX8.1 pointsprites to replace particle trails
is there some texture that i need to run it?
Offically approved by Ebola Virus Man :wtf:
phreakscp - gtalk
phreak317#7583 - discord

 

Offline JC Denton

  • Node For Me
  • 27
Using DX8.1 pointsprites to replace particle trails
no, it all comes prepacked in one little, efficient exe file that I conveniently zipped up to save you some download time.  Everything is built in (but then that may be the problem-GF2s don't support some DX81 features methinks).

Of course, if you have enough money you might be able to pick up a decent GF3 for around/under $100.  That is, if you don't mind running something by PNY or eVGA.

But back to the DirectX upgrade.  What exactly will it involve?
"I condemn false prophets, I condemn the effort to take away the power of rational decision, to drain people of their free will -- and a hell of a lot of money in the bargain. Religions vary in their degree of idiocy, but I reject them all. For most people, religion is nothing more than a substitute for a malfunctioning brain."  - Gene Roddenberry

"Democracy substitutes election by the incompetent many for appointment by the corrupt few." - George Bernard Shaw

  

Offline DragonClaw

  • Romeo Kilo India Foxtrot
  • 210
Using DX8.1 pointsprites to replace particle trails
I'm using a GeForce3 Ti200...

says "could not load required media"     ???

I have the latest DX8.1 installed...

 

Offline DTP

  • ImPortant Coder
  • 28
    • http://www.c4-group.dk
Using DX8.1 pointsprites to replace particle trails
ditto, could not load required media.
---------

media, what media. do we have to place it somewhere special
« Last Edit: July 19, 2002, 08:33:50 pm by 508 »
VBB member; reg aug 1999; total posts 600.
War is a lion, on whos back you fall, never to get up.
Think big. Invade Space.

 

Offline Inquisitor

Using DX8.1 pointsprites to replace particle trails
Every DX tutorial set I have ever seen had a card detect function. I could deal with that.

JC, how are you with DX8? I am guessing we need a good, full overhaul first, update DX5 functions to 8, input, graphics, the whole shebang.

Pop into IRC sometime or catch me on ICQ :)
No signature.

 

Offline JC Denton

  • Node For Me
  • 27
Using DX8.1 pointsprites to replace particle trails
hmm. okay, try this file and see if it works.  if it doesn't then maybe I'm doing something horrendously wrong and not knowing it.

As for my directx skills?  wanting.  I barely understand C++, but hopefully that'll be remedied in a few months.  If you can point me to an online crash course that'd be helpful.

I'm learning by poking the code and seeing what happens.  Not unlike what Bobboau did, and see where he's at?
"I condemn false prophets, I condemn the effort to take away the power of rational decision, to drain people of their free will -- and a hell of a lot of money in the bargain. Religions vary in their degree of idiocy, but I reject them all. For most people, religion is nothing more than a substitute for a malfunctioning brain."  - Gene Roddenberry

"Democracy substitutes election by the incompetent many for appointment by the corrupt few." - George Bernard Shaw