I have been searching for a way to get my particles to glow like you can in UDK. You would just turn the colour value up past 1 and it would glow brightly. But in Unity I haven't found a way to do this. Looking at some of the bundled effects like fire, they look like they employ this effect. I tried to find what values made it bright but it seems it was just due to lots of additive particles in a small area.
This is what I currently have, it's intended for shooting, so the particles are the bullets and the halo is just a glow from where the shots originate. It's using the spark texture and a Particles/Alpha Blended shader.
Any help would be much appreciated
Replies
As you can see, however, there is a mismatch between where the particles appear. The sub emitter is set to appear on the birth of the parent particle. I would have thought that this meant they would appear at the origin and because the lifetimes are the same then they would fade out at the same time too. This was not the case and I have had to set the lifetime of the sub emitter to 1 whereas the parent is 2.
Short of setting up 2 separate emitters to properly match up the timings, is there a better way I can match them up in the sub emitter settings?
I should also mention that I am using Unity free and am trying not to spend money on buying stuff from the Asset Store.
Thanks
I think I have worked around it by using two separate emitters rather than a sub emitter. The top one is the sub emitter method; the bottom is the new double emitter method. This should mean we can access the colour nodes and change them.
Thanks for the reply though
Whatever works for ya though.
When it comes to testing it out for its intended purpose we may find that your solution works better. I'm not really a coder and it is our first Unity project so it's very much a learning process.
Thanks again
as it grows the color over time gradient drives the change to the outside while the center is pure white , the middle is green the ends are green + transparent
and you should be able to set modification to the ColorOverTime to drive outer 'glow' dynamically
make sure the sorting has the white center in front during draw
Oldest first IIRC means the smaller initial white circle will be draw last (on top)
in either case you have what you want though
two emitters using the same material batch = 1 draw call so there is nothing 'wrong' with 2
just make sure you are using as few billboards as needed, over draw and CPU computations is certainly an issue for Mobile. if you start to get heavy you can really trash frame rates
I tried your method and whilst it works in the way I want, it lacks the intensity of the 2 emitter method due to having to blend between the green and white to keep the white centre. See image: top is your method, bottom is the 2 emitter method. Any ideas on how to bump up the intensity?
Also thanks for the technical insight. Do you know how I would go about telling Unity to draw the white in front (if I go with 2 emitters)? And it has just occurred to me that the 2 emitter system was using 2 materials so I have changed to the same one and am using Start Color instead of Tint on the material to get the green.
Thanks again
Under the Renderer tab change the Sorting Fudge. Lower numbers get rendered in front of particles with higher numbers.
Thanks
loop = true
pre-warm = true
Start_lifetime = 0.5
Max = 10
emission rate 20
color over time
color 1 = 255,255,255 (white) at position 40%
color 2 = greenish at 60% position
alpha starts full all the way to position 85% and it's 0 by the end (100% position)
size is ~0.5 for the first half
1.00 for the 2nd half (quick incline) __/¯¯
sort mode = "Oldest_first" (so the new white is draw over the old green)
what you think?
you can get away with 6 max
rate of 18
0.33 duration
though it will flicker just a bit on the outside and be a tad less "bright" and need ColorOverTime tweek to keep the brightness
If I have a large horizontal billboard 'crater' and it's sorting on top of some stretched billboard gravel/dust splash; setting the splash to fudge -10 and the crater to 10 is plenty... usually
also a Glow like bloom feel will be superior in context if you use Blended additive and neither pure alpha nor additive
http://www.polycount.com/forum/showthread.php?t=125927
[you should duplicate the mobile>particle>alpha shader but call it 'addBlend' or something and changes its Blend to [I]One OneMinusSrcAlpha[/I], also you'll need a 32 bit texture of the particle (tga 32), you could use "use grey as alpha channel" but imo author the alpha channel yourself for far better control]
I tried the 6, 18, 0.33 method and it works nicely. The small amount of flickering isn't really an issue, in fact it looks better as it gives it some "energy" rather than looking very uniform.
But I notice now that this has created a static particle. How would I get this to move as a shot from a gun, just fire instances of the whole particle system rather than letting the particles off? And would it still collide with objects like how my 2 emitter version did? See GIF.
2 emitter version with sub emitters that spawn on collision:
Also thanks for the billboard/sorting info, it will probably come in handy at some point.
we move it and use a sphere_collision component to do a hit check,
when the check is true; projectile is turned off
a "splash" emit effect is turned on in its place (oriented usually toward source location, hemisphere or cone shaped emiter)
or you can give the emiter _World space,
a "shape" such as a cone (0 angle), or .01 .01 .01 cube
aim it in the direction you want
adjust Start_Speed setting
set an on_death sub emit that spawns the splash off.. the down side I think is particles can die for other reasons, maybe?
a touch outside my skill set, implementation is not what I handle