Hard Light Productions Forums

Modding, Mission Design, and Coding => FS2 Open Coding - The Source Code Project (SCP) => Topic started by: RandomTiger on January 12, 2004, 12:45:18 pm

Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 12, 2004, 12:45:18 pm
I have added some code to process particles using D3D's point sprite system in order to try and speed things up a bit. The new system only has to send one point to the graphics card for every four the old system has to, it uses a smaller vertex structure and batches the particles as much as is possible. The new system only needs to transfer 20% of the amount of data to the graphics card.

-d3d_particle is the flag to activate this, when its fully tested and bug free I'll make it on by default. Some older cards may not support enough features to take full advantage of this which will cause the code to fall back to the old route when dealing with large particles.

I get a considerably higher frame rate for scenes with large number of particles, tell me how you get on.

http://mysite.freeserve.com/thomaswhittaker/c_code/freespace/fs2_open_r.rar

Dont forget to use the flag
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 12, 2004, 01:28:35 pm
Can't really say about performance but apparently it still mixes up a few things:

(http://www.penguinbomb.com/lightspeed/SCPTest/Hummdihumm.jpg)

The size is way too small, and they don't seem to appear everytime (as if i set a double $Time value).
Title: More htl D3D goodness: Particles
Post by: Deepblue on January 12, 2004, 01:32:27 pm
Maybe the particles are now actually able to be adjusted with the radius function.
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 12, 2004, 01:38:35 pm
the radius function does something really different :)

The $scale function sorts out the size.

It's a bit tricky with the names and nobody seems to know this but:

$Radius:

The "thickness" of the trail where particles may appear - if you set this to 2+ you'll swarm the whole screen with particles -- this is what i used for randomizing my trails

$Scale:

THIS one manages the size of the particle. I don't know in what it measures but when i set it to 20, about half of my screen was filled with the particle.

So none of those should have changed, since they always worked, even if nobody knew how  ;)
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 12, 2004, 01:41:18 pm
Quote
Originally posted by Lightspeed
Can't really say about performance but apparently it still mixes up a few things:

(http://www.penguinbomb.com/lightspeed/SCPTest/Hummdihumm.jpg)

The size is way too small, and they don't seem to appear everytime (as if i set a double $Time value).


Thats a non standard effect I take it.
You would have to supply me with a copy of what ever it takes to make that to balance it out.
Title: More htl D3D goodness: Particles
Post by: Liberator on January 12, 2004, 01:55:41 pm
It looks like Lightspeeds's new Akheton effect from this thread. (http://www.hard-light.net/forums/index.php/topic,19806.0.html)
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 12, 2004, 02:43:17 pm
it happens with any particle effect used.

i.e. where i noticed it: my morning star, my kayser, my maxim & my akheton. They're all messed up in similar ways (too small + wrong 'spawn rate)
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 12, 2004, 03:04:47 pm
OK, I'll look into that, I can account for the scale problem but I'm not sure about the spawn rate.

Either way its optional default off so no harm done.
Will post to thread thread when I have an update.
Title: More htl D3D goodness: Particles
Post by: aldo_14 on January 12, 2004, 03:12:35 pm
There's not a possibility that you had a different fov setting in the command line (for the old exe) and forgot to set it in the modified exe, is there?
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 12, 2004, 03:31:26 pm
There's not.

It's both the same exe, actually :p
(with 3d3particles enabled, and disabled)

i'm not sure if it's the spawn rate, but it looks like it is. Whatever it may be it needs to be fixed :)
Title: More htl D3D goodness: Particles
Post by: aldo_14 on January 12, 2004, 03:34:43 pm
Quote
Originally posted by Lightspeed
There's not.

It's both the same exe, actually :p
(with 3d3particles enabled, and disabled)

i'm not sure if it's the spawn rate, but it looks like it is. Whatever it may be it needs to be fixed :)


ah :)

To be fair, I didn't think it would be that...but never hurts to check.
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 12, 2004, 08:09:29 pm
Quote
Originally posted by Lightspeed

It's both the same exe, actually :p
(with 3d3particles enabled, and disabled)


Hold on there.
Could you check what happens with any other fs2_open exe?
Its possible I've introduced a bug into the general particle code in this exe.

I would like to rule that out before doing anything else.
Title: More htl D3D goodness: Particles
Post by: Nuke on January 13, 2004, 04:23:01 am
i accidently found out about the radius flag while tweaking my nova flak cannon. the radius sets the area in which the particles spawn. i wonder if i could make a beam out of it. can we also have a $pattern setting for differend particle spawn meathods, such as random or spiral.
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 13, 2004, 06:40:37 am
Quote
Originally posted by RandomTiger


