Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark Physics & Dark A.I. & Dark Dynamix / DarkPhysics Particle Emitter inconsistently shows up.

Author
Message
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 26th Mar 2009 21:05
I've made a nice looking effect of a smoke trail from a launched rocket. When it works, it looks great, however, it only works about 1 out 10 or 20 shots. Sometimes the smoke particles are losing alpha transparency too. (I'm using the Flake.dds file that came with DP)

Here is the emitter's creation.


and here is the update each loop to follow the rocket.


This code basically moves the emitter along with the rocket, and fades the smoke trail over time once the rocket has impacted and been removed from the scene.

I just can't figure out why the effect doesn't show every time, and why the texture is all white sometimes.

HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 27th Mar 2009 00:11
form what I found from using particles is that if the image is not loaded then you end up with a white square you can also get this changing display setting half way thought programe, however would not have thought that your code would be missing that bit out each time.

Dark Physics makes any hot drink go cold.
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 27th Mar 2009 02:31
I had the same problem, the particles disappearing while moving the camera angle/distance and not showing on creation. Totally intermittently it seemed.

I found it was the emit rate, the third parameter, i got it to be a very low value due to variable timing.

I suppose 0.001 can be too low a value, try increasing it in steps.

Also the point of creation in the code had effects, i had to create the emitter early, and i had problems with textures loaded long before the emitter was created. I had to load the texture just before creating and texturing it, but i may have made a mistake in the texture loading function as i think of it =P.

Regards
Orion1024
15
Years of Service
User Offline
Joined: 7th Mar 2009
Location: Dimensional Coordinates: 323.935.914.157
Posted: 27th Mar 2009 03:48
I had the same problem a couple months ago with a physics smoke emitter intermittently showing up depending on the camera location. I think my solution was to set the emitter color to zero instead of deleting it...can't remember for sure, though. Are you deleting the emitter at some point in your code?

Looking for the vortex to another Earth
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 27th Mar 2009 18:04
Quote: "Are you deleting the emitter at some point in your code?"


Yes. Once the weapon impacts and disappears, the fade out routine changes the color of the particles fading them to black. Then the emitter is deleted.

So maybe I should try making like 10 emitters and storing them off screen until needed?

I may end up doing something on my own rather than use DP. Even when the particles don't show up, once there are 4 or 5 emitters running the framerate drops, which is ridiculous considering my system specs.

Core 2 Duo 3.16GHz
4 GB DDR2
NVidia 9800 GT
NVidia 9400 GT (using driver 181, which allows the second card to act as the PhysX card)

You would think PhysX would run like a scalded monkey on this. I'm almost afraid to see what it does on my P4 system.

Orion1024
15
Years of Service
User Offline
Joined: 7th Mar 2009
Location: Dimensional Coordinates: 323.935.914.157
Posted: 27th Mar 2009 23:02
Yes, the physics emitters drop the framerate in quite a hurry. My system specs are almost identical to yours and just the addition of three physics emitters with 20 particles each drops the framerate about 50%. If you can use a DB particle emitter and make it look as good, definitely do it. I used regular DB particle emitters for explosions and the hit on performance was minimal.

Looking for the vortex to another Earth
chunks chunks
17
Years of Service
User Offline
Joined: 2nd Jan 2007
Location: ackworth uk
Posted: 30th Mar 2009 02:30
try zparticle its a good plugin and its not bad on the fps too.
http://www.battlecraft42.com/dbp/

Also comes with an editor too , all be it a little quirky.

nvidia geforce 8600gt + amd athlon 64
windows xp pro.
KISTech
16
Years of Service
User Offline
Joined: 8th Feb 2008
Location: Aloha, Oregon
Posted: 30th Mar 2009 19:06
I had a look at zParticle once a while back. Quirky is right..

I'll probably end up writing my own particle system using plains, which is essentially what zParticle does. I just know at this point in time PhysX particles don't seem to be worth the trouble.

baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 7th Jul 2009 15:04
@Duke E I tried your solutions above and it turned out that creating the emitter earlier in my code helped with this problem.

I have found that I am playing a sound when there is a collision and my particles are causing problems with it even when I exclude them from the loop...

This system needs looking at!
Duke E
15
Years of Service
User Offline
Joined: 10th Mar 2009
Location:
Posted: 15th Jul 2009 04:36
Quote: "turned out that creating the emitter earlier in my code helped with this problem."


I am glad it helped, can not see how the sound would alter the particles though, sorry.

And yes it need s some looking at, i have actually discarded the Phy particles from my project once, and then now reinstated them. Big problem again though, can't set the emitter particle duration in the loop, so if the game alternates from 60 to 120 FPS the emitter will emit particles at the set phase extinguishing them twice as fast on 120FPS =/

Regards
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th Jul 2009 11:05
It seems like it works fine on my work pc but not at home, which is weird as my home pc is higher spec...

I may still use another system as this is far too frustrating
HowDo
21
Years of Service
User Offline
Joined: 28th Nov 2002
Location: United Kingdom
Posted: 15th Jul 2009 13:18
When I can't get the PhysX to work I go and look at the SDK demo files and see how thay are used, to see if I am using right.

Dark Physics makes any hot drink go cold.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 15th Jul 2009 13:48
Yeah, I'll take another look cause it looks great (when it works) and is easy to impliment.

Login to post a reply

Server time is: 2024-04-27 03:07:33
Your offset time is: 2024-04-27 03:07:33