Search Unity

Particle Playground

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

  1. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hi! Thanks Spunky!

    You can cast/receive shadows if you enable that onto the Shuriken component, I'll lift that up into the Rendering tab in next version. Enable the Shuriken component's visibility through Playground Manager > Advanced > Show Shuriken.
    As you say you'll need a shader which uses the pass shadowcaster, then if you want to pass in the vertex color of each particle you need to bind it so you can use the set Lifetime Color. Forgive me I'm terrible at shaders but this should give you a result of lifetime colored particles which is casting shadows:
    Code (CSharp):
    1. Shader "Playground/Emissive With Shadows" {
    2.     SubShader {
    3.         Lighting On
    4.         ColorMaterial Emission
    5.         Zwrite On
    6.      
    7.         BindChannels {
    8.             Bind "Color", color
    9.             Bind "Vertex", vertex
    10.             Bind "Normal", normal
    11.         }
    12.      
    13.         Pass {}
    14.        
    15.         UsePass "VertexLit/SHADOWCASTER"
    16.     }
    17. }
    Which would give this result (using the Matrix Cube),


    There's probably (or should I say, no doubt) better and more flexible particle shaders to find elsewhere, or creating with Shader Forge for instance. :)
     
    Last edited: Nov 5, 2014
  2. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Have to promote this project stumbled upon on Twitter, adorable and brilliant use of Playground! Hope to see more unicorns in a near future. :)
     
  3. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
  4. ZJP

    ZJP

    Joined:
    Jan 22, 2010
    Posts:
    2,649
    Woo. Very like the 'disintegration effect' starting at 0:34.
    PP is very a good tool. :cool:
     
  5. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Agree, nice way of using it. :)
    So much good feedback these last couple of days during the sale, the upcoming features list is turning out loooong.
     
  6. NateJC

    NateJC

    Joined:
    Apr 10, 2012
    Posts:
    58
    I just purchased Particle Playground 2 today. A motivator for the purchase was the concept of being able to "publish" your particle presets. I assumed there would be a place to browse other people's published presets. But I can't seem to find it, or maybe I'm just missing it..?
     
  7. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    That was my original intention, but so far I'm not aware of any published presets (only where it has been used in addition to other types of assets). I think there's a better chance this could take off soon as the user base is growing, and once I get more time I'll start creating a couple of packs as well.
    I would love to feature particle packages inside the tool and on the website, any effect you create for your project could potentially be sold on the Asset Store for instance. So my only thought is I'm not mediating this the right way yet, perhaps we need a template for what that could look like and some confined guidelines - I'm open for suggestions!
     
  8. Unity_BO

    Unity_BO

    Joined:
    Feb 15, 2014
    Posts:
    5
    Hi! Is it possible to let the particles follow a predefined spline with this plugin?
     
  9. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hey! Hopefully soon, that is on the roadmap. What I hope to make possible is using splines as a source for particle birth, for manipulator targeting and for moving over time. Currently you can move particles over their lifetime using animation curves, but that is limited to editing the X, Y and Z positions using the curves only. Although it enables to make some interesting (or weird) effects. :)


     
  10. Unity_BO

    Unity_BO

    Joined:
    Feb 15, 2014
    Posts:
    5
    i see... thanks for your answer! unfortunately this is not what i need. i have to make a fire and smoke-simulation, where the smoke has to develop in a predefined way....
     
  11. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    I understand! Although what you may be interested in is vector fields, which also should be available soon.
     
    Last edited: Nov 7, 2014
  12. IanStanbridge

    IanStanbridge

    Joined:
    Aug 26, 2013
    Posts:
    334
    Unity_BO you probably want to use the Particle Dynamic Magic asset for particle splines and fire as it has those features. You can also use it in combination with Particle Playground as it can manipulate gameobjects as well as particles so you can use it to move or emit particle playground systems and manipulators.
     
  13. Quickfingers

    Quickfingers

    Joined:
    Aug 29, 2009
    Posts:
    268
    really looking forward to vector fields, so a massive +1 for that feature!

    Just one quick question, is there a way to mimic the behaviour from normal shrunken when you use pre-warm? Basically I want a particle system that ALWAYS has a fixed number of particles (i.e. it starts with 1,000, when 1 dies, 1 spawns (or close enough :) ). I tried overriding the emission rate to a crazy high number but it still forces the system to build up over the course of the set lifetime.
     
  14. NateJC

    NateJC

    Joined:
    Apr 10, 2012
    Posts:
    58
    It almost feels like "publishing" particles right now sends them off into a black abyss where we don't know what happens with them. More people might be into publishing if there was a "User Gallery" button (or "Explore", etc). This could be a place where you could rapidly examine other people's creations, and "thumbs up" your favorite ones. Let the publisher specify keyword tags to make it easier for others to search and find them. Searching through the huge base of particles is one of the main reasons I like Particle Designer 2 so much. Also, you say "feel free to turn your particles into money using the Preset Wizard to prepare your particle system(s) for publishing." I don't know exactly what your plan is with this, but my recommendation would be to drop this concept and instead just make it free to share and use other people's creations, just like Particle Designer 2 does. This is a win for you as it will mean more money in your pocket since your product will become more attractive with a larger base of presets and community contributions. It's also a win for users since we get more to work with when we purchase your product. win/win :)

    Finally, there should be an easier way to rapidly view the presets, without it adding particle game objects all stacked on top of each other within the Scene. I noticed there is an "Example" button, but it doesn't seem to do anything. Perhaps when clicking that button, it does add the particle system to the stage, but marks it as "Example", and the next one you click, removes all previous "Examples" from the scene.

    Anyway, just some thoughts from a new comer to your product. Thanks!
     
    Last edited: Nov 7, 2014
  15. Quickfingers

    Quickfingers

    Joined:
    Aug 29, 2009
    Posts:
    268
    Another question here: I'm trying to get particles spawning on a mesh created in code. It works the first time, but then when I update the vertices I can't get it to refresh the point list. Is there a way I can either
    A: Specify a point list without a mesh/transform? Just hack into the point array manually?
    B: Get the source to refresh the point list when the mesh has changed?

    I managed to work around the problem by using a state as the source instead of a world object. This let me call state.Initialize() after I have modified the mesh. However, I couldn't get a particle system using a state to respond to global manipulators in the scene? Is this perhaps a bug?

    Many thanks
     
  16. AllanMSmith

    AllanMSmith

    Joined:
    Oct 2, 2012
    Posts:
    180
    Hey,

    I am currently looking for a GFX creation tool and stumbled upon Particle Playground. It seems very nice but I've got a few questions, if you don't mind.

    I used another solution for some time, which allowed me to work with meshes, UV animations, very flexible scripts which made it pretty easy to achieve awesome results, however, the problem with that solution is that apparently it is not possible to pool the particles and reuse them easily, and also it seems to be a bit slow in performance overall.

    However, I find it that working with meshes really makes a difference, there are things a lot easier using meshes then making a particle system that emits meshes, which seem to be what your solution does. So the question is, is there an easier way with your solution to handle meshes than only using particle systems?

    Thanks,
    Allan
     
  17. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hey Quickfingers!
    The system has the layout you're mentioning, but I probably don't get the full picture of the end result you're looking for. When a particle dies, the birth of that particle will be immediate (same particle is reused in the ParticleCache and PlaygroundCache). What could offset the immediate rebirth is if you're using a Lifetime of Random Between Two Values. Visually you may experience that particles are all over the place randomly, using Source Scatter (random positioning on rebirth can be disabled in Advanced > Rebirth Options) or by a scrambled Lifetime Sorting.

    Having particles alive at exact positions from the beginning you could create a Snapshot and use Load From Start.
    I'm looking into having a pre-warming feature for upcoming release though, it would be great to have considering there could be any random manipulator out there where you would want to have particles alive from first frame.

    Did this answer your question, sort of? :) Would be nice to get a more visual example in case not!

    Hey, thanks for superb feedback!
    Yes I agree, it's a shot in the dark as it is now. The basic idea is I wanted to mediate that you can use your created particle system and distribute it in any way you'd like where only the core of the framework tags along. My hopes were also that it could possibly turn into a way of distributing your content through the Playground, when the user base was large enough which I believe it may have become today. To be honest I never liked how it came across, I suppose this is what happens when a developer stands without a copywriter and far too much else on the agenda haha. :)
    I love the idea of having a user contributed particle gallery where any particle effect is free to use for any Playground owner. Let me think about that (and do some legal research), because the implementation of it could possible be made quite simple through the tool and a database.

    Ah great, let me see what I can do about previewing presets. Perhaps there's a way of using a mouse-hover preview, there's a lot of fun stuff which can be made with a hidden scene camera.
    I really appreciate this type of input, it's absolutely great to improve upon!

    A World Object is prepared for being procedurally computed, but you need to toggle the vertex update onto the particle system (worldObjectUpdateVertices), here's an example:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using ParticlePlayground;
    4.  
    5. public class ProceduralSourceMesh : MonoBehaviour {
    6.  
    7.     public GameObject proceduralMeshGameObject;
    8.     public PlaygroundParticlesC particles;
    9.  
    10.     Mesh proceduralMesh;
    11.     Vector3[] vertices;
    12.     Vector3[] normals;
    13.  
    14.     void Start () {
    15.  
    16.         // Create an isosphere (using the IsoSphere class from the Procedural Mesh Target example)
    17.         IsoSphere.CreateMesh(proceduralMeshGameObject, 4, 2f, false);
    18.  
    19.         // Get the mesh & normals
    20.         proceduralMesh = proceduralMeshGameObject.GetComponent<MeshFilter>().sharedMesh;
    21.         normals = proceduralMesh.normals;
    22.  
    23.         // Setup the particle system
    24.         particles.source = SOURCEC.WorldObject;                            // Make sure we use World Object as Source
    25.         particles.worldObject.gameObject = proceduralMeshGameObject;    // Set the procedural GameObject as Source
    26.         particles.worldObjectUpdateVertices = true;                        // Enable procedural update
    27.         particles.particleCount = proceduralMesh.vertexCount;            // Set particle count to the amount of vertices
    28.         particles.onlySourcePositioning = true;                            // Set particles to only follow their source position
    29.     }
    30.    
    31.     void Update () {
    32.         vertices = proceduralMesh.vertices;
    33.         for (int i = 0; i<vertices.Length; i++) {
    34.             vertices[i] += normals[i]*(Mathf.PerlinNoise(vertices[i].x, vertices[i].y))*(Mathf.Sin(Time.time*3f)*.05f);
    35.         }
    36.         proceduralMesh.vertices = vertices;
    37.     }
    38. }
    39.  
    Which should result in something weird like this:


    Testing out a global manipulator onto a state, but it works here, I'm not sure what could have happened along the way but the states are not yet prepared for any procedural changes throughout the framework. I'm looking into that so we can use atlases for source texture animation etc. Might have been what caused them to fail? :)

    Hope it helps, otherwise keep shooting questions!

    Hi!
    The particles and their settings are stored in different built-in arrays where everything is reused. Playground is computed on the CPU in a multithreaded environment, but unfortunately not on the GPU, so there will naturally always be a lack of performance there. This might change in the future though where more calculation options can become available through some sort of aggregation, depending on what Unity makes technically available (and what I can try to make of it).
    There's the possibility of structuring source (or birth) positions from meshes and you can render meshes instead of particles. It lives on top of the Shuriken component (basically makes it into a zombie) and adds features which makes it a bit quicker to get particles to behave the way you want. Hope it makes sense!
     
  18. JakeTBear

    JakeTBear

    Joined:
    Feb 15, 2014
    Posts:
    123
    Hello save,

    I bought your asset the moment it came out knowing it was going to be very useful at some point for my development, its been a while and I decided to finally give it a go.

    The first time I opened I couldnt really get much done due to the fact I wasnt familiar with the tool nor I had the need to really use it, the second time around (now) I finally wanted to get something done, I used one of the presets and started playing.

    There are 2 big things for me, one is ease of use, and two is performance, since I like to script everything I can I wanted to create particles in code, this was fairly easy using the PlaygroundParticlesC.Emit function, I created my own "Emitter" and started playing. what I really like about PP is that I dont have to create multiple particle systems, I love the fact I can create a wrapper atlas on top of the PlaygroundC and access the systems through an ID and simply cache them. I then went to the profiler and everything looked just fantastic, I havent dig into the code that much but the performance was just great!

    Then I noticed something odd, if I emit manually way too many particles it will start killing the older ones and reusing them, I know this is intended, but the odd thing was that the new reborn particle had its old values, so if the particle started very small and ended up huge, it will rebirth very huge for a frame (very noticeable) and then go to the intended initial values, I thought that maybe if I gave the max particles the max possible number allowed (100,000) this would be avoided, and indeed it was, but then I turned into the performance once again and it seems that this number matters even if you are only using 3k of the particles. Bummer really.

    The other thing I noticed is that I cant possibly use "Animated" particles, or that is not natively supported, only have access to billboards and meshes, are you planning on adding support for such feature?

    I would also like to know if you are planning on giving more controls to the Emit function, as it stands it is fantastic, but I would like to also have control over other things such as opacity, size, even the material of that particular particle (dont know how much work would that actually be).

    Thanks for reading, really looking forward to hear if you have a solution to the rebirth problem because I would really like to use PP :)
     
  19. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hey Jake,

    Thanks for the detailed feedback! Which version of Playground are you using?

    Scripted emission performance
    From version 2.12 there's an active check for the particles where it will skip any non-simulated. Once the particle system has zero active it will go into hibernation until any emission calls are done. While simulating any particles it will step through each to check if it's active, if it isn't the loop will continue to the next. So for instance having 100k will be heavier than having 10k particles as the routine will want to check what to do with each particle. This is the negative side of having everything in built-in arrays. But would we have everything in a dynamic list it would produce far too much GC allocations on particle birth/death, especially when we don't have a predetermined amount of particles (such as the scripted source mode).

    Texture Sheet Animation
    By enabling the Shuriken component (Playground Manager > Advanced > Show Shuriken) you can use Texture Sheet Animation. I'd love to have it exposed in the Inspector but its members with the Particle System Curves control is not accessible to external scripts. (Perhaps by doing some really deep digging into the Shuriken as a SerializedObject, that would be great but I haven't had the time to check it out yet.)

    Rebirth script size
    Let me see what I can do about the size issue, this may be due to the multithreading layout where a rebirth call will reposition but set sizes asynchronously. We could probably see this as a bug, I'll have a look at what's going on till next update.

    More emission features
    Yes, looking into more emission possibilities where you'll have more control. I had to narrow it down a bit when I did the complete 2.0 overhaul and from then focus has been on a lot of features but little on the scripted mode. I'd like to add a TransformPoint reposition possibility as well, so you could Emit() as if the the particles were created by a World Object over their lifetime.

    Different materials
    Making particles have different materials within the same system isn't possible in Shuriken, but you could fake this for billboarded particles having an atlas using a Texture Sheet Animation which starts on a random row using Animation: Single Row.
     
    Last edited: Nov 10, 2014
  20. bitbutter

    bitbutter

    Joined:
    Jul 19, 2012
    Posts:
    60
    Hello. Trying to get a grip on how particle playground works. The first thing i'm trying to do is to replicate the way I usually use Particle systems in Unity: Typically I would add a particle system to game objects nested in a prefab e.g. an enemy ship which left a trail of particles as it moved, and bursts of particles each time it fired a bullet or exploded. This ship prefab would have three particle system components in total attached to its child objects. When emitting particles from these systems, because of their positioning in the prefab, they'd automatically have the correct orientation.

    With Particle playground it's not clear to me if I should be nesting Particle Playground's ParticleSystems in game objects in the same way, or if i should be leaving them nested under the manager object (where they're created by default). If I should be leaving them under the manager object, it's not clear to me how to correctly have (e.g) 'Particle System A' emit a burst of particles from the front of an alien ship in the scene.

    Any pointers would be very helpful for me here. Thanks in advance!
     
    Last edited: Nov 10, 2014
  21. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hi!
    You can have any hierarchical layout. The only thing that matters is you have a Playground Manager within the scene, if there shouldn't be one existing when you instantiate a particle system prefab one will automatically be created. Particle systems will by default be parented to the Playground Manager if they have no parent and if Playground Manager > Advanced > Group Automatically is enabled.
    I'm starting to think this "feature" adds more confusion than it does any good, perhaps Group Automatically should be disabled by default.
    Hope it helps!
     
  22. bitbutter

    bitbutter

    Joined:
    Jul 19, 2012
    Posts:
    60
    Ah, that's helpful. Thanks. Disabled by default would have made it easier for me to understand.

    Another quick question: When triggering emission from a particle system through code, is there any way to Emit multiple particles without also having to specify color and velocity (to just use these values as they have been set up in the inspector for the particle system)?

    Thanks also for the fast reply!
     
  23. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Ok great! No sorry, currently you'd have to pass that info in. I'll make a couple of more options available soon, both simpler and more advanced.
     
  24. bitbutter

    bitbutter

    Joined:
    Jul 19, 2012
    Posts:
    60
    Ok that's clear. When sending an Emit command by code, how exactly does the colour argument affect the particles? It seems not to be having any effect in the tests I'm doing. Does the Particle System need to be set up in a particular way for the color argument to have a visible effect? (thanks for helping out with all these questions!).
     
  25. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    That's alright! It will inherit the color as long as the particle system's Color Source is set to Source (Rendering > Color Source: Source). This goes for any of the sources which can supply color information for the particles (Script, State, Paint and Projection).
     
  26. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    524
    @save:
    1) Bug Report:
    if "Optimize Game Objects" is checked to import an Mecanim humanoid .FBX, then ParticlePlayground.SkinnedWorldObject.boneMatrices.Length is 0, and ParticlePlayground.SkinnedWorldObject.Update() crashes.
    I guess the solution is to display a warning in such case and advice the user to uncheck "Optimize Game Objects" ..?

    EDIT: it's about assigning a skinned mesh as source of emission

    EDIT2:
    2) another problem : the Playground Manager tells me there's an update available in the Asset Store, but the Asset manager doesn't show the "update" button.

    3) I'd like to attach a Playground script to my model and make the whole thing a prefab, so everything would get instancied by gameobject.Instantiate() but it seems it's not possible, right ? (bad stuff happens when I copy an existing Playground component and paste it to my existing gameobject, forcing me to restart Unity to make the Playground Manager wizard works again)

    EDIT3: (yup, that's a lot of edit :p)
    Ok, I found out how to do 3) ... I have to copy my model under the PS I want to use in the PM list, after deleting the 1st model ; which breaks things again, and requires me to restart Unity to go on
    Steps : Create "Burning Robot" with Wizard, delete "Robot Kyle" & "Robot 2" under the PS, then child my own model's gameobject to "Burning Robot", then do the connection for the skinmesh emitter to my own model, then restart Unity to stop the error mesages.
     
    Last edited: Nov 11, 2014
  27. gonzorob

    gonzorob

    Joined:
    Dec 1, 2011
    Posts:
    96
    Hi,

    Quick question: Is it possible for a particle to randomly pick from an array of textures? I dont really fancy creating 20+ particle managers to achieve the effect :)
     
  28. CarbonConcept

    CarbonConcept

    Joined:
    Sep 2, 2014
    Posts:
    11
    Great work, PP2 is quite complex and versatile system now so maybe you should make some VIDEO TUTORIALS so we can jump start using it. Its complex system man and there is nothing better then quick 10min tutorials explaining the basics and some tricks.
     
  29. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hey, thanks for bringing it in!

    1)
    There's definitely a missing check for boneMatrices length. I'm not sure why there would ever be zero bones though (but perhaps this is set a frame after Initialize() is run on the SkinnedWorldObject if Optimize Game Objects are used - which seems a tad weird). What you could try is making sure the bones are existing before initializing by doing this on line 2905 in PlaygroundC.cs:
    Code (CSharp):
    1. if (boneMatrices.Length>0) {
    2.     initialized = true;
    3.     Update();
    4. }
    until I've been able to have a closer look into it.

    2) Which version of Playground are you on? Latest is 2.14. In case you're on an older version the issue is on the Asset Store side, have a look at http://unity3d.com/asset-store/help (Assets I have purchased do not update).

    3) This is most likely connected to issue #1. In general, a particle system is handled as any GameObject and can be instantiated by any method from your project. The easiest way about is to create a new Particle Playground system, attach your skinned mesh as source, parent either one to the other and drag it over to your Project View. Keep in mind the Playground Manager never should be tagging along a prefab.

    Would you be able to send an example of your project with the mesh you're working with to support@polyfied.com? That would help in trying to figure out your current layout and what seems to be the issue in working with the mesh.

    Hi!
    For a particle system it is, by assigning a material from an array onto pp.particleSystemRenderer.material. For a single particle within the same system it isn't (one texture per particle system). Perhaps there's some other way of attacking the problem, what exactly are you looking to do?

    Thanks CarbonConcept! I hear you, I'm currently working on this (before doing any framework updates), so it's next up as soon as possible. The first video should be available next week. :)
     
    chiapet1021 likes this.
  30. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Are there any Windows 8 app users of PP who has tested on device yet? No issues are reported to support but I'd like to make sure how we're doing with the current multithreading approach.
     
  31. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    524
    @save:
    1) You can try this with Robot Kyle bundled with PP.
    Steps:
    - instantiate Burning Robot with the Wizard
    - set "Optimize Game Objects" for Robot Kyle
    - delete "Robot Kyle" & "Robot 2" under Burning Robot
    - drag & drop Robot Kyle under Burning Robot
    - drag & drop Robot2 to Skinned World Mesh in Burning Robot

    Your fix avoid the error messages, but then nothing is initialized so all particles spawn from the same point, so it's not much better... :D

    2) In my Asset Store list, it's "v2.14" ; I forgot to tell in my previous message that I had updated PP after had seen the update notice in the Wizard... And I just checked more now and it seems the import done after the download wasn't correct (maybe it had imported the previous version again?), anyway now I imported again and the notice doesn't appear anymore ! It doesn't change the problem in "1)" though.
    I also get a new error message in the way :
    Code (CSharp):
    1. NullReferenceException: Object reference not set to an instance of an object
    2. ParticlePlayground.Vector3AnimationCurveC.HasKeys () (at Assets/Particle Playground/Scripts/PlaygroundC.cs:2669)
    3. PlaygroundParticleSystemInspectorC.SetMissingKeys () (at Assets/Particle Playground/Scripts/Editor/PlaygroundParticleSystemInspectorC.cs:377)
    4. PlaygroundParticleSystemInspectorC.OnEnable () (at Assets/Particle Playground/Scripts/Editor/PlaygroundParticleSystemInspectorC.cs:366)
    And it doesn't change "3)" either.

    3) It's another error than in #1 and it happens even when "Optimize Game Objects" isn't set, so I don't think it's related and it's unlikely depending of the model as I just reproduced it with Robot Kyle
    The error message is :
    Code (CSharp):
    1. MissingReferenceException: The object of type 'Transform' has been destroyed but you are still trying to access it.
    2. Your script should either check if it is null or you should not destroy the object.
    3. UnityEngine.Transform.get_localToWorldMatrix () (at C:/BuildAgent/work/d63dfc6385190b60/artifacts/EditorGenerated/UnityEngineTransform.cs:140)
    4. ParticlePlayground.SkinnedWorldObject.BoneUpdate () (at Assets/Particle Playground/Scripts/PlaygroundC.cs:2936)
    5. ParticlePlayground.PlaygroundParticlesC.PrepareThreadedCalculations () (at Assets/Particle Playground/Scripts/PlaygroundParticlesC.cs:2312)
    6. ParticlePlayground.PlaygroundC.Update () (at Assets/Particle Playground/Scripts/PlaygroundC.cs:1394)
     
  32. gonzorob

    gonzorob

    Joined:
    Dec 1, 2011
    Posts:
    96
    I wanted to have (random) numbers stream towards another player. Was thinking of using one texture per character. Any ideas on a sensible approach?
     
  33. AllanMSmith

    AllanMSmith

    Joined:
    Oct 2, 2012
    Posts:
    180
    Hey, thanks for the previous answer, but got another one thinking about it. Using your plugin, is it possible to scale particles based on the transform? Reason I am asking is that while the player progress through my game, the main character gets bigger (considerably bigger) and I cannot use the same particles in the beginning and the end of the game, because the size difference is almost 4 times bigger... so if I could just adjust the particle system size to be 4x bigges as well and it "just worked"... that would come in handy lol... is there something of the sort in your system?

    Thanks for the attention,
    Best,
    Allan
     
  34. kebrus

    kebrus

    Joined:
    Oct 10, 2011
    Posts:
    415
    Hi, i just sent you a support email about an issue I'm having, only after it i noticed the support forum button so sorry for the spam.

    Anyway, I'm trying to create a semi-complex effect where some particles start to play after another, at first i tried using the birth offset but i really don't get it what it does, it delays but also alters the result, it's just too finicky. Then i started using events to make them play later, but then i noticed that my sprite sheet doesn't play anymore.

    1. How do properly delay a particle system without using a script?
    2. How can I play an animation from a particle system that starts from an event?

    cheers
     
  35. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    1) Thanks that's great to have steps to reproduce, let me see what could be the cause and fix in the next update. Haha oh sorry, you would need to initialize the skinned world object by yourself afterwards, but I think the issue is deeper nested than that actually based on your reply. I'll get back with info as soon as I've been able to track the issue down.

    2) I'm not sure how the asset updates are taken care of internally on the Unity side, all my solution does is to check a string in a php document on my server and compare it to the version number in the PlaygroundC.cs. If it fails to check then no message should appear and only be visible when you actually have a lower version number in PlaygroundC. Alright thanks for error report! There's a null check missing. - Fixing!

    3) Gotchya! I'll step that trough as well, it's unfortunate I haven't seen this previously and hasn't been reported in the tests. I might send you a PM soon to ask for some more details in case needed, if you'd like you could send me your email to get beta access so we could test out the fixes on your side much sooner before next version release.

    Thanks for your patience, hang in there!! :)

    It's a bit tricky to get that working on a single particle system, currently you could make use of Texture Sheet Animation on the Shuriken component, use Animation: Single Row and set Random Row to true. However that's a bit limited and will only read the first row's texture. I'll look into adding a feature (or more of a hack), to set particle time separately from particle lifetime, which possibly could let you set the frames you want. Not sure yet if the Shuriken particles will cope entirely with that approach but let's give it a try.

    Sure thing! You can add the script ParticleSystemScaler.cs found in Examples/Example Scripts/Simple Scripts onto your particle system. It has options for including velocity, size and offsets. Connecting the scale to the transform could look like this:

    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3.  
    4. /// <summary>
    5. /// Add this to your particle system's GameObject.
    6. /// </summary>
    7. public class ScaleBasedOnLocalScale : MonoBehaviour {
    8.  
    9.     public Transform yourTransform;
    10.     ParticleSystemScaler scaler;
    11.  
    12.     void Start () {
    13.         scaler = GetComponent<ParticleSystemScaler>();
    14.     }
    15.  
    16.     void Update () {
    17.  
    18.         // Scale depending on localScale axis
    19.         scaler.scale = yourTransform.localScale.x;
    20.     }
    21. }
    22.  
    Hi!
    No worries, message received to support as well. Would be great to have an example scene with how you've set thing up (could continue on the support errand by email). The Lifetime Offset can be seen as a scrub for one lifetime cycle (from where inside that cycle should start the lifetime calculations). I'm not sure why particles would loose time information when using an event (haven't seen that previously, hence an example scene would be great to look at).

    1. I'm afraid the best way of delaying a particle system would be using a script, or by using PlayMaker. You can yield before enabling the particle system as such:
    Code (CSharp):
    1. using UnityEngine;
    2. using System.Collections;
    3. using ParticlePlayground;
    4.  
    5. public class DelayedStart : MonoBehaviour {
    6.  
    7.     public float timeToWait = 1f;
    8.  
    9.     IEnumerator Start () {
    10.         PlaygroundParticlesC particles = GetComponent<PlaygroundParticlesC>();
    11.         particles.enabled = false;
    12.         yield return new WaitForSeconds(timeToWait);
    13.         particles.enabled = true;
    14.     }
    15. }
    16.  
    2. The events are basically for single particles being able to send information to either another particle system to emit or to any event listeners setup by you in script. There's probably a better approach to this than using an event, they should not be seen as a state machine, but rather a component which will pass emission and/or particle information.

    I'd be happy to receive some more details over email in what you'd like to achieve, perhaps I can help you with a simple script based on the above.
     
  36. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
  37. gonzorob

    gonzorob

    Joined:
    Dec 1, 2011
    Posts:
    96
    Very kind, thank you! You previously mentioned a 'move particles along spline' feature - did you have any success with this ? Just asking before I start writing something similar

    edit: just read your blog post - number one feature :)
     
  38. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hehe great! The implementation of splines is started a while back but I'm focusing on making some video guides before anything else. Shouldn't be long though!
     
  39. p87

    p87

    Joined:
    Jun 6, 2013
    Posts:
    318
    apologies - dont have time to read 14 pages of the thread.. a couple quick questions:

    Are there any blood splatter presets or samples anywhere?
    Any suggestions for creating kind of a blood splatter particle system?

    thanks!
     
  40. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    None that I'm aware about, but here's an example preset of how you could set the particle system up:
    http://www.polyfied.com/development...nd_Preset_Playground_Blood_Splat.unitypackage

    Behaves like this:


    I'm not sure if that is the effect you're looking for, but it's a start perhaps.
    There's a couple of splat textures tagging along the package you could try out. Set it to non-looping in the Particle Settings and then you could make use of the example script SwitchCachedParticleSystemC to pool the blood splat effects if you have a massacre going on... :)
     
    p87 likes this.
  41. manutoo

    manutoo

    Joined:
    Jul 13, 2010
    Posts:
    524
    @save:
    sorry, I'm very short on time so I won't be able to test any beta version, but hopefully, you'll be able to reproduce all the issues with the steps I provided, so you won't need me anymore... ;)
     
  42. Jotunn

    Jotunn

    Joined:
    Jan 10, 2014
    Posts:
    22
    Hello. Thank you for this fantastic asset.
    I played some example scenes, I have a question.

    How Unity's "Fixed Timestep" effect to Particle Playground?
    I set "Fixed Timestep"(Edit > Project Settings > Time) and "Maximum Allowed Timestep" to 0.005, Particle Playground slow down much.
    Regardless the value of "Maximum Allowed Timestep", small "Fixed Timestep" value cause physics calculation many many times?
     
  43. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    That's ok, thanks that should be enough.

    Hi!
    This is not specific for Playground and will happen to anything which takes delta time into consideration. You could test it out by just moving something and multiplying it with Time.deltaTime:

    Code (CSharp):
    1. using UnityEngine;
    2.  
    3. public class TranslateObject : MonoBehaviour {
    4.  
    5.     public Vector3 translation = new Vector3(0,0,1f);
    6.  
    7.     void Update () {
    8.         transform.Translate (translation*Time.deltaTime);
    9.     }
    10. }
    11.  
    Please correct me if I'm wrong but what I think happens is that the physics update rate is so high (running at 0.005 means 200 physic frames/second) so it needs to slow down time to maintain your 200 updates per second. You should never have to update your physics at that rate as the translation of your rigidbodies can interpolate between the fixed update and the regular update.
     
  44. gegagome

    gegagome

    Joined:
    Oct 11, 2012
    Posts:
    392
    I saved a bunch of your particles into another folder, including the materials' into my actual project.

    The same prefabs that worked in the actual imported scene don't work in my project. I get fuchsia squares all over.

    Do I need to import PP2 into my project to be able to see these particles correctly?


    Thanks
     
  45. Jotunn

    Jotunn

    Joined:
    Jan 10, 2014
    Posts:
    22
    Sorry, I had misunderstood.
    I thought if I don't have any Rigidbody, Fixed Timestep do not effect to any movements.

    Thank you very much for intelligible explanation and sample code.
     
  46. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Try a reimport to get the textures connected to the materials again. This usually happens when the meta data connection breaks in a Unity project.
     
  47. thebroll

    thebroll

    Joined:
    Sep 26, 2014
    Posts:
    6
    Just picked up a seat of pp for a game I am developing and all I can say is WOW. absolutely awesome tool that fits the needs exactly of what we are looking for. I really also appreciate how quickly I see you replying in this thread. Very cool. I will share with you some screens of the game once we our out of NDA :) Much thanks! It is going to highly influence the look of the game!
     
    Last edited: Nov 20, 2014
  48. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hey thanks! Looking forward to see what you've been up to. :)
     
  49. Jiraiya

    Jiraiya

    Joined:
    May 16, 2013
    Posts:
    12
    Hello,
    I have placed a particle playground prefab particle system in a hierarchy that rotates in Y, and noticed that the particles lag a few frames behind the transform it emits from. Specifically, I created a empty game object, placed it in the hierarchy, and used it as a transform source for the system. In contrast, if I attach a shuriken particle system component to the same transform, there is no lag behaviour between the particle emitter when the root of the hierachy rotates.
    Is there a flag somewhere in the particle playground system that would update its position so there would be no lag?
    Thanks!
     
  50. save

    save

    Joined:
    Nov 21, 2008
    Posts:
    744
    Hi!
    I've seen this as well lately, I'll see what we can make of having a bit of different structure of the calculation execution order. There's currently one "natural" frame behind the source (could possibly be fixed with changing PlaygroundC.Update to LateUpdate) and any possible lag in the multithreading where the calculation can be done this or at any later frame. I'm looking into it. :)