Hold on there.
Could you check what happens with any other fs2_open exe?
Its possible I've introduced a bug into the general particle code in this exe.

I would like to rule that out before doing anything else.


no, it looks correct (like with the older build) with the flag turned off.
Title: More htl D3D goodness: Particles
Post by: FreeTerran on January 13, 2004, 07:09:26 am
hmm sorry but i can't see anything that should be other with the particles
Title: More htl D3D goodness: Particles
Post by: Bobboau on January 13, 2004, 10:19:52 am
so does this replace draw_bitmap or are you running a big ole batch rndering?

is there any way to do something like draw_rotated_bitmap
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 13, 2004, 04:27:40 pm
Quote
Originally posted by Lightspeed

no, it looks correct (like with the older build) with the flag turned off.


So are you saying the spawn rate problem was caused by my new code?
Title: More htl D3D goodness: Particles
Post by: Bobboau on January 13, 2004, 05:49:43 pm
I think he's saying your build looks right whaen he doesn't enable pointsprites via the comand line
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 13, 2004, 05:53:11 pm
Quote
Originally posted by RandomTiger


So are you saying the spawn rate problem was caused by my new code?


exactly. I turn the flag off and it works fine. I turn it on and whee -- we got the effect you can see on the right: not enough particles and screwed up size. It could be either spawn rate or speed though.
Title: More htl D3D goodness: Particles
Post by: Trivial Psychic on January 13, 2004, 11:39:59 pm
I decided to give this build a try, but I got a CTD a split second into the mission.  I was using -htl and the custom flag if you're interested.  I'm thinking that this is either a hardware issue or a driver issue.  Since I'm running a GF2 MX 32MB, my card may not support this feature.  If it is supported, then it may be a driver issue, since I can't use the newest drivers for the GF2 MX.  I tried running the latest drivers for a few months, but it was a serious drain on my system, causing the screen to go black for a few seconds sometimes, occasionally resulting in a lockup.  It also created serious drags in some of my older games, so I reverted to the version I had been using since 2001... much more stable.

In any case, this older version may be resulting in the problem, if this feature IS supported by the GF2 MX.  What this boils down to, is me getting a Radeon 9600 Pro (or XT) 128MB card once my hours at work start to pick up sometime in March or April probably.

Later!
Title: More htl D3D goodness: Particles
Post by: phreak on January 14, 2004, 12:20:33 am
its hardware.  Pointsprites (is that one word or two?) are newer than Geforce2s can support

edit: i checked the OGL extensions and my Radeon9k doesn't support it.  But it magically gained support for the n-patch tesselation trueform whatever the hell its called!!!!!!111111111112.  oh the joys of new drivers
Title: More htl D3D goodness: Particles
Post by: Sticks on January 14, 2004, 02:06:07 am
Point sprites is two words.

Do you have checks agains D3DCAPS to have the code fallback if point sprites aren't supported, RT?
Title: More htl D3D goodness: Particles
Post by: J3Vr6 on January 14, 2004, 07:45:39 am
EDIT:  Nevermind, it's not funny anymore :(
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 14, 2004, 12:10:30 pm
Whats a CTD?

Wont have time to look at this properly until the weekend.
I wish I still had my TNT2 card, its all works fine on my GF4.

Sticks, I'll double check my D3DCAPS.
Title: More htl D3D goodness: Particles
Post by: Flipside on January 14, 2004, 12:27:34 pm
CTD is Crash To Desktop I think
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 14, 2004, 09:51:41 pm
New exe up.
Particles should be bigger.
Will give you a warning message if your card doesnt have full support.
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 18, 2004, 07:30:47 am
Bump, need the people who were having problems to test this please, damn I wish the lister list still worked.
Title: More htl D3D goodness: Particles
Post by: Flipside on January 18, 2004, 10:20:28 am
I would give it a go, but my computer has decided to freeze whenever I start a mission, regardless of what build I'm using.

I've been putting off this complete Windows re-install and tidy-up for too long it seems :(

I may be a while........
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 18, 2004, 10:27:42 am
Quote
Originally posted by RandomTiger
Bump, need the people who were having problems to test this please, damn I wish the lister list still worked.


Oh. Yes. Sorry. I was busy and completely forgot about it.

*proceeds to test*
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 18, 2004, 10:34:36 am
Thanks, it may well come up with an error
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 18, 2004, 10:38:50 am
No error.

No better, either though.

The particles are, if possible, even smaller than last time, and the spawning problem's still there. Sometimes they don't appear at all (especially while turning the ship) and sometimes they dont appear till they are about 700+ metres away.

If you want I can post up some screenies.
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 18, 2004, 11:23:26 am
Yes some screenshots would would help, I cant believe they've got smaller on your system. Could you post me your D3D caps?

