Search Unity

(RELEASED) Cartoon FX Pack 2: More awesome toon-styled particles! (40+ effects!)

Discussion in 'Assets and Asset Store' started by Jean-Moreno, Sep 1, 2012.

  1. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    Hi!
    Following the success of Cartoon FX Pack 1, here is the second iteration!
    More effects and more variants per effect for the same low price!

    Cartoon FX Pack 2 is a toon-styled particles pack with various effects suitable for any game genre.
    It also features mobile-optimized versions of each effect, and Cartoon FX Easy Editor is included with it! (very useful to scale any particle system!)



    Try the INTERACTIVE DEMO here!

    FEATURES:

    - 50+ unique prefabs composed of several particle systems to create complex and dynamic effects
    - a total of 150+ prefabs including variants of unique ones
    - all effects in 3D, i.e. visible from any angle, that work well with 2D and 3D environments
    - handmade very high quality objects
    - high resolution textures
    - Cartoon FX Easy Editor included to easily scale, set duration, tint and change other properties quickly for any Shuriken-based particle system (including children), so that you don't have to modify all values accordingly manually!

    20$ only!

    Link to Unity Asset Store

    Effects list (not including variants):
    Blood Splatters (10 unique variants)
    Blood Puddle (3 unique variants)
    Ground Hit + Debris (Rock Wood)
    Sparks Effects (3 unique variants)
    Sparks Hit
    Explosion (Wind Waker styled)
    FireBall A,B,C
    FireWall A,B,C
    Pickup Items (17 unique variants)
    Cartoon Fight
    Power Aura
    Shiny Item
    Blob
    Rain
    Light Rain
    Heavy Rain
    Enemy Death (ghost skull versions)
    Skull Eyes
    Skull Resonance
    Skull Rotate
    Poison Cloud
    Soul
    Souls Escaping
    Skim Directional
    Splash + Drops
    Broken Heart
    Bats Cloud


    (more fully animated effects in the demo!)

    If you have any suggestions or requests, or are just interested in this, please speak up! :)
    I would also be very grateful if you leave a review or rate the pack after buying it!
     
    Last edited: Mar 25, 2013
  2. kevdotbadger

    kevdotbadger

    Joined:
    Sep 13, 2011
    Posts:
    82
    Demo don't work, care to host it elsewhere? Also, how many pack are you planning to release?

    EDIT: Does work.
     
    Last edited: Sep 1, 2012
  3. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    I don't know, this one wasn't even planned after the first! So it depends on the enthusiasm and suggestions of the people! But I'll try to add a few effect to this pack before thinking about another pack.
     
  4. cynel

    cynel

    Joined:
    Apr 18, 2012
    Posts:
    734
    these effects are perfect for a turned based rpg im making because im going with a cartoon aesthetic
     
  5. kevdotbadger

    kevdotbadger

    Joined:
    Sep 13, 2011
    Posts:
    82
    I was disappointed that I'm going to have to pay another $20 for effectively an upgrade on the first pack.
     
  6. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    Well I wouldn't call this an upgrade as these are completely new effects and not derivatives; and I genuinely think that the packs are really cheap seeing the number of effects you get for such a price.
    I'd rather let the choice to the users picking whichever pack they want instead of making one big pack for which I'd have to frequently raise the price!
     
  7. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,146
    I confirm it isn't a simple upgrade...
    And don't forget : By modifying some parameters or textures and so on, you don't have 40 cartoon effects but hundreds !!!

    6R
     
  8. kalamona

    kalamona

    Joined:
    Aug 16, 2011
    Posts:
    725
    Dude I am amazed! I especially liked the effects that contained that cartoon smoke (different colored explosions, and stuff). Also the ones with the ghosts are really nice too! Great work!
     
  9. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    Thanks for the great feedback!

    The cartoon smoke explosions were heavily inspired by Zelda Wind Waker, I studied the in-game effect closely and tried to replicate it as best as I could! :)
     
  10. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    I've just submitted an update with 10 new item pickup effects and some small fixes!
    The demo has been updated, the new effects are the last ones!
     
    Last edited: Mar 25, 2013
  11. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    New update with 4 new effects!
    Bats Cloud, Souls Escaping, Poison Cloud and Broken Heart:



    Demo has been updated, as usual: the new effects are the last ones!

    I'll let you know when the update is up on the store.
     
    Last edited: Mar 25, 2013
  12. p6r

    p6r

    Joined:
    Nov 6, 2010
    Posts:
    1,146
    Thanks a lot Jean...

    It's great to know you're updating the 2 packs !!! And the effects are so nice.

    6R
     
  13. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    Thanks p6r :)

    The effects are up on the store!
     
  14. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    New update with new features!

    * Added CFX Spawn System, to easily create preloaded pools of effects and avoid calling Instantiate() and Destroy() constantly!
    This should help a lot performance-wise for mobile platforms!


    * Updated Cartoon FX Easy Editor with the ability to tint the effects, preserving their saturation and alpha!


    The update (v 1.4) has been submitted to the Asset Store and should be released soon!
     
    Last edited: Mar 25, 2013
  15. cpasjuste

    cpasjuste

    Joined:
    Apr 2, 2012
    Posts:
    139
    Hi Jean,

    i do have a problem to loop the rain effect, would you have the needed settings to loop it without a delay between the loops ? (i mean the rain is stopping for say a second at every loop).

    Thanks,
    David.
     
  16. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    Yes, you have to have to go in the Particle System Inspector of each GameObject in the rain effect, and set the Rate in the Emission tab to "Constant" instead of "Curve". Make sure that the constant value is the same as the peak of the previous curve to have the same effect (you can also control the rain density actually with these values).

    The side effect is that you'll lose the fading effect where the rain starts small and then progressively grows in number.

    If you want to have the effect looped and the fading, you'd probably have to make two versions: a fading in one with a rising Rate curve, that when finished activates the looped one at full density (and possibly a third one if you want a fade out effect).
     
  17. jococo

    jococo

    Joined:
    Dec 15, 2012
    Posts:
    232
    Hello :)

    Do you have any additional script examples (besides demo scene) in javascript to get CFX_SpawnSystem.GetNextObject(object) call working?

    Having some issues getting it running :/
     
    Last edited: Sep 3, 2013
  18. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    First thing to do is to make sure that the CFX_SpawnSystem.cs file is inside the Plugins folder (or any folder that is compiled first, see here: http://docs.unity3d.com/Documentation/Manual/ScriptCompileOrderFolders.html ) so that it is compiled before the JS scripts (by default JS scripts are compiled before C# scripts).
    If you have done that part already, let me know where you have trouble with your scripts exactly, or if you need a general example of how to use it!
     
  19. jococo

    jococo

    Joined:
    Dec 15, 2012
    Posts:
    232
    CFX_SpawnSystem.cs is in the Plugins folder. Got that part right.

    I guess a code snippet would be good on how to use it in a script (declarations, etc).

    I've loaded some effects as per documentation but it's not clear the exact syntax to execute them. I have an enemy that when dies I want to show one of your effects.

    The documentation says there is a call to check when sounds have loaded into memory before executing game but that's a mystery also :/

    Looking in the demos I couldn't even find a call to play effect in any of the scripts (CFX_SpawnSystem.GetNextObject(object)??? ) ...
     
    Last edited: Sep 4, 2013
  20. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    Well there are two main things to do:

    1) In the Editor, create an empty GameObject and add the CFX_SpawnSystem script. Then, on the Spawn System Inspector, you can drag and drop the effects prefabs that you want to preload (directly from the Project panel).
    These are the same prefabs that you will use as references in your own script, for example with this declaration:
    Code (csharp):
    1. public var effectReference : GameObject;
    So you have to drag the same prefab that you dropped on the Spawn System Inspector on the effectReference property of your script's Inspector.

    2) To play the effect, you must get a preloaded effect based from this reference, that's where the GetNextObject method is used, like this:
    Code (csharp):
    1.  
    2. var preloadedEffect:GameObject = CFX_SpawnSystem.GetNextObject(effectReference);
    3. preloadedEffect.transform.position = character.transform.position; //Place the position where you character is (character may be any other property you have defined in your script)
    4. preloadedEffect.particleSystem.Play(); //This line is generally not necessary: almost all effects will automatically played when they are activated (which is done in the GetNextObject method) as long as the 'Play On Awake' checkbox is checked on the Particle System Inspector
    5.  
    The effect will then play where you need, and automatically deactivate itself upon completion, ready to be used again when GetNextObject is called.

    Side notes:
    - GetNextObject just returns the next object in the pool, it will not check whether it is used or not. The number of instances to preload should reflect the maximum number of that effect that can be seen in your game concurrently
    - The aforementioned method to check when all effects are loaded should only be used in the case you need to use GetNextObject right when the Scene starts (because if you want to get an object when it's not preloaded yet, well it won't return anything)

    Let me know if you need further precisions!
     
  21. jococo

    jococo

    Joined:
    Dec 15, 2012
    Posts:
    232
    Thanks for the help, Jean! :)

    I'm working with editor to get a 3d flame thrower effect. My game is 3d and my character shoots flames. Not having much luck. Any advice or is there a place for getting user created effects that might have it?
     
  22. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    I made one in my War FX pack (see the demo here). You can at least get inspiration from it if you don't want to get the full pack!
     
  23. jococo

    jococo

    Joined:
    Dec 15, 2012
    Posts:
    232
    Cool! I just bought the package because the other effects are so good.

    One question though ... is there a way to detect if these fx particles hit a mesh target?

    I had been using OnParticleCollision and World Particle Collider and it has been working with some effects I made.

    I added a World Particle Collider to your effect but it doesn't seem to work. Any ideas?


    I have a script that is looking for a ParticleEmitter but these fx don't seem to be that.
    For example:
    Code (csharp):
    1.  
    2. public var fireEmmiter1: ParticleEmitter;
    3.  


    What are these?
     
    Last edited: Sep 23, 2013
  24. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    The WorldParticleCollider component only works with the legacy particle systems, i.e. the old particle engine from before Unity 3.5.
    All effects in my packs are using the Shuriken particle engine, so you should look for how to handle particle collisions with that system (for example see the section related to Shuriken particle systems here)
     
  25. Sygata

    Sygata

    Joined:
    Nov 14, 2012
    Posts:
    17
    Hi, I have a question. Without any light sources the particles display fine. However, in my scene I have a directional light which makes the particles very transparent and not distinctly visible. Is there a way for me to tell the particles to ignore lighting?

    Edit: part of the reason I think is because my floor was originally the default diffuse thus providing a white background. I've changed the color of the floor and it appears much better.
     
    Last edited: Oct 31, 2013
  26. fenderrio

    fenderrio

    Joined:
    Mar 2, 2013
    Posts:
    147
    These effects are really great! Adds a lot of juice to a project :)
     
  27. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    Particles actually do not react to lighting at all because it could quickly impact performances (especially on mobile). They generally are less visible over bright surfaces because most of them use an additive blending mode, so adding colors to a surface that's already almost white will not change things much.
    If you do want to have more visible particles, you can try to change their material's blending mode (by selecting another shader in "Particles/"). For example alpha blending will make the particles have their proper color that don't get altered with the background (provided that they are not semi-transparent).
     
  28. rizawerx

    rizawerx

    Joined:
    May 30, 2013
    Posts:
    29
    Hi Jean,

    I tried to follow your script but right now it says:
    "The best overload for the method 'CFX_SpawnSystem.GetNextObject(UnityEngine.GameObject, boolean)' is not compatible with the argument list '(UnityEngine.GameObject)'."

    I checked your guide and found "Use the CFX_SpawnSystem.AllObjectsLoaded boolean value to check when objects have finished loading."
    Problem is, I don't know how to use it...care to elaborate?

    Thanks,

    riza
     
  29. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    It looks like you passed a wrong type for the arguments of the method. Could you post a snippet of how you set things up?

    As for the AllObjectsLoaded bool, it should be used when you want to spawn effect right at the start of the Scene in a coroutine: if your script spawning the effect in its Awake function is called before CFX_SpawnSystem, then the pool objects won't exist yet so it will throw an error. This bool is meant to be able to check if the pool objects are loaded to safely get them afterwards.
    So in the end I don't think this has to do with your current problem.
     
  30. rizawerx

    rizawerx

    Joined:
    May 30, 2013
    Posts:
    29
    This is what I did...
    basically I made an empty game object, put the CFX_spawn system ( after I put whole cs script in Plugins folder because I use JS ) on it. Then I create a cube as spawn position, then a simple script that if I press up a particle should spawn...
    I use same prefabs in effectReference..
    I have tried disable "preloadedEffect.particleSystem.Play();" also but same result..

    Code (csharp):
    1. var effectReference : GameObject;
    2. var cube : Transform;
    3.  
    4. function Update (){
    5.   var preloadedEffect : GameObject = CFX_SpawnSystem.GetNextObject(effectReference);
    6.   if (Input.GetKeyDown("up"))
    7.     {
    8.          preloadedEffect.transform.position = cube.transform.position;
    9.         preloadedEffect.particleSystem.Play();
    10.     }
    11.    
    12. }
    thanks in advance..:)
     
  31. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    Hmm, this looks okay to me...
    The GetNextObject method can have up to 2 arguments, the second one being optional. Maybe you have to explicitly pass all arguments in JS when calling a C# method?
    Try this when retrieving the preloaded object:
    Code (csharp):
    1. var preloadedEffect : GameObject = CFX_SpawnSystem.GetNextObject(effectReference, true);
    The second argument determines if the retrieved GameObject has to be activated (this ensures that effects play since their "Play when awake" flag is set to true, so you shouldn't have to call preloadedEffect.particleSystem.Play())
     
  32. Sygata

    Sygata

    Joined:
    Nov 14, 2012
    Posts:
    17
    Thanks
     
  33. rizawerx

    rizawerx

    Joined:
    May 30, 2013
    Posts:
    29
    Thanks Jean!
    I just add "true" like you said and the script works well!
    Another question...
    in CFX SPawn system script, there's option to create several prefabs...I'm not sure what's the differences using 1 or 5 prefabs..

    This is the final script I used that works:
    Code (csharp):
    1. var effectReference : GameObject;
    2. var cube : GameObject;
    3.  
    4. function Update (){
    5.     var preloadedEffect : GameObject = CFX_SpawnSystem.GetNextObject(effectReference, true);
    6.     if (Input.GetKeyDown("space"))
    7.     {
    8.         preloadedEffect.transform.position = cube.transform.position;
    9.         preloadedEffect.particleSystem.Play();
    10.     }
    11. }
    Edit:
    Doesn't matter now, I understand the differences using 1 or more prefabs..
    But now another question:
    If I put several prefabs to CFX spawn system, is that mean I have to use several 'spawner' also? Right now I tried using 3 different prefabs, and using 3 different spawner ( same object, duplicated 3 times and change EffectReference object)
    Although it's working, I wonder if this was the right thing to do..

    Thanks!
     
    Last edited: Nov 6, 2013
  34. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    Managing how and when to spawn the effects is entirely up to you: there's no 'right thing' to do, it only depends on how you structure your scripts.
    You can call the GetNextObject in any script you want.

    Also, in case someone on the forum wants the answer to your first question: the number of preloaded effects should be set to the number of times the same effect can be seen concurrently.
    For example, if the number is set to 1 and your effect is spawned again before the first one is finished, then the second spawn will take the only object available in the pool (the first one that hasn't finished), move and reset it instantly, thus making the first instance visually disappear.
     
  35. rizawerx

    rizawerx

    Joined:
    May 30, 2013
    Posts:
    29
    Cool..Thanks again Jean!
     
  36. InfinityCoder88

    InfinityCoder88

    Joined:
    Oct 4, 2013
    Posts:
    249
    Hi Jean Moreno,

    I'm using your great effects pack on my project want to get the last pack to ;) I have some question for you...I instantiate my effects like this::
    Code (CSharp):
    1. Instantiate(myEffect, transform.position, transform.rotation);
    *The game is for mobile platforms, so I have a lot of effects result killing my frame rates :(
    You suggest instead to replace in my code with:
    Code (CSharp):
    1. CFX_SpawnSystem.GetNextObject(myEffect);
    Please guide me with this I tried but not succeeded so far :( Thanks !
     
  37. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
  38. InfinityCoder88

    InfinityCoder88

    Joined:
    Oct 4, 2013
    Posts:
    249
    Hi Jean,

    I followed your tutorial , I rewrite my code into this:
    Code (CSharp):
    1. void OnTriggerEnter2D(Collider2D other){
    2.                 if (other.gameObject.tag == "Enemy") {
    3.                         audio.PlayOneShot(EnemySnd, 0.8f);
    4.                         //Instantiate(enemyEffect, transform.position, transform.rotation);
    5.                         GameObject instance = CFX_SpawnSystem.GetNextObject(enemyEffect);
    6.                         instance.transform.position = gameObject.transform.position;
    7.                         enemy++;
    8.                         Destroy(other.gameObject);    
    9.                 }
    *but I have and other effects in code I need to instantiate, for this effects I get errors:
    Assets/_MYPROJECT/Resources/Scripts/Player.cs(205,63): error CS1501: No overload for method `GetNextObject' takes `1' arguments
    *FIXED
    It's fine how I did ?
     
    Last edited: Nov 21, 2014
  39. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    The second parameter of the function is optional but it doesn't seem to compile for you for some reason.
    So you just need to add a bool value indicating if you want to activate the pool instance GameObject you get back from the function (you most likely want to activate it), so for example the line becomes:

    Code (csharp):
    1. GameObject instance = CFX_SpawnSystem.GetNextObject(enemyEffect, true);
     
    InfinityCoder88 likes this.
  40. BillyMFT

    BillyMFT

    Joined:
    Mar 14, 2013
    Posts:
    178
    I have looping particles that I have spawned with the CFX_SpawnSystem. What is the best way to stop the particles (without it being too abrupt) and return them to the pool?

    Thanks

    PS
    This is what I did. Not sure if it is the best approach or not. This is place on the root game object that is spawned.

    Code (CSharp):
    1. public void TurnOff(){
    2.         this.transform.Find("Bubbles").gameObject.GetComponent<ParticleSystem>().loop=false;
    3.             this.transform.Find("Bubbles").Find("Foam").gameObject.GetComponent<ParticleSystem>().loop=false;
    4.  
    5.         Invoke ("ReturnToPool", 5f);
    6.     }
    7.     void ReturnToPool(){
    8.  
    9.             this.transform.Find("Bubbles").gameObject.GetComponent<ParticleSystem>().loop=true;
    10.             this.transform.Find("Bubbles").Find("Foam").gameObject.GetComponent<ParticleSystem>().loop=true;
    11.  
    12.         this.gameObject.SetActive(false);
    13.     }
     
    Last edited: Feb 23, 2016
  41. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    The CFX Spawn System is very basic, and its objects never actually "leave" the pool. It just cycles through the instances when calling GetNextObject().
    It is up to you when you get an object to verify that it is active or not.

    This means that you don't have to explicitly return an object to the pool: if you keep calling GetNextObject() you will eventually go back to the first object, and so on.

    Instead of setting ParticleSystem.loop to false, you can simply call ParticleSystem.Stop(true); which will stop the emission (the true flag will also stop the emission for all the children of the root ParticleSystem).
    You can then either use IsAlive() to check is there are still particles alive, and disable the GameObject is there aren't any, or use a timer (which should correspond to the max particle lifetime value of all the ParticleSystems included in the effect, to make sure that no particle will just disappear from the screen).
     
  42. BillyMFT

    BillyMFT

    Joined:
    Mar 14, 2013
    Posts:
    178
    Thanks for the response. If I was to Destroy an instance, what would happen as it cycles through the pool and gets to the destroyed object?

    If I tell the particle system to stop instead of turning off loop, do I need to tell it to start when that instance is called on again or will that happen automatically?

    Thanks again
     
  43. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    You will get a null reference, so you'd have to check for that too after calling GetNextObject().
    Alternatively you could also modify CFX_SpawnSystem to add a Destroy(GameObject instance) method that would Destroy the passed instance, but also remove it from the instances list to prevent getting a null ref with GetNextObject().
    As long as the 'Play on Awake' toggle is enabled in the Particle System inspector (which is on by default on all Cartoon FX effects), when you enable back the GameObject it should play automatically.
     
  44. BillyMFT

    BillyMFT

    Joined:
    Mar 14, 2013
    Posts:
    178
    ok great. Thanks again. :)
     
  45. BillyMFT

    BillyMFT

    Joined:
    Mar 14, 2013
    Posts:
    178
    I can't get the spawn system to show the instances in the hierarchy. Every time I uncheck the box it just checks itself again and hides the instances. Any tips? Thanks
     
  46. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    I think I forgot to add an Undo check, so Unity doesn't know that it has to save the object again... I'll issue an update soon and will let you know once it is up on the Asset Store!
     
  47. BillyMFT

    BillyMFT

    Joined:
    Mar 14, 2013
    Posts:
    178
    OK. If you could send through a quick fix while we wait for the update it would be appreciated.

    Thanks
     
  48. Jean-Moreno

    Jean-Moreno

    Joined:
    Jul 23, 2012
    Posts:
    435
    The updates are on the Asset Store for all packs!
    I took the opportunity to add some new features to the Spawn System (only fetch deactivated instances, instantiate new instances when needed, and spawn instances as children of the Spawn System GameObject for better organization)
     
  49. BillyMFT

    BillyMFT

    Joined:
    Mar 14, 2013
    Posts:
    178
    awesome. I'll grab it on Monday.

    Thanks!