Rotating particle...

Posted By: seecah

Rotating particle... - 09/05/09 08:25

Hi All,

I just want to ask if there's any way that we can let each particle rotate?

I'm using a bitmap for particle effect and I want it to be rotating as the alpha and lifespan decreases..

We've tried to use a bitmap (xxxx+6.tga) but also doesn't work

Hope anybody can advise...

Thanks
Posted By: alibaba

Re: Rotating particle... - 09/05/09 08:47

there was contribution here about rotating particles. search in the lite-c contributions.
EDIT: i didnt find it. however, i uploaded it. here:
http://ifile.it/6rsbtua

dont forget to thank gameus!
Posted By: Scorpion

Re: Rotating particle... - 09/05/09 09:49

just use sprites for it, make them face the cam(pan=0 tilt=0 roll!=0), make it passable and apply a action that does the init and the job of the particle event.
Posted By: seecah

Re: Rotating particle... - 09/05/09 10:02

Ahhh.. So there's really no way that you can rotate a particle by not making it a sprite?
Posted By: HeelX

Re: Rotating particle... - 09/05/09 12:46

Another option would be to actually "draw" for each angle a version of the bitmap and save it to file. Then, load all bitmaps into an array for instance and use one of the particle skills that stores the "angle". In the particle function you could then evaluate the angle and normalize it back to array index. E.g. if you have 8 bitmaps for 360°, and the angle is 75°, then the array index is

int index = (int)((angle / 360.0f) * 8.0f) % 8;

This looks only good if you have ~15 fps or more. That means, that if you have a cycle in x seconds, you have to have 15 * x frames for your cycles. So, if your sequence (e.g. a full 360° rotation) is done approx. in 0.7 seconds, you would have to have at least 10 frames.

OF COURSE, this is very memory consuming dependant on your particle size and the image compression type. I always recommend DDS for sprites and textures.. this can reduce memory very much.

Best regards,
Christian
Posted By: SomebodyNew

Re: Rotating particle... - 09/06/09 21:29

Quote:
I always recommend DDS for sprites and textures..

DDS? What is that?
Didn't find anything using the forum search.
Posted By: Quad

Re: Rotating particle... - 09/06/09 21:35

it is not something engine spesific, it means "DirectDraw Surface" some sort of texture format. google it.
Posted By: fogman

Re: Rotating particle... - 09/06/09 21:35

http://en.wikipedia.org/wiki/DirectDraw_Surface
© 2024 lite-C Forums