Sigh.. nothings ever simple is it?
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 24, 2004, 08:32:56 am
Screenshots please :)
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 24, 2004, 08:48:45 am
k~ thanks for bumping :)
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 24, 2004, 09:27:25 am
Here we are:

(http://smalltimerivalry.com/sschost/scriptlightspeed/HugeProblems.jpg)
Title: More htl D3D goodness: Particles
Post by: FreeTerran on January 24, 2004, 09:37:19 am
yep looks good :)
Title: More htl D3D goodness: Particles
Post by: Taristin on January 24, 2004, 09:37:24 am
*Is reminded to dl the new weapons now that his PC works again*
Title: More htl D3D goodness: Particles
Post by: Taristin on January 24, 2004, 09:38:31 am
Quote
Originally posted by FreeTerran
yep looks good :)


Um. FT?

The ones on the left are good, without the code enabled.

The ones on the right are bad. I hope you weren't standing by your old post about not seeing anything wrong...
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 24, 2004, 09:48:36 am
Thats a good report Lightspeed. Could you post your D3D caps as well please.
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 24, 2004, 10:35:45 am
Operating System: Win 98  A
Memory: 510 MB
Adapter: RADEON 9800

Modes:

27: (1600x1200)x32 bit, 0 rr
26: (1600x1200)x16 bit, 0 rr
25: (1280x1024)x32 bit, 0 rr
24: (1280x1024)x16 bit, 0 rr
23: (1280x960)x32 bit, 0 rr
22: (1280x960)x16 bit, 0 rr
21: (1280x768)x32 bit, 0 rr
20: (1280x768)x16 bit, 0 rr
19: (1152x864)x32 bit, 0 rr
18: (1152x864)x16 bit, 0 rr
17: (1024x768)x32 bit, 0 rr
16: (1024x768)x16 bit, 0 rr
15: (848x480)x32 bit, 0 rr
14: (848x480)x16 bit, 0 rr
13: (800x600)x32 bit, 0 rr
12: (800x600)x16 bit, 0 rr
11: (640x480)x32 bit, 0 rr
10: (640x480)x16 bit, 0 rr
9: (640x400)x32 bit, 0 rr
8: (640x400)x16 bit, 0 rr
7: (512x384)x32 bit, 0 rr
6: (512x384)x16 bit, 0 rr
5: (400x300)x32 bit, 0 rr
4: (400x300)x16 bit, 0 rr
3: (320x240)x32 bit, 0 rr
2: (320x240)x16 bit, 0 rr
1: (320x200)x32 bit, 0 rr
0: (320x200)x16 bit, 0 rr


D3D8 Caps:

caps.Caps.D3DCAPS_READ_SCANLINE:                                yes

caps.Caps2.D3DCAPS2_CANCALIBRATEGAMMA:                          no
caps.Caps2.D3DCAPS2_CANRENDERWINDOWED:                          yes
caps.Caps2.D3DCAPS2_CANMANAGERESOURCE:                          no
caps.Caps2.D3DCAPS2_DYNAMICTEXTURES:                            yes
caps.Caps2.D3DCAPS2_FULLSCREENGAMMA:                            yes
caps.Caps2.D3DCAPS2_NO2DDURING3DSCENE:                          no

caps.Caps3.D3DCAPS3_ALPHA_FULLSCREEN_FLIP_OR_DISCARD:           yes

caps.PresentationIntervals.D3DPRESENT_INTERVAL_IMMEDIATE:       yes
caps.PresentationIntervals.D3DPRESENT_INTERVAL_ONE:             yes
caps.PresentationIntervals.D3DPRESENT_INTERVAL_TWO:             no
caps.PresentationIntervals.D3DPRESENT_INTERVAL_THREE:           no
caps.PresentationIntervals.D3DPRESENT_INTERVAL_FOUR:            no

caps.CursorCaps.D3DCURSORCAPS_COLOR:                            yes
caps.CursorCaps.D3DCURSORCAPS_LOWRES:                           no

