Game Development Community

Need more particle effects rendering.

by Geo Miller · in Torque Game Engine · 10/01/2005 (2:12 pm) · 8 replies

I don't know if this is possible, but please help with anything you have.

In my game I currently have a lot of particle effects and I have noticed that they quickly stop being rendered when I move too far away or get too many on the screen at one time. This confuses me, because my framerate is still at a solid 60+. I would like to sacrifice performance for more effects, and was wondering the possibilities I have.

Thanks!

#1
10/02/2005 (9:43 pm)
Have you tried reading through the particle emitter code in order to see what might be "eating" particle effects?
#2
10/02/2005 (10:29 pm)
No, I hadn't before... but I did just now. Learned a bit from it, but I am still confused why I am getting the effect I am. Here is a short video displaying the exact problem I am having.

http://garnet.acns.fsu.edu/~glm04/Untitled4.rar

What I set up here are two blank models with particles mounted to them with the Mounted Particle Emitters resource (http://www.garagegames.com/index.php?sec=mg&mod=resource&page=view&qid=8156),

Notice: as the controlled player moves back and parts of it's emitter trail shows, the emitter of the other player dissapears. I don't know why this is, as if I shoot weapons and such with other particles, those seem to show up ok.

Any ideas?
#3
10/04/2005 (8:20 am)
I am almost willing to put a bounty on the fix or a signficant amount of help on this for me heh. Don't want to be an annoying bumper, but I am pretty frustrated with this and have gotten nowhere on my own. It's something that just seems to happen with the default SDK. (I am using 1.3 -- might 1.4 have fixes for the particle engine or something that I don't know about?)
#4
10/04/2005 (8:43 pm)
Just a wild guess, try adjusting $Pref::TS::autoDetail. It's probably set to 1.0, which means that you can only render about 20k triangles. This is a multiplier, so bumping it to 2.0 will set you to 40k triangles.

I'm not sure if particles are considered part of the LOD calculation... if it's not then this value won't change a thing and I'd suggest setting it back to 1.0 if things don't change. I'm guessing it only has to do with 3Space objects, but it's worth a try.

If that doesn't work, I'll take a quick peek into the code to see if I can't find something.
#5
10/04/2005 (8:59 pm)
Ok, autoDetail has nothing to do with it. I looked at the source code and it doesn't appear that anything would limit the number of particles.

Are you sure you're not using just one particle emitter? It looks like when you move the particle emitter moves with you, then when you stop moving it jumps back to the static position.
#6
10/05/2005 (6:19 am)
Absolutely certain. They are two particle feilds, it looks like that because the other one disapears when the controlled player moves. I can show a 3rd person perspective of both of them in action if needed.

Well, maybe not. This is what I did. I have player 1 initilized from player.cs and the other player initilized from aiplayer.cs. They both have dummy objects mounted to them which use a particle emitter I defined in "mountedParticle.cs" They both use the same code, but I assumed that the engine would create two instances of this emitter because it is two different objects on two different players. In a 3rd person perspective, you can see each emitter on these players as individual entities, is it possible they are still linked in some way?

When I get home tonight I will have them use totally different emitters that have a clear visual difference and see what happens. Thank you for your help so far.
#7
10/05/2005 (12:04 pm)
Thanks for you help Tony, it turned out to be a problem with the emitter resourse I was using -- I am going to post there.
#8
10/05/2005 (12:49 pm)
Thanks for you help Tony, it turned out to be a problem with the emitter resourse I was using -- I am going to post there.