Graal Forums  

Go Back   Graal Forums > Graal V6 forums > Feature request
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 04-29-2011, 12:14 AM
calani calani is offline
Scriptess
calani's Avatar
Join Date: Aug 2003
Location: asmgarden.gmap
Posts: 606
calani is on a distinguished road
Send a message via AIM to calani
Post Emitter Improvements

While working with emitters, I kept finding myself frustrated at the emitters' inability to do certain things, having to cheat to get them to look right, etc; and, I thought of a few things that would be exceedingly handy to have. After awhile, I started writing these down, and ended up compiling this list about two years ago. Even adding support for just a few of these would allow us to make *amazing* things with emitters.

Here's the list:



Particle Emitter Improvements

Summary (no specific order) :
* particle layers independent of parent TShowImg
* flag that specifies whether dropemitter/dropwateremitter particles inherit values
* nested emitters
* dropairemitter - triggers when z>=0 (or waterheight)
* changing values in set amounts, ex: multiples of pi/8
or possibly: selecting a random value out of an array. ex: {0, 1, 2, 4, 8, 16}
* modifier that affects only a percentage of particles
* easy removal of specific modifiers (possibly give each modifier a name/groupname (does not have to be unique) as an identifier)
* ability to reference current particle values (ex: modifying stretchx based on speed)
* toggle for Z altering particles' screen display position
* changing a particle's image after emit
* attaching particles to groups
* ability to read particle's height over (or under) terrain
* ability to read the height of the terrain at the particle's xy
* flag to force a particle's z to always be equal or greater than the terrainheight
* flag to force a particle's z to always be equal or greater than the waterheight
* flag to force a particle's z to always be less than or equal to zero (or waterheight)






Specifics:


Drop emitters' particles need to be able to be on different layers than the container TShowImg
* particle layers independent of parent TShowImg
Ex: Raindrops falling: layer 3. -> Splash effect in dropemitter: layer 0.


Drop emitters should inherit the values from the dropped particle
* flag that specifies whether dropemitter/dropwateremitter particles inherit values
This one is a must. Without it, there is no way to make a particle actually bounce, as it does not know which direction the particle was going, nor the speed, etc. Also, for snowflakes: if a flake hits the ground, you want the drop emitter to show the same snowflake fading out as it melts. problem, though, is that the drop emitter does not know what image the particle was using.

Ex: particle with a random snowflake graphic hits the ground, dropemitter shows the same snowflake fading out
Ex: shrapnel particle hits the ground with random angle/rotation/image, dropemitter causes an identical particle to bounce up and fall with gravity, second drop emitter causes an identical particle to bounce lower and fall with gravity, third drop emitter shows an identical particle resting on the ground then fading out.


Attaching emitters to particles
* Nested emitters
Attaching an emitter to each particle in another emitter.
Ex: Missile particle with a smoke emitter forming the trail behind it, that explodes into a firework via dropemitter (who's particles do not have the smoke attached)

NPC Code:
missile emitter {
particle {
settings;
smoke emitter {
modifiers;
}
}
modifiers;

drop emitter {
particle {
settings;
}
modifiers;
}
}


in the above example, you could also attach another emitter to the dropemitter's particles if needed.



Ability to change particles' attributes in set amounts, ex: change a particle's X by .5, 1, 1.5, ..., angle by increments of pi/4, etc.
* changing values in set amounts, ex: multiples of pi/8
* or possibly: selecting a random value out of an array. ex: {0, 1, 2, 4, 8, 16}

I want to be able to emit particles with angles along set increments, such as every 15 degrees, or (to make a matrix-like effect) spawn text spaced every .5 tiles.
Ex: Anime-style surprise emote: short lines around someone, every 20° or so
Ex: pulsating lines around Super Mario Sunshine's pulsating logo
Ex: matrix-style effect: spawn letters spaced every .5 tiles, add an impulse at .2 seconds to move the letter down .5 tiles. the only way to do this currently is have one emitter per column... which is not very efficient.


Ability to have a modifier affect random particles:
* modifier that affects only a percentage of particles
I only want 20% of my particles to spin, there's no real way of doing this.
The only method of having a few particles spin is by adding an impulse with a timeframe between 0 and 200 seconds or such. You cannot guarantee a percentage, but it -will- make only some of your particles spin. Not a very good solution.


Easier way to remove specific modifiers (rather than clearing all modifiers and readding the ones you want to keep)
* easy removal of specific modifiers (possibly give each modifier a name/groupname (does not have to be unique) as an identifier)
Impulse modifiers are always active and never expire. Need a way to remove (or just enable/disable) these.
Ex: Initial alpha of (.1 to .5) -> lower alpha by .05 every (.01 to .05) sec. Later, remove impulse modifier and fade particle back in to alpha=1.


Way to reference particles' current values in modifiers.
* ability to reference current particle values
Ex: Range modifier replacing alpha from (alpha) to (alpha)+.5 over 3 seconds.
Ex: Range modifier replacing alpha from (alpha) to zero over 3 seconds.
Ex: changing a particle's zoom based on it's speed. 0.05 sec impulse: replace zoom with speed/10
Ex: picking a random number, and fading the alpha of a particle from zero to that number, then back to zero again.


Flag to enable or disable a particle's Z from changing its display position
* toggle for Z altering particles' screen display position
This would be useful for angled falling particles on 3d gmaps. I want rain to fall down from the sky at an angle, and hit the terrain. Setting an angle and speed works great, but if I modify the Z so it can hit the terrain, that will change where the client draws raindrop on the screen, and make the drop's movements jittery as it falls. I want to use Z so i can detect if it hits water or land, and change the ring or splash dropemitter accordingly.
Ex: after setting the flag, a particle at (10,15,22) will be drawn at the same place on the screen as (10,15,0).
Ex: Angled rain falling on a gmap; Uses angle+speed to move the particle, and lowering Z until the particle hits to add a splash.


Ability to change a particle's image after emit
* changing a particle's image after emit
Either setting the particle's image to a specific image, or to one of an array of images {"crystalflash.gif", "g4_particle_x.png", "g4_particle_bluelight.png"}
(or just one of a set of numbered images, ie Snowflake[0..25].png).
The uses for this are staggering.


Particle groups - Changing variables of the group changes all of the particles' vars.
* attaching particles to groups
Attach all particles in a group to a group 'object' so their positions, angles, etc are relative to that object. Like spinning a clock turns the hands, the numbers, the face, etc; and the clock hands cab still move on their own and keep their relative angles and speeds.
Altering the group object, then, would alter every particle therein. if you have a cloud of particles and change the group object's rotation, it would rotate all the particles in the cloud around the center of the group object.

Ex: creating a galaxy emitter and spinning the entire thing without distorting its shape
Ex: flock of birds, school of fish, glow around a flying cannonball, clouds around GK magic bullets/wounds, wind blowing certain smoke particles, etc.
Ex: normal modifiers for each individual particle, along with adding a modifier to alter the speed and heading of the group
Ex: spinning particle spawn points around a central point (see my housing portal emitter on Classic iPhone)


(continued below)
__________________
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 11:30 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.