caps.DevCaps.D3DDEVCAPS_CANBLTSYSTONONLOCAL:                    no
caps.DevCaps.D3DDEVCAPS_CANRENDERAFTERFLIP:                     yes
caps.DevCaps.D3DDEVCAPS_DRAWPRIMTLVERTEX:                       yes
caps.DevCaps.D3DDEVCAPS_EXECUTESYSTEMMEMORY:                    yes
caps.DevCaps.D3DDEVCAPS_EXECUTEVIDEOMEMORY:                     yes
caps.DevCaps.D3DDEVCAPS_HWRASTERIZATION:                        yes
caps.DevCaps.D3DDEVCAPS_HWTRANSFORMANDLIGHT:                    yes
caps.DevCaps.D3DDEVCAPS_NPATCHES:                               no
caps.DevCaps.D3DDEVCAPS_PUREDEVICE:                             yes
caps.DevCaps.D3DDEVCAPS_QUINTICRTPATCHES:                       no
caps.DevCaps.D3DDEVCAPS_RTPATCHES:                              no
caps.DevCaps.D3DDEVCAPS_RTPATCHHANDLEZERO:                      no
caps.DevCaps.D3DDEVCAPS_SEPARATETEXTUREMEMORIES:                no
caps.DevCaps.D3DDEVCAPS_TEXTURENONLOCALVIDMEM:                  no
caps.DevCaps.D3DDEVCAPS_TEXTURESYSTEMMEMORY:                    no
caps.DevCaps.D3DDEVCAPS_TEXTUREVIDEOMEMORY:                     yes
caps.DevCaps.D3DDEVCAPS_TLVERTEXSYSTEMMEMORY:                   yes
caps.DevCaps.D3DDEVCAPS_TLVERTEXVIDEOMEMORY:                    yes

caps.PrimitiveMiscCaps.D3DPMISCCAPS_BLENDOP:                    yes
caps.PrimitiveMiscCaps.D3DPMISCCAPS_CLIPPLANESCALEDPOINTS:      no
caps.PrimitiveMiscCaps.D3DPMISCCAPS_CLIPTLVERTS:                no
caps.PrimitiveMiscCaps.D3DPMISCCAPS_COLORWRITEENABLE:           yes
caps.PrimitiveMiscCaps.D3DPMISCCAPS_CULLCCW:                    yes
caps.PrimitiveMiscCaps.D3DPMISCCAPS_CULLCW:                     yes
caps.PrimitiveMiscCaps.D3DPMISCCAPS_CULLNONE:                   yes
caps.PrimitiveMiscCaps.D3DPMISCCAPS_LINEPATTERNREP:             no
caps.PrimitiveMiscCaps.D3DPMISCCAPS_MASKZ:                      yes
caps.PrimitiveMiscCaps.D3DPMISCCAPS_TSSARGTEMP:                 yes

caps.RasterCaps.D3DPRASTERCAPS_ANISOTROPY:                      yes
caps.RasterCaps.D3DPRASTERCAPS_ANTIALIASEDGES:                  no
caps.RasterCaps.D3DPRASTERCAPS_COLORPERSPECTIVE:                yes
caps.RasterCaps.D3DPRASTERCAPS_DITHER:                          yes
caps.RasterCaps.D3DPRASTERCAPS_FOGRANGE:                        yes
caps.RasterCaps.D3DPRASTERCAPS_FOGTABLE:                        yes
caps.RasterCaps.D3DPRASTERCAPS_FOGVERTEX:                       yes
caps.RasterCaps.D3DPRASTERCAPS_MIPMAPLODBIAS:                   yes
caps.RasterCaps.D3DPRASTERCAPS_PAT:                             no
caps.RasterCaps.D3DPRASTERCAPS_STRETCHBLTMULTISAMPLE:           no
caps.RasterCaps.D3DPRASTERCAPS_WBUFFER:                         no
caps.RasterCaps.D3DPRASTERCAPS_WFOG:                            yes
caps.RasterCaps.D3DPRASTERCAPS_ZBIAS:                           yes
caps.RasterCaps.D3DPRASTERCAPS_ZBUFFERLESSHSR:                  no
caps.RasterCaps.D3DPRASTERCAPS_ZFOG:                            yes
caps.RasterCaps.D3DPRASTERCAPS_ZTEST:                           yes

caps.ZCmpCaps.D3DPCMPCAPS_ALWAYS:                               yes
caps.ZCmpCaps.D3DPCMPCAPS_EQUAL:                                yes
caps.ZCmpCaps.D3DPCMPCAPS_GREATER:                              yes
caps.ZCmpCaps.D3DPCMPCAPS_GREATEREQUAL:                         yes
caps.ZCmpCaps.D3DPCMPCAPS_LESS:                                 yes
caps.ZCmpCaps.D3DPCMPCAPS_LESSEQUAL:                            yes
caps.ZCmpCaps.D3DPCMPCAPS_NEVER:                                yes
caps.ZCmpCaps.D3DPCMPCAPS_NOTEQUAL:                             yes

