SPECIAL Custom Sparkle
|
|
PeachToadstool Pink
Designer
Join date: 6 Oct 2006
Posts: 37
|
01-28-2009 17:29
Many jewelry designers apply sparkle or "bling" to their creations. That style...isn't what I seek to accomplish. Instead, I wish to use a sprite (texture) and give it special animation using a particle system.
Here's what the sparkle should do:
Increase a four-point star-shaped sprite in size from 0, while rotating. Decrease in size to 0 after full expansion, while still rotating.
What I have accomplished so far:
I use a timer to generate a new sparkle the same size as the other. The old sparkle dies and the new sparkle shrinks down to nothing.
I have been able to fake rotation by generating new particles at a set omega value. However, this requires a rapid timer to produce a size change illusion, also. The result is choppy/laggy and unreliable. In addition, the rotation works "smoothly" only from certain view angles.
Current hypothesis being tested:
I'm working at creating individual frames of animation in Photoshop. In theory, I could produce a rotation illusion by using a timer to replace textures and change size simultaneously. Size change glitch won't be fixed this way, though....
Does anyone know an approach I can take using particles to accomplish my objective?
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
01-28-2009 17:33
have you played with the particle angle at all? it's treated the same way as the texture is on the prim as far as i know
you start the angle at 0 and end it at 180, that would make it rotate halfway around. 270 might make it rotate the other way, not sure, and for a full turn i don't know if 360 will work, i'll play with it and see what it does
|
|
PeachToadstool Pink
Designer
Join date: 6 Oct 2006
Posts: 37
|
01-28-2009 18:00
Angle is what I'm using. From what I tried, angles are vector (bad) and won't set the texture at the new angle until the generator emits a new particle. This is the case with omega, anyway. If you're talking about INNERANGLE and OUTERANGLE, I think the purpose of that is to determine positive and negative space for particles based on angle...
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
01-28-2009 18:06
hmm, what about using target? i have some moth particles that i use to target the emitter. i send them out at a speed and have it target itself and follow the velocity, so it looks like the moths are flying around and towards the light
|
|
Yingzi Xue
Registered User
Join date: 11 Jun 2008
Posts: 144
|
01-28-2009 18:15
Since you're using a texture, why not make the sparkle on a flattened cylinder and use llSetScale to grow it a little bit and llTargetOmega to make it spin? Once it reaches a certain scale (small enough), have it set alpha to 0 until the next sparkle and begin the scale process again. so your sparkle would be constantly spinning, but would disappear when it reaches the lowest scale and then reappear, grow and diminish again, all the while rotating. The down side of this method is it will be two-dimensional, but if it's going to be on a necklace or a pendant it would still be visible from a decent angle. EDIT: Another idea... you could put it on a cube and use texture rotation instead. This covers viewing it from all sides.
|
|
PeachToadstool Pink
Designer
Join date: 6 Oct 2006
Posts: 37
|
01-28-2009 18:16
I'm afraid the moth example doesn't seem anything like what I'm trying to accomplish. The sparkle doesn't move around a source. It should rotate on a pivot with the center of mass in the middle of the texture. It should not orbit.
|
|
PeachToadstool Pink
Designer
Join date: 6 Oct 2006
Posts: 37
|
01-28-2009 18:22
I thought about using an object in that exact manner, but I'm afraid that has problems, too. I'm making a necklace and earrings set. The earrings will be viewed from more angles than the necklace.
The main reason why I wanted to use a particle system is because the texture always faces the camera. Still, the object-based sparkle isn't completely bad. If all else fails, I just may use it. Thanks.
Perhaps there are other techniques...?
|
|
Ruthven Willenov
Darkness in your light
Join date: 16 Jan 2008
Posts: 965
|
01-28-2009 18:33
|
|
PeachToadstool Pink
Designer
Join date: 6 Oct 2006
Posts: 37
|
01-28-2009 18:46
I agree, Ruthven. I know someone who will benefit greatly from animated particles other than me. I'll vote.
Yingzi, I'm afraid the texture rotation on a box would produce up to three skewed sparkles, depending on vantage point. I'm trying the single cylinder method right now....
[EDIT] Okay, Yingzi's method just may do the trick. However, I made some modifications. I used llRot2Up for specific axis, a repositioning code (to counter scaling along the Z local axis), and two cylinders touching each other (to create the illusion a two-sided plane with zero thickness). The bugs are at a minimum.
|