Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Particle Playground

Discussion in 'Assets and Asset Store' started by save, Dec 4, 2013.

  1. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hey Mike!
    Try changing the preset to User instead of Example.
    1) Open the Playground Wizard through Window > Particle Playground.
    2) Switch to List view.
    3) Press Convert to User on any preset you wish to instantiate.

    To instantiate a User preset you can use the code:
    Code (csharp):
    1.  
    2. PlaygroundC.InstantiatePreset("Playground Circle Shot (Script)");
    3.  
    This structure is because any User preset will be exported to your runtime and can be accessed from anywhere in your scripts. Example presets on the other hand is secluded to the Unity Editor only and will not be exported to your runtime.

    If this is a recurring action, you could make use of the SwitchCachedParticleSystemC example (found in the Examples/Example Scripts/Simple Scripts/ folder), where you cache a certain amount of instances set from a prefab and reuse them. The example also addresses how to position your particle system where in your case you may make use of OnCollisionEnter:

    Code (CSharp):
    1.  
    2. void OnCollisionEnter (Collision collision) {
    3.     EnableParticleSystem (collision.contacts[0].point);
    4. }
    5.  
     
    Last edited: Aug 19, 2014
  2. unitywlp

    unitywlp

    Joined:
    Jan 3, 2014
    Posts:
    146
    how to glow a object can you make a script?

    i tried to make changes but notting works
     
  3. unitywlp

    unitywlp

    Joined:
    Jan 3, 2014
    Posts:
    146
    and can you post update with obj can be used insted of the human skinned mesh
     
  4. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,255
    I'm just wondering how suitable this is for realistic particle effects like water, rain & snow?
     
  5. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Could you specify a bit what you want to do, what should the glow look and behave like? If you mean glow around objects I'd suggest using a shader such as http://forum.unity3d.com/threads/glow-effect-mobile-friendly.179143/ which would be more efficient than simulating and rendering out particles.

    I would like to say it's very suitable (perhaps some other user could chip in). As you have both the turbulence algorithms and event system you could set up a natural and dynamic behaving environment.
    Taking rain as example you could let turbulence simulate any gust, then check for collisions and connect an event to emit a splash particle at the colliding particle's position. I believe the mechanics are quite open for interpretation at this point.

    However, the particle effects tagging along the framework are drawn towards a bit cartoony and non-detailed look.
     
    derkoi likes this.
  6. derkoi

    derkoi

    Joined:
    Jul 3, 2012
    Posts:
    2,255
    Thanks for the reply Save, I'll look in to Particle Playground more after my holiday
     
  7. lionroot

    lionroot

    Joined:
    May 1, 2014
    Posts:
    8
    Hello,

    I'm trying to get my particles to just stay in place and move up and down, but not respawn. When they respawn, they snap out of place. Here's a video that shows it.

    Thanks!
    Bryan
     
  8. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hey Bryan!
    The video's gone MIA. :)
    Would it be possible in your case to set a very high lifetime to not make particles rebirth? If so, increase Playground Manager > Advanced > Editor Limits > Particle Lifetime which defaults to 100 seconds.

    Otherwise I could implement a method for exact positioning by a X, Y and Z AnimationCurve from source position origin - that would let you know exactly where the particle will be upon birth and death. Then by simulating the particle system in local space would make you able to move it freely. The problem with using any velocity parameters is that it's never exact in position. Let me see what I can do, would be a very nice addition either way.
     
    Last edited: Sep 9, 2014
  9. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Lifetime positioning is ready to go in next update. What it will do is to let you control the exact position over a particle's lifetime. The good thing is that you can keep the lifetime cycle short (to apply coloring cycles for instance), know where every particle will be and apply movement behaviors based on their Lifetime Sorting.

    This is what a particle system will behave like using Source: Transform, a small Overflow Offset of 100 particles, Lifetime Sorting: Linear and a Lifetime Positioning which moves on Y-axis (starts and ends at exact 0).


    Using other Lifetime Sortings and Sources you'll have a good opportunity to create some really neat effects. I'll try to cover this in a tutorial video soon.
     
    Play_Edu likes this.
  10. Jiraiya

    Jiraiya

    Joined:
    May 16, 2013
    Posts:
    12
    Hello,
    I imported particle playground2 in a fresh project, and get the following errors:

    Assets/Particle Playground/Scripts/Editor/PlaygroundInspectorC.cs(118,184): error CS0117: `PivotRotation' does not contain a definition for `Global'

    Assets/Particle Playground/Scripts/Editor/PlaygroundInspectorC.cs(118,88): error CS1502: The best overloaded method match for `UnityEditor.Handles.PositionHandle(UnityEngine.Vector3, UnityEngine.Quaternion)' has some invalid arguments

    Assets/Particle Playground/Scripts/Editor/PlaygroundInspectorC.cs(118,88): error CS1503: Argument `#2' cannot convert `object' expression to type `UnityEngine.Quaternion'

    Any ideas of how to address these?
    Thank you,
     
  11. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hi Jiraiya!
    This is much likely as previously, you probably have another plugin addressing same classes as in the UnityEditor class. Presumably the word Tools. Try putting the other plugin/script (if possible) within its own namespace, ex:

    Code (CSharp):
    1. namespace OtherPlugin {
    2.     public class OtherPluginClasses {}
    3. }
    Or try to rename it by search & replace. I'm not sure technically why other classes gets beat up in the chain but there's probably a logical explanation of script compilation order.

    Was this the case? Otherwise, which version of Unity are you using?
     
  12. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    I know a lot of you have waited for this tiny addition, finally made it in for next version. Sorry for the delay, working with lifetime has been a bit messy till now.
     
  13. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    And very soon you can visualize some advanced flows as well.
     
  14. lionroot

    lionroot

    Joined:
    May 1, 2014
    Posts:
    8
    That's perfect! Thanks for making this product again, it's alot of fun to learn and use. Any idea on release date for the update?
    -Bryan
     
    Last edited: Sep 11, 2014
  15. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Thanks, my pleasure! :) I'm just wrapping up for beta which will be running for two weeks (the alpha out at selected companies seems solid hence the short beta cycle), if there's no major hiccups release will be right after.
     
  16. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Hi Mike,

    I'm a total newbie to particles and the Unity particle system, but I bought your asset because I need help creating something:



    This is the card game project I'm working on (please ignore the weird thing going on at the far right). The cards are all in 2D, not 3D. You'll notice there's a highlight effect around the card in the center of the picture. Right now this highlight effect is NOT animated, it's literally just a static highlight. I want to replace it with a highlight effect that slightly moves, kind of like Hearthstone cards that are in the player's hand.

    Can you give me a high-level rundown of how I might achieve this?
     
  17. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hey Exeneva!
    I'm not sure who Mike is. ;-)
    On to the important stuff, as you have a predetermined flat shape I'd suggest to use State as Source along with a texture. The amount of pixels in the texture will determine how many source points will be created, any fully transparent pixels will be excluded (unless Playground Manager > Advanced > Build Zero Alpha Pixels is enabled).

    1) Create an image of 32x32 pixels (any non-power of 2 may create unwanted pixels when Unity scales the image at import). Paint out your source positions and leave the rest as transparent.

    Original file: http://www.polyfied.com/development/unity/playground/img/particleborder.png

    2) Save the image as PSD or PNG in your project. In the Unity's Importer Settings make sure Read/Write is enabled and that you don't filter or compress it, you could set it up like this:


    3) Create a new State in your particle system (Source > State > Create State), set your border image as Texture. You will also most likely want to scale it down as each pixel with scale 1 will be one unit, but all settings can also be edited after creation in the list of States. After hitting Create you should see your new State live in the Scene View. You can hit Set Particle Count in your unfolded new State to get the correct amount of particle per source point.


    4) In Particle Settings you may want to apply some Source Scatter to dissolve the original pixel structure. Increase Particle Count until you see the result you were after. This is how I setup mine:


    5) In the Forces tab you may want to set Only Source Positions to restrict particles to their distributed source points. Then in Rendering tab you can set Color Source to Lifetime Color (using Source will leave you restricted to the pixel colors in your State), then apply any Lifetime Coloring and set Material you'd like. Finally scale your State's transform to fit your card and you should see a result similar to this:


    Another option is to use Source > Paint and by hand paint your particle positions on a plane collider in the scene.
    In version 2.1 you'll also be able to set Sorting Layer and Order In Layer directly in the Rendering tab.
     
    Last edited: Sep 12, 2014
  18. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Whoops, I coulda swore I thought your name was Mike!

    This tutorial is amazing! Very impressed by this kind of customer support. I'll try this when I wake up tomorrow and let you know if I have any questions.
     
  19. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Haha, no worries. :) As soon as I get time I'll try to cover how more of the basic features correlate in a couple of videos. Sure thing! Welcome back with any questions you may have.
     
  20. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Hi save,

    How did you get the particles to be much bigger and voluminous?

    This is what I ended up with:



    I loved the tutorial, by the way. If you ever make a video series on your particle playground workflow (how to create custom particles from scratch), I think that would really help. Still, I've never made a particle based on a PNG like this, so this is really cool!
     
  21. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hi!
    That's a good start! I believe you may need to scale down the transform or set Source > The state > Scale value much lower. Depending on how the scale matches your card you may need to set particle Size and Source Scatter differently. Then the small pulsating effect is done by Lifetime Size with three keys: t0,v1 - t0.5,v2 - t1,v1 (time,value).
    Does it get you in the right direction?
     
  22. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    I think I've gotten it a bit closer to what I'm wanting:



    Is there any way to export this? I think I read somewhere there can only be one Playground Manager object per scene, but what if I want this Particle System to not be a child of the Playground Manager object and instead be attached to something else?
     
  23. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Great! Yes, a particle system is like any other GameObject, you can create prefabs of it and export it as a UnityPackage. The Playground also comes with some ready preset methods, which basically is its own structure of handling prefabs and displaying them with an icon in the Playground Wizard (Window > Particle Playground). From there you can create new presets and export them through the Preset Wizard. Step by step is explained in the Publish Guide on the official site. In this case you would publish to yourself, but you are also encouraged to put a price tag on your particle systems and distribute them.

    The Playground Manager is needed in the scene to simulate the particle systems and takes care of the Global Manipulators, it is not necessary to be parent of a particle system. Basically just move your particle system into any other parent you'd like. If you instantiate a particle system a Playground Manager will be created automatically if none exist on beforehand. Once you have a couple of minutes over there's a manual explaining the structure.
     
    hopeful and Exeneva like this.
  24. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    After trying it on my card, I'm a bit unsatisfied, mostly because the particles seem to all be moving, which is exactly what a particle system is intended to do.

    Take HS as an example:





    I dunno why, but I can't seem to get a similar outline effect like their green highlight. I know they're not using the Unity particle system (they imported After Effects into Unity using Scaleform). I wish I had a GIF showing what this highlight looks like, but I'm personally just not satisfied with my highlight, probably because I'm new to creating particles but am desiring something that looks awesome.Have you played HS, save? The game also has a ton of other cool particle effects too...
     
  25. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    If particles are moving it's because they have forces applied, by default a standard particle system has Initial Local Velocity and Gravity. Either you could zero out the velocities by value or choose to stick particles to their source positions by ticking Forces > Only Source Positions.

    I haven't played Hearthstone but watching a gameplay video, it's definitely a possible task for the Playground framework. Although it seems inefficient if you need to apply this effect to many objects on screen at once. I suppose it would only make sense if you have many different shapes, otherwise a pre-rendered particle effect on a sprite would be more efficient. As seen on the images you've provided they've reused the same material to batch for less drawcalls. This would automatically be the case for particles with the same material, but require a lot more CPU and GPU to achieve the same effect.

    I would have pre-rendered the outline especially if your target device is mobile, but used Playground to achieve other types of effects when you need precise control over their appearance or to apply turbulence. Hope it makes sense!

    An idea for a future update though, it would be quite nice with instancing to mirror particle effects, but apply new positions, rotations and scale by a separate transform. (Hmmm!) :)
     
    Last edited: Sep 13, 2014
    Exeneva likes this.
  26. schragnasher

    schragnasher

    Joined:
    Oct 7, 2012
    Posts:
    117
    Hello,

    Iv been working with PP but i have an oddity that i need to ask about. When using unity particles i can fire particles into the camera and things appear to fly past it. but using PP it seems the particles stick to the camera and then slide off in some direction. I know this sounds silly, but its just a explanation of the visual i see. I assume this is some artifact of how PP calculates things? Is there some way to alleviate this issue? I am firing circles into the camera and need to to appear as they are moving past the camera.
     
  27. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hi!
    Try setting Rendering > Max Particle Size to 1 instead of 0.5.
     
  28. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Things are moving forward, beta test will begin today where we'll work through the new features. Expect an interesting update soon with new gadgets and some performance improvements. :)

     
    hopeful likes this.
  29. erichart3d

    erichart3d

    Joined:
    Sep 19, 2014
    Posts:
    3
    Hello!

    Thanks for creating particle playground! We are currently using the tool in a professional environment and it's allowed us to create all sorts of really great effect very quickly. I particularly love using the state source for creating cool rune effects using a image as the source. Really cool stuff!

    I have one question I'm wondering if you could help us with. While creating a few different spell effects (fireballs, ice bolts, etc) I noticed that the emission rate isn't completely uniform. At first I thought it was related to the performance of my machine but after testing on another machine it doesn't seem to be the case. I think it's likely there is a setting i'm overlooking and wanted to see if you could point me in the right direction. One other thing to note is that we are on the Unity 5 beta which wouldn't surprise me if that was the issue.

    Here is an example:



    On the left is default shuriken where you can see the emission is even between each particle while on the right particle playgrounds seems to occasionally stutter. Any insight you have on this would be greatly appreciated!

    Edit: reading through documentation, seems like it could be related to sync threaded position..will update back! (update: doesn't seem like the case)


    Thanks :)
     
    Last edited: Sep 19, 2014
  30. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Thanks Eric I'm glad to hear!
    That's a good observation and question, I haven't noticed this previously but testing it out on Unity 4.3 I see the same results. Using any linear Lifetime Sorting there should be a consistent birth and death rate. I'll dig into this asap and try to find the cause, hopefully there's a quick fix around the corner.
     
  31. erichart3d

    erichart3d

    Joined:
    Sep 19, 2014
    Posts:
    3
    Thanks a bunch! It wasn't until we started creating trails for projectiles that it came to be noticeable. In the meantime we just use shuriken and trail renders in special cases where a constant rate is needed but it's a lot more fun to work in particle playground. Especially using turbulence!

    It's people like yourself that make Unity great!
     
  32. keenanwoodall

    keenanwoodall

    Joined:
    May 30, 2014
    Posts:
    597
    I swear to god, for the life of me, i can't access Particle Playground through javascript! I'm trying to make a simple flamethrower. When you press the mouse button, the emission rate is 1k, when you aren't pressing it is set to 0. I have no idea why it isn't recognizing it!
    Code (csharp):
    1.  
    2. var emission : int = 1000;
    3. private var particle : PlaygroundParticles;
    4.  
    5. function Start ()
    6. {
    7.     particle = GetComponent(PlaygroundParticles);
    8. }
    9.  
    10. function Update ()
    11. {
    12.     if(Input.GetMouseButton(0))
    13.         particle.emissionRate = emission;
    14.     else
    15.         particle.emissionRate = 0.0;
    16. }
     
  33. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    I understand, it really should be consistent but I have a hunch there's a couple of factors making the emission offset. I'll update once I find the cause(s). Hey thanks a bunch for the encouraging words! 2.1 you'll have turbulence inside a manipulator as well, makes it a bit more dynamic with the manipulator's distance- and smoothing effect.

    Using 2.0 or later you need to run Particle Playground as a plugin if you want to script towards it using another language than C#. Create a folder called Plugins in your project folder then move PlaygroundC.cs and PlaygroundParticlesC.cs into it. Then make sure you import the namespace ParticlePlayground into your script.

    It sounds like you could start and stop emission instead (altering emission rate will iterate through the Playground Cache to flag particles). Here's an alternative version if you want to try that out:

    Code (JavaScript):
    1. #pragma strict
    2.  
    3. import ParticlePlayground;
    4.  
    5. private var particle : PlaygroundParticlesC;
    6. function Start ()
    7. {
    8.     particle = GetComponent(PlaygroundParticlesC);
    9. }
    10. function Update ()
    11. {
    12.     particle.emit = Input.GetMouseButton(0);
    13. }
    Does that work for you?
     
  34. Dave_Voyles

    Dave_Voyles

    Joined:
    Feb 7, 2014
    Posts:
    32
    How do I turn off particles when they go off the screen? For example, I'd like to deactivate them with this function:


    private void OnBecameInvisible()

    {

    transform.gameObject.SetActive(false);

    }




    Sorry for the formatting -- I don't see an option to insert code snippets here.
     
  35. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    All you need is to enable Advanced > Auto-Pause Calculation on that particle system. The function will disable calculation as soon as no camera renders it (including any Editor cameras).

    That's alright, you can format code with the Insert button (next to the floppy disk).
     
  36. Dave_Voyles

    Dave_Voyles

    Joined:
    Feb 7, 2014
    Posts:
    32
    Hmmm, let me give that a try.

    My goal is to disable it, as I have a particle system attached to my pickup, and when it is touched, the object itself is thrown back into the pool, but the particle playground remains running. This should do the trick.

    Aweeeeesome particle system by the way. I showed it off to some of my work teammates last week, and they were blown away at the performance.
     
  37. Dave_Voyles

    Dave_Voyles

    Joined:
    Feb 7, 2014
    Posts:
    32
    Is it definitely under Advanced? I'm looking now, but I don't see an option for it.
     

    Attached Files:

  38. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    I understand, you could always disable the GameObject the particle system is attached to as well for the same effect. Thanks I'm glad to hear!

    Oh sorry, the Auto-Pause calculation was introduced in version 2.01. If you update your Playground you'll have even better performance where it takes advantage of multicore processors. You could have a look in the version history doc if you'd like to see what else has been added since 1.20.

    Upon updating from your version, here are some notes to consider:
    2.1 release is looking good for tomorrow, if you'd want to hold your horses for that. :)
     
    hopeful likes this.
  39. clinton-reddie

    clinton-reddie

    Joined:
    Mar 20, 2013
    Posts:
    18
    Hello,

    Months ago I asked a question about manipulating manipulators and you wrote me this great script (manipulatorSwitchLocal.js):

    Code (JavaScript):
    1. #pragma strict
    2.     var particles : PlaygroundParticles;            // Assign your particle system in Inspector
    3.     var manipulatorNumber : int;                    // The manipulator you want to control
    4.     var transformObj: GameObject;
    5.     private var manipulator : ManipulatorObject;
    6.     function Start ()
    7.  
    8.     {
    9.      
    10.         // If particles are null, assume that you've put the script on the Particle Playground System
    11.         if (particles==null)
    12.             particles = GetComponent(PlaygroundParticles);
    13.      
    14.         // Grab a reference to the specified manipulator
    15.         manipulator = Playground.GetManipulator(manipulatorNumber, particles);
    16.      
    17.         ////assign a transform at runtime by finding game object with specific name.
    18.  
    19.         manipulator.transform = transformObj.transform;
    20.      
    21.         // As an example - disable the manipulator
    22.         manipulator.enabled = false;
    23.     }
    24.  
    25.     function On    ()
    26.  
    27.     {
    28.  
    29.     manipulator.transform = transformObj.transform;
    30.  
    31.     manipulator.enabled = true;
    32.  
    33.     }
    34.  
    35.     function Off ()
    36.  
    37.     {
    38.  
    39.     manipulator.enabled = false;
    40.  
    41.     }

    My problem is now, after I updated to the newest version, this script no longer works. These errors appear:
    1. Assets/Particle Playground/Scripts/manipulatorSwitchLocal.js(2,21): BCE0018: The name 'PlaygroundParticles' does not denote a valid type ('not found').
    2. Assets/Particle Playground/Scripts/manipulatorSwitchLocal.js(5,31): BCE0018: The name 'ManipulatorObject' does not denote a valid type ('not found').

    Will you please help me again?
     
  40. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hi!
    Yes of course. Using a version prior to 2.0 and using UnityScript you need to put the PlaygroundC.cs and PlaygroundParticles.cs (found in Particle Playground/Scripts/) in a folder called Plugins.

    When scripting towards the Playground make sure you import the namespace ParticlePlayground. The naming convention for the Playground is PlaygroundC and Manipulators are called ManipulatorObjectC.
    Manipulators also got a wrapper class to handle their transform in the multithreaded environment, which - a bit unintuitive - is reached through manipulator.transform.transform (where first transform is the wrapper with extensive functionality and the later is the Unity component Transform).

    This means you could write your script like this:
    Code (JavaScript):
    1. #pragma strict
    2.  
    3. import ParticlePlayground;
    4.  
    5. var particles : PlaygroundParticlesC;            // Assign your particle system in Inspector
    6. var manipulatorNumber : int;                    // The manipulator you want to control
    7. var transformObj: GameObject;
    8. private var manipulator : ManipulatorObjectC;
    9.  
    10. function Start ()
    11. {
    12.     // If particles are null, assume that you've put the script on the Particle Playground System
    13.     if (particles==null)
    14.         particles = GetComponent(PlaygroundParticlesC);
    15.  
    16.     // Grab a reference to the specified manipulator
    17.     manipulator = PlaygroundC.GetManipulator(manipulatorNumber, particles);
    18.  
    19.     ////assign a transform at runtime by finding game object with specific name.
    20.  
    21.     manipulator.transform.transform = transformObj.transform;
    22.  
    23.     // As an example - disable the manipulator
    24.     manipulator.enabled = false;
    25. }
    26.  
    27. function On    ()
    28. {
    29.     manipulator.transform.transform = transformObj.transform;
    30.     manipulator.enabled = true;
    31. }
    32.  
    33. function Off ()
    34. {
    35.     manipulator.enabled = false;
    36. }
     
  41. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
  42. erichart3d

    erichart3d

    Joined:
    Sep 19, 2014
    Posts:
    3
    Awesome! Looking forward to checking it out, sounds like some awesome stuff. :)
     
  43. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    It's a lot of frequently requested features finally added. Was a good production cycle. :) Have fun!
     
  44. clinton-reddie

    clinton-reddie

    Joined:
    Mar 20, 2013
    Posts:
    18
    Thanks so much for your quick and insightful reply, it's truly appreciated. But now I get this error (using version 2.0):

    Assets/Particle Playground/Scripts/manipulatorSwitchLocal.js(3,8): BCE0021: Namespace 'ParticlePlayground' not found, maybe you forgot to add an assembly reference?
     
    IanStanbridge likes this.
  45. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Did you put the PlaygroundC.cs and PlaygroundParticlesC.cs in a folder called "Plugins" (and that that folder isn't in any Editor folder)?
     
  46. clinton-reddie

    clinton-reddie

    Joined:
    Mar 20, 2013
    Posts:
    18
    I made the Plugins folder within the Particle Playground folder, it didn't work, but then I moved it outside and now it does. Thanks again for the great asset and customer support.
     
  47. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Great you got it running! It's the least I could do considering I've rewritten it with a new language. :) Make some awesome stuff and feel free to ask whenever you need something.
     
  48. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    Just curious, how might you make something like the blue beam here?

     
  49. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    It looks like one or several trails is being used and not particles (it's a bit difficult to determine from the image), but for an effect where particles are moving along a curve you have a couple of options, depending on the desired behavior of the beam.

    Manipulators:
    #1)
    The Attractor Manipulator will draw particles toward its centre over time, altering the particles velocity.
    #2) The Property Target Manipulator with transition targeting towards a transform (several if you want the beam to split up). Any Target Manipulator will move particles with Vector3.Lerp and disregard their velocity where Zero Velocity Strength will be the factor of how quickly the forces are dampened to 0. This by itself can create a natural arc movement.

    Adding a bit of Simplex Turbulence you'll get a more natural and branched flow (note that this is a quickly setup example):


    Lifetime Position:
    #3)
    In version 2.1 Lifetime Positioning is introduced. This enables particles to move along Animation Curves in X, Y and Z based on their current lifetime. These curves can be altered through script as well if you'd want dynamic movement, see the example scene Lifetime Positioning - Dynamic for script example (will draw particles from clicked position to current mouse position). Positioning particles over their lifetime will make forces unable to apply, in return you'll have exact control over where they'll be in world space over time.

    Here's an example:

    As you can see this behaves much more confined as particle movement is strictly bound to the Animation Curves. Then by just multiplying the curve repeater you can quickly setup patterns without having to edit the curves:



    Other:

    You could also use a State which distribute source positions from pixels in an image or vertices in a mesh over an arc. That would mean you will have particles birthing along the shape which opens up for some additional behaviors where you can move them freely based from the shape of the beam. This doesn't apply to your request but just to show the versatility of such behavior here's an example of drawing particles from an arc moving them towards a Gravity Manipulator combined with turbulence:

    Where source looks like this:


    If you want a thicker distribution of particles you could use Source Scatter to widen the beam, and by simulating the particle system in Local Space it'll take the source rotation into account. Then by using stretched rendering you'll get more of lines instead of dots moving along the beam.


    I'm currently working on a series of video tutorials and this is a perfect topic, I'll cover this with how the settings correlate. I think Lifetime Positioning could evolve with having some type of branch behavior as well (and possibly turbulence injection). I'm also looking into having splines as source so you won't be restricted to pixels/vertices in creating more interesting birth positions. Let's see what I can do in a future update.

    Hope this is to some help, or at least inspiration, I'll let you know when the video tutorial is available covering this. :)
     
    Exeneva likes this.
  50. Exeneva

    Exeneva

    Joined:
    Dec 7, 2013
    Posts:
    432
    What's the difference between a trail and a particle?