caps.SrcBlendCaps.D3DPBLENDCAPS_BOTHINVSRCALPHA:                yes
caps.SrcBlendCaps.D3DPBLENDCAPS_BOTHSRCALPHA:                   yes
caps.SrcBlendCaps.D3DPBLENDCAPS_DESTALPHA:                      yes
caps.SrcBlendCaps.D3DPBLENDCAPS_DESTCOLOR:                      yes
caps.SrcBlendCaps.D3DPBLENDCAPS_INVDESTALPHA:                   yes
caps.SrcBlendCaps.D3DPBLENDCAPS_INVDESTCOLOR:                   yes
caps.SrcBlendCaps.D3DPBLENDCAPS_INVSRCALPHA:                    yes
caps.SrcBlendCaps.D3DPBLENDCAPS_INVSRCCOLOR:                    yes
caps.SrcBlendCaps.D3DPBLENDCAPS_ONE:                            yes
caps.SrcBlendCaps.D3DPBLENDCAPS_SRCALPHA:                       yes
caps.SrcBlendCaps.D3DPBLENDCAPS_SRCALPHASAT:                    yes
caps.SrcBlendCaps.D3DPBLENDCAPS_SRCCOLOR:                       yes
caps.SrcBlendCaps.D3DPBLENDCAPS_ZERO:                           yes

caps.DestBlendCaps.D3DPBLENDCAPS_BOTHINVSRCALPHA:               yes
caps.DestBlendCaps.D3DPBLENDCAPS_BOTHSRCALPHA:                  yes
caps.DestBlendCaps.D3DPBLENDCAPS_DESTALPHA:                     yes
caps.DestBlendCaps.D3DPBLENDCAPS_DESTCOLOR:                     yes
caps.DestBlendCaps.D3DPBLENDCAPS_INVDESTALPHA:                  yes
caps.DestBlendCaps.D3DPBLENDCAPS_INVDESTCOLOR:                  yes
caps.DestBlendCaps.D3DPBLENDCAPS_INVSRCALPHA:                   yes
caps.DestBlendCaps.D3DPBLENDCAPS_INVSRCCOLOR:                   yes
caps.DestBlendCaps.D3DPBLENDCAPS_ONE:                           yes
caps.DestBlendCaps.D3DPBLENDCAPS_SRCALPHA:                      yes
caps.DestBlendCaps.D3DPBLENDCAPS_SRCALPHASAT:                   no
caps.DestBlendCaps.D3DPBLENDCAPS_SRCCOLOR:                      yes
caps.DestBlendCaps.D3DPBLENDCAPS_ZERO:                          yes

caps.AlphaCmpCaps.D3DPCMPCAPS_ALWAYS:                           yes
caps.AlphaCmpCaps.D3DPCMPCAPS_EQUAL:                            yes
caps.AlphaCmpCaps.D3DPCMPCAPS_GREATER:                          yes
caps.AlphaCmpCaps.D3DPCMPCAPS_GREATEREQUAL:                     yes
caps.AlphaCmpCaps.D3DPCMPCAPS_LESS:                             yes
caps.AlphaCmpCaps.D3DPCMPCAPS_LESSEQUAL:                        yes
caps.AlphaCmpCaps.D3DPCMPCAPS_NEVER:                            yes
caps.AlphaCmpCaps.D3DPCMPCAPS_NOTEQUAL:                         yes

caps.ShadeCaps.D3DPSHADECAPS_ALPHAGOURAUDBLEND:                 yes
caps.ShadeCaps.D3DPSHADECAPS_COLORGOURAUDRGB:                   yes
caps.ShadeCaps.D3DPSHADECAPS_FOGGOURAUD:                        yes
caps.ShadeCaps.D3DPSHADECAPS_SPECULARGOURAUDRGB:                yes

caps.TextureCaps.D3DPTEXTURECAPS_ALPHA:                         yes
caps.TextureCaps.D3DPTEXTURECAPS_ALPHAPALETTE:                  no
caps.TextureCaps.D3DPTEXTURECAPS_CUBEMAP:                       yes
caps.TextureCaps.D3DPTEXTURECAPS_CUBEMAP_POW2:                  yes
caps.TextureCaps.D3DPTEXTURECAPS_MIPCUBEMAP:                    yes
caps.TextureCaps.D3DPTEXTURECAPS_MIPMAP:                        yes
caps.TextureCaps.D3DPTEXTURECAPS_MIPVOLUMEMAP:                  yes
caps.TextureCaps.D3DPTEXTURECAPS_NONPOW2CONDITIONAL:            yes
caps.TextureCaps.D3DPTEXTURECAPS_PERSPECTIVE:                   yes
caps.TextureCaps.D3DPTEXTURECAPS_POW2:                          yes
caps.TextureCaps.D3DPTEXTURECAPS_PROJECTED:                     yes
caps.TextureCaps.D3DPTEXTURECAPS_SQUAREONLY:                    no
caps.TextureCaps.D3DPTEXTURECAPS_TEXREPEATNOTSCALEDBYSIZE:      yes
caps.TextureCaps.D3DPTEXTURECAPS_VOLUMEMAP:                     yes
caps.TextureCaps.D3DPTEXTURECAPS_VOLUMEMAP_POW2:                yes

caps.TextureFilterCaps.D3DPTFILTERCAPS_MAGFAFLATCUBIC:          no
caps.TextureFilterCaps.D3DPTFILTERCAPS_MAGFANISOTROPIC:         yes
caps.TextureFilterCaps.D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC:       no
caps.TextureFilterCaps.D3DPTFILTERCAPS_MAGFLINEAR:              yes
caps.TextureFilterCaps.D3DPTFILTERCAPS_MAGFPOINT:               yes
caps.TextureFilterCaps.D3DPTFILTERCAPS_MINFANISOTROPIC:         yes
caps.TextureFilterCaps.D3DPTFILTERCAPS_MINFLINEAR:              yes
caps.TextureFilterCaps.D3DPTFILTERCAPS_MINFPOINT:               yes
caps.TextureFilterCaps.D3DPTFILTERCAPS_MIPFLINEAR:              yes
caps.TextureFilterCaps.D3DPTFILTERCAPS_MIPFPOINT:               yes

caps.CubeTextureFilterCaps.D3DPTFILTERCAPS_MAGFAFLATCUBIC:      no
caps.CubeTextureFilterCaps.D3DPTFILTERCAPS_MAGFANISOTROPIC:     no
caps.CubeTextureFilterCaps.D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC:   no
caps.CubeTextureFilterCaps.D3DPTFILTERCAPS_MAGFLINEAR:          yes
caps.CubeTextureFilterCaps.D3DPTFILTERCAPS_MAGFPOINT:           yes
caps.CubeTextureFilterCaps.D3DPTFILTERCAPS_MINFANISOTROPIC:     no
caps.CubeTextureFilterCaps.D3DPTFILTERCAPS_MINFLINEAR:          yes
caps.CubeTextureFilterCaps.D3DPTFILTERCAPS_MINFPOINT:           yes
caps.CubeTextureFilterCaps.D3DPTFILTERCAPS_MIPFLINEAR:          yes
caps.CubeTextureFilterCaps.D3DPTFILTERCAPS_MIPFPOINT:           yes

caps.VolumeTextureFilterCaps.D3DPTFILTERCAPS_MAGFAFLATCUBIC:    no
caps.VolumeTextureFilterCaps.D3DPTFILTERCAPS_MAGFANISOTROPIC:   no
caps.VolumeTextureFilterCaps.D3DPTFILTERCAPS_MAGFGAUSSIANCUBIC: no
caps.VolumeTextureFilterCaps.D3DPTFILTERCAPS_MAGFLINEAR:        yes
caps.VolumeTextureFilterCaps.D3DPTFILTERCAPS_MAGFPOINT:         yes
caps.VolumeTextureFilterCaps.D3DPTFILTERCAPS_MINFANISOTROPIC:   no
caps.VolumeTextureFilterCaps.D3DPTFILTERCAPS_MINFLINEAR:        yes
caps.VolumeTextureFilterCaps.D3DPTFILTERCAPS_MINFPOINT:         yes
caps.VolumeTextureFilterCaps.D3DPTFILTERCAPS_MIPFLINEAR:        yes
caps.VolumeTextureFilterCaps.D3DPTFILTERCAPS_MIPFPOINT:         yes

caps.TextureAddressCaps.D3DPTADDRESSCAPS_BORDER:                no
caps.TextureAddressCaps.D3DPTADDRESSCAPS_CLAMP:                 yes
caps.TextureAddressCaps.D3DPTADDRESSCAPS_INDEPENDENTUV:         yes
caps.TextureAddressCaps.D3DPTADDRESSCAPS_MIRROR:                yes
caps.TextureAddressCaps.D3DPTADDRESSCAPS_MIRRORONCE:            yes
caps.TextureAddressCaps.D3DPTADDRESSCAPS_WRAP:                  yes

caps.VolumeTextureAddressCaps.D3DPTADDRESSCAPS_BORDER:          no
caps.VolumeTextureAddressCaps.D3DPTADDRESSCAPS_CLAMP:           yes
caps.VolumeTextureAddressCaps.D3DPTADDRESSCAPS_INDEPENDENTUV:   yes
caps.VolumeTextureAddressCaps.D3DPTADDRESSCAPS_MIRROR:          yes
caps.VolumeTextureAddressCaps.D3DPTADDRESSCAPS_MIRRORONCE:      yes
caps.VolumeTextureAddressCaps.D3DPTADDRESSCAPS_WRAP:            yes

caps.LineCaps.D3DLINECAPS_ALPHACMP:                             yes
caps.LineCaps.D3DLINECAPS_BLEND:                                yes
caps.LineCaps.D3DLINECAPS_FOG:                                  yes
caps.LineCaps.D3DLINECAPS_TEXTURE:                              yes
caps.LineCaps.D3DLINECAPS_ZTEST:                                yes

Max texture width:  2048
Max texture height: 2048
Max volume extent:  1024

Max texture repeat: 2048
Max texture aspect: 2048
Max anisotropy:     16
Max vertex W:       10000000000.000000

Guard band (l,t,r,b): -960.000000 -960.000000 2880.000000 2880.000000

Extents adjust: 0

caps.StencilCaps.D3DSTENCILCAPS_DECR:                           yes
caps.StencilCaps.D3DSTENCILCAPS_DECRSAT:                        yes
caps.StencilCaps.D3DSTENCILCAPS_INCR:                           yes
caps.StencilCaps.D3DSTENCILCAPS_INCRSAT:                        yes
caps.StencilCaps.D3DSTENCILCAPS_INVERT:                         yes
caps.StencilCaps.D3DSTENCILCAPS_KEEP:                           yes
caps.StencilCaps.D3DSTENCILCAPS_REPLACE:                        yes
caps.StencilCaps.D3DSTENCILCAPS_ZERO:                           yes

caps.FVFCaps.D3DFVFCAPS_DONOTSTRIPELEMENTS:                     no
caps.FVFCaps.D3DFVFCAPS_PSIZE:                                  yes
caps.FVFCaps.D3DFVFCAPS_TEXCOORDCOUNTMASK:                      yes

caps.TextureOpCaps.D3DTEXOPCAPS_ADD:                            yes
caps.TextureOpCaps.D3DTEXOPCAPS_ADDSIGNED:                      yes
caps.TextureOpCaps.D3DTEXOPCAPS_ADDSIGNED2X:                    yes
caps.TextureOpCaps.D3DTEXOPCAPS_ADDSMOOTH:                      yes
caps.TextureOpCaps.D3DTEXOPCAPS_BLENDCURRENTALPHA:              yes
caps.TextureOpCaps.D3DTEXOPCAPS_BLENDDIFFUSEALPHA:              yes
caps.TextureOpCaps.D3DTEXOPCAPS_BLENDFACTORALPHA:               yes
caps.TextureOpCaps.D3DTEXOPCAPS_BLENDTEXTUREALPHA:              yes
caps.TextureOpCaps.D3DTEXOPCAPS_BLENDTEXTUREALPHAPM:            yes
caps.TextureOpCaps.D3DTEXOPCAPS_BUMPENVMAP:                     yes
caps.TextureOpCaps.D3DTEXOPCAPS_BUMPENVMAPLUMINANCE:            yes
caps.TextureOpCaps.D3DTEXOPCAPS_DISABLE:                        yes
caps.TextureOpCaps.D3DTEXOPCAPS_DOTPRODUCT3:                    yes
caps.TextureOpCaps.D3DTEXOPCAPS_LERP:                           yes
caps.TextureOpCaps.D3DTEXOPCAPS_MODULATE:                       yes
caps.TextureOpCaps.D3DTEXOPCAPS_MODULATE2X:                     yes
caps.TextureOpCaps.D3DTEXOPCAPS_MODULATE4X:                     yes
caps.TextureOpCaps.D3DTEXOPCAPS_MODULATEALPHA_ADDCOLOR:         yes
caps.TextureOpCaps.D3DTEXOPCAPS_MODULATECOLOR_ADDALPHA:         yes
caps.TextureOpCaps.D3DTEXOPCAPS_MODULATEINVALPHA_ADDCOLOR:      yes
caps.TextureOpCaps.D3DTEXOPCAPS_MODULATEINVCOLOR_ADDALPHA:      yes
caps.TextureOpCaps.D3DTEXOPCAPS_MULTIPLYADD:                    yes
caps.TextureOpCaps.D3DTEXOPCAPS_PREMODULATE:                    yes
caps.TextureOpCaps.D3DTEXOPCAPS_SELECTARG1:                     yes
caps.TextureOpCaps.D3DTEXOPCAPS_SELECTARG2:                     yes
caps.TextureOpCaps.D3DTEXOPCAPS_SUBTRACT:                       yes

Max texture blend stages:  8
Max simultaneous textures: 8

caps.VertexProcessingCaps.D3DVTXPCAPS_DIRECTIONALLIGHTS:        yes
caps.VertexProcessingCaps.D3DVTXPCAPS_LOCALVIEWER:              yes
caps.VertexProcessingCaps.D3DVTXPCAPS_MATERIALSOURCE7:          yes
caps.VertexProcessingCaps.D3DVTXPCAPS_POSITIONALLIGHTS:         yes
caps.VertexProcessingCaps.D3DVTXPCAPS_TEXGEN:                   yes
caps.VertexProcessingCaps.D3DVTXPCAPS_TWEENING:                 yes
caps.VertexProcessingCaps.D3DVTXPCAPS_NO_VSDT_UBYTE4:           no

Max active lights:             8
Max user clip planes:          6
Max vertex blend matrices:     4
Max vertex blend matrix index: 37

Max point size: 256.000000
Max Prim count:    65535
Max Vertrx index:  16777215
Max Streams:       16
Max Stream stride: 1024

Vertex shader version:   1.1
Max vertex shader const: 256

Pixel shader version:    1.4
Max pixel shader value:  -536870912
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 24, 2004, 11:57:10 am
Ahh... I see the problem.
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 24, 2004, 01:04:20 pm
that's good :)
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 24, 2004, 03:19:35 pm
Download the build exe from my sig.
This *should* at least solve the size problem.

If you think its still off then press Insert and Delete to change the particle scaling and when you quit out the values are saved to a debug file which you can send me.
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 24, 2004, 04:13:59 pm
it's better but still far from perfect.

The particles on particle-only weapons are still invisible and appear only at large distances (though they appear nearer than in the previous version).

The scaling is pretty weird. When I adjust the size so one weapon looks like it should, most of the other weapons' particles are messed up.

Are you sure it uses the values specified in weapons.tbl? It's just a suspicion, but I get the feeling it now renders all particles at the same size.
Title: More htl D3D goodness: Particles
Post by: Nuke on January 24, 2004, 04:57:27 pm
could it by chance be using the graphic's size in the calculations somewhere, it would explain for the chaotic scaling with different particles. try using same pspew values with different size bitmaps and see if the particles are different sizes. just a thought.
Title: More htl D3D goodness: Particles
Post by: FreeTerran on January 24, 2004, 05:08:04 pm
Quote
Originally posted by Raa Tor'h


Um. FT?

The ones on the left are good, without the code enabled.

The ones on the right are bad. I hope you weren't standing by your old post about not seeing anything wrong...


woops :o

i have look at the wrong site *g*
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 25, 2004, 08:16:40 am
Sorry Lightspeed this is quite difficult, Im effectively programming blindfolded.
Title: More htl D3D goodness: Particles
Post by: Flipside on January 25, 2004, 08:25:42 am
I've got my computer working again now, so I'm going to download this build and take a look tonight, see how it performs on mine, maybe 2 people giving input will help to hone this down?

Flipside :D
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 25, 2004, 08:33:33 am
I think I need to sit down and think it all though.
I thought I could just chuck this change in but its more complicated than that.
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 25, 2004, 09:20:41 am
no need to apologize RT, you're doing a great job, and I really hope this can/will be sorted out soon. I'm just pointing out bugs, since when finished the game should look exactly the same with and without the flag :)
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 25, 2004, 09:32:44 am
Could you give me details of the weapons that use particle code.
I know my FS2 poly level stuff but I no surprising little about the higher level stuff.
Title: More htl D3D goodness: Particles
Post by: Flipside on January 25, 2004, 09:38:23 am
Would it help if someone altered a Ulysses to emit engine particles, and all you'd have to do was enter a mission, hit '.' and have a look?
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 25, 2004, 09:41:57 am
not really. All you have to do is download my weapons zip and load out a morning star. then fire it.
Title: More htl D3D goodness: Particles
Post by: Flipside on January 25, 2004, 09:47:35 am
Actually, yes, it would help, but your way is easier :D
Title: More htl D3D goodness: Particles
Post by: RandomTiger on January 25, 2004, 11:10:35 am
Thanks guys.

Dont worry I will get this done eventually.
I get significant frame rate improvements for particle heavy scenes so its well worth it.

Have you got a link for me for that zip Lightspeed
Title: More htl D3D goodness: Particles
Post by: Lightspeed on January 25, 2004, 11:38:59 am
Clicky (http://www.penguinbomb.com/lightspeed/FS2_new_weapon_FX_v0.1j.zip)

Weapons that use particles:

Akheton SDG - Bitmap + lots of particles
Lamprey - Bitmap + random spawning of particles
Kayser - Bitmap + random spawning of particles
Morning Star - Particle-Only weapon (see distance bug here)
Maxim - Particle-Only weapon
Circe - Particle-Only weapon