Search Unity

  1. Looking for a job or to hire someone for a project? Check out the re-opened job forums.
    Dismiss Notice
  2. Unity 2020 LTS & Unity 2021.1 have been released.
    Dismiss Notice
  3. Good news ✨ We have more Unite Now videos available for you to watch on-demand! Come check them out and ask our experts any questions!
    Dismiss Notice

Atomizer - turn pixels into particles! (Now free!)

Discussion in 'Assets and Asset Store' started by Guts, May 6, 2013.

  1. Guts

    Guts

    Joined:
    Jul 29, 2012
    Posts:
    17
    UPDATE: Atomizer is now free. If you want to know why, read this post.


    Hi folks,

    The Atomizer is a powerful effects framework that can create a particle system from the screen pixels of any GameObject with a SpriteRenderer, MeshRenderer or SkinnedMeshRenderer component.

    Once an object has been Atomized, you can then use the Atomizer code framework to take total control of the particles. Combine and chain effects together in a limitless number of ways to achieve your desired effect.

    WebPlayer Demo
    User Guide

    The Atomizer package includes:
    - 10 customizable particle system effects, which can easily be combined and chained together.
    - A user guide and example scene.
    - Full source code, with effects callable from both C# and JavaScript.
    - A PlayMaker integration package so that you can Atomize objects using the PlayMaker addon without ever having to touch a script file!

    Features:
    - Uses the Shuriken particle system.
    - Adjustable particle system size allows fine-grained control of performance for mobile and low-spec devices.
    - Tested on PC, Web Player, and Android.

    Asset store link
     
    Last edited: Feb 28, 2015
  2. I am da bawss

    I am da bawss

    Joined:
    Jun 2, 2011
    Posts:
    2,574
  3. Guts

    Guts

    Joined:
    Jul 29, 2012
    Posts:
    17
    Thanks bawss :)

    It doesn't quite work like that particulizer, no.
    I made a simple example scene to show what it does do: click here to try it out.

    That's using the 3rd person controller model included with Unity. It has a SkinnedMeshRenderer near the top of its hierarchy. Way down the hierarchy on the right hand, it has a wrench game object that has a MeshRenderer component.

    So I guess to answer your question, no you can't really explode just part of the mesh. But, if you have a complicated object with several different children that have Mesh or Skinned Mesh renderer components, then you could atomize each child individually.

    Thanks for the feedback, it's definitely going to make me think.
     
  4. apocriva

    apocriva

    Joined:
    Nov 3, 2011
    Posts:
    23
    Really neat effects! Thanks for putting this together!
     
  5. Guts

    Guts

    Joined:
    Jul 29, 2012
    Posts:
    17
    I submitted an update to the package tonight that adds an "Atomization preview tool" editor window. It will let you try out different atomizations on your GameObjects as you run a scene. It should be pushed through the asset store in a few days.

     
    Last edited: May 9, 2013
  6. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    685
    Just curious, I assume you can play these animations backward right? So I could have a particle sphere that transforms into a mesh as well as a mesh that transforms into a particle sphere? By the way, these look really great!
     
  7. Guts

    Guts

    Joined:
    Jul 29, 2012
    Posts:
    17
    Thanks macdude! And to answer your question: not really.

    However, there is a manual particle effect included in the package called "BreakAndReform" that demonstrates how you might make such an effect. It generates a particle system from the on-screen pixels of the game object, breaks it apart, then puts the particles back to their original positions. The BreakAndReform script lets you specify the duration of the "break" and "reform" phases, and how quickly the particles break apart.

    I'm planning work on some additions that should make creating and customizing manual particle systems much easier. (By "manual" I mean that the particles are controlled by a custom script instead of just using the parameters set up in the attached Shuriken ParticleSystem.)
     
  8. GameVortex

    GameVortex

    Joined:
    Jun 14, 2013
    Posts:
    12
    Hi

    The plugin works great, but I have noticed a problem when using Deferred Lighting. Sort of hard to explain, but it is easy to test. Just use a new project, import the Atomizer, set rendering path to Deferred Lighting and play the example scene. It seems like the calculations for the positions of the particles break or something.

    This is not a huge problem for me because my project will most likely use Forward Rendering, but you might want to look into it.

    Another problem is that the particles gets places a certain distance behind the object getting atomized in relations to the camera. This has the effect that if the object is close to the ground (which all my objects are), the particles will be placed partly into the ground and therefore get the look of being cut off. This can also be easily tested in the example scene by just moving the ground up to just under one of the objects and then atomizing it.

    Any help with solving this issue would be greatly appreciated.

    Thank you.
     
    Last edited: Jun 14, 2013
  9. Guts

    Guts

    Joined:
    Jul 29, 2012
    Posts:
    17
    Hi GameVortex,

    Thanks for bringing up those issues. I'll have a look right away and report back when I have solutions.
    The deferred lighting issue might be problematic for me to investigate though as I do no have Unity Pro (and therefore can only use Forward Rendering). I have an idea what the problem might be though, so hopefully I'll be able to come up with a solution.

    Edit: I have found a better solution for setting particle Z values that should alleviate the second problem mentioned. I'll be submitting an update tonight to the Unity folks. Thanks again for your feedback!
     
    Last edited: Jun 16, 2013
  10. GameVortex

    GameVortex

    Joined:
    Jun 14, 2013
    Posts:
    12
    Good to hear you found a solution to the depth issue. I'll keep a lookout for the update.

    Thank you for your quick reply.
     
  11. Guts

    Guts

    Joined:
    Jul 29, 2012
    Posts:
    17
    Version 1.2 has just been submitted to the asset store. The turnaround time for Unity to review and update in the asset store has been very quick in my experience, so it should be available in a few days.

    The update features:
    - Improved performance. I couldn't resist getting Unity Pro after learning about the $75/month subscription offer, so I was actually able to properly profile the Atomizer and improved performance by about 50%.
    - Armed with Unity Pro, I was able to try out the deferred lighting and confirm the issue pointed out above. Luckily, if you set the Atomizer camera to use Forward rendering path, it seems to work just fine.
    - More accurate placement of particles, specifically in reference to the camera.
     
  12. macdude2

    macdude2

    Joined:
    Sep 22, 2010
    Posts:
    685
    Hey, were you able to get the forward and reverse atomizing to work? Is it possible to go from particles to a mesh as well as from a mesh to particles?
     
  13. JohnGallet

    JohnGallet

    Joined:
    Sep 27, 2013
    Posts:
    16
    May I get an example code of how you can Atomize a gameobject but from Javascript?
     
  14. Samsson

    Samsson

    Joined:
    Oct 12, 2010
    Posts:
    165
    Hi guts,


    Can atomizer work on an animated mesh ?
     
  15. Guts

    Guts

    Joined:
    Jul 29, 2012
    Posts:
    17
    Hi John, you'll have to excuse me here because my experience with Javascript (which in Unity is apparently something a bit different - UnityScrpt) is minimal.

    To call the Atomizer functions from JavaScript, you'll first have to move some of the Atomizer scripts to a different folder. They should be placed into a "Plugins" folder, like so:

    $folders.PNG

    Notice that's I've just dragged the Atomizer/Scripts folder into Plugins. If that conflicts with something already under a Plugins folder, you can rename the Atomizer Scripts folder before moving it.

    I'll be sending you a private message with an updated C# file that you'll need (EDIT: oops, spoke too soon. It reports that I'm unable to send you any private messages. Is there a way I can send you a plain text file that you're comfortable with?)

    I've recreated the included "AtomizeOnClick" C# script in JavaScript here. Place it on a GameObject with a Collider attached and click it to see it in action.

    Code (csharp):
    1.  
    2. #pragma strict
    3.  
    4. var maxParticleCount : int;
    5. var particleSize : float;
    6.  
    7. var effectParams : Atomization.AtomizerParams[];
    8.  
    9. function Start () {
    10.     effectParams = new Atomization.AtomizerParams[10];
    11.    
    12.     effectParams[0] = new Atomization.AtomizerParams(gameObject, "Dissolve", particleSize, maxParticleCount);
    13.     effectParams[1] = new Atomization.AtomizerParams(gameObject, "Dust", particleSize, maxParticleCount);
    14.     effectParams[2] = new Atomization.AtomizerParams(gameObject, "Pop", particleSize, maxParticleCount);
    15.     effectParams[3] = new Atomization.AtomizerParams(gameObject, "Fall", particleSize, maxParticleCount);
    16.     effectParams[4] = new Atomization.AtomizerParams(gameObject, "Squish", particleSize, maxParticleCount);
    17.     effectParams[5] = new Atomization.AtomizerParams(gameObject, "ParticlePercolator", particleSize, maxParticleCount);
    18.     effectParams[6] = new Atomization.AtomizerParams(gameObject, "BreakAndReform", particleSize, maxParticleCount);
    19.     effectParams[7] = new Atomization.AtomizerParams(gameObject, "SwapColours", particleSize, maxParticleCount);
    20.     effectParams[8] = new Atomization.AtomizerParams(gameObject, "Pulse", particleSize, maxParticleCount);
    21.     effectParams[9] = new Atomization.AtomizerParams(gameObject, "Vacuum", particleSize, maxParticleCount);
    22.     effectParams[9].ForceParticleSize = true;
    23. }
    24.  
    25. function Update() {
    26.     if (Input.GetMouseButtonDown(0)) {
    27.         var ray : Ray = Camera.main.ScreenPointToRay(Input.mousePosition);
    28.         var hit : RaycastHit;
    29.         if (Physics.Raycast(ray, hit)) {
    30.             if (hit.collider.gameObject == gameObject) {
    31.                 Play();
    32.             }
    33.         }
    34.     }
    35. }
    36.  
    37. function Play() {
    38.     var index : int = UnityEngine.Random.Range(0, effectParams.Length);
    39.            
    40.     Atomization.Atomizer.Atomize(effectParams[index], ParticleBuildComplete);
    41. }
    42.  
    43. function ParticleBuildComplete(success: boolean, effect: Atomization.AtomizerEffect) {
    44.     if (success) {
    45.         gameObject.SetActive(false);
    46.         effect.OnFinish = OnFinish;
    47.         effect.Play();
    48.     }
    49. }
    50.  
    51. function OnFinish() {
    52.     gameObject.SetActive(true);
    53. }
     
    Last edited: Dec 1, 2013
  16. Guts

    Guts

    Joined:
    Jul 29, 2012
    Posts:
    17
    Hi Samsson: yep, atomizer can atomize animated meshes. Take a look at this quick demo, the aliens have animated meshes.

    Foo Atomizer Demo

    (WASD to move the ship. Left, Middle, and Right mouse buttons to fire. 1 and 2 to switch weapons).
     
    Last edited: Dec 1, 2013
  17. JohnGallet

    JohnGallet

    Joined:
    Sep 27, 2013
    Posts:
    16
    Hey Coool! Thanks for that, I will try it, and thanks for the excellent support!

    I am sure it will help some guys like me who like better Javascript loose syntax for rapid prototyping.
     
  18. BearShark1993

    BearShark1993

    Joined:
    Oct 22, 2013
    Posts:
    5
    Is there a way to have a mesh orginally split apart then reformed then split apart again to be reformed at a later portion. If so is there a where to delay the reformation lets say when a player touches a button the mesh would reformed
     
  19. Guts

    Guts

    Joined:
    Jul 29, 2012
    Posts:
    17
    Not yet, no, but given how often this request comes up I'll be sure to work on a system to make it possible in a future update. Thanks for the suggestion :)
     
  20. Guts

    Guts

    Joined:
    Jul 29, 2012
    Posts:
    17
    Atomizer 2.1 was just released to the Asset Store. It has some pretty big changes, including:
    • Support for calling from UnityScript
    • The ability to chain and combine effects in arbitrary ways.
    • Vastly improved API, making it much easier to use.
    • Support for atomizing Unity Sprites.

    There's a web player demo available here: Atomizer 2.1 Web Demo
     
  21. TheNorthridge

    TheNorthridge

    Joined:
    Jan 4, 2012
    Posts:
    193
    This system is getting better and better :)

    Is there any playmaker support yet?
     
  22. Guts

    Guts

    Joined:
    Jul 29, 2012
    Posts:
    17
    Thanks!

    No PlayMaker support yet, but that's an excellent suggestion, and something I'd like to add soon.
     
  23. BearShark1993

    BearShark1993

    Joined:
    Oct 22, 2013
    Posts:
    5
    So with this new update Are we able to reform objects from particles?
     
  24. Guts

    Guts

    Joined:
    Jul 29, 2012
    Posts:
    17
    No, sorry. This update was actually submitted before your comment asking about the feature. Forming objects from particles will have to come in another new update. I'll be sure to post about it here when that update is ready.
     
  25. Guts

    Guts

    Joined:
    Jul 29, 2012
    Posts:
    17
    I'm happy to report that the latest version of Atomizer (2.2) includes a PlayMaker integration package!

    If you have PlayMaker, open the PlayMakerIntegration package after you import Atomizer. Each Atomizer effect will then be listed under the "Atomizer" section in the PlayMaker Action Browser:

    $PlayMaker1.PNG

    From there you can take advantage of all that PlayMaker has to offer and never have to touch the source code (unless of course you want to; that option is certainly still available).
     
  26. xdotcommer

    xdotcommer

    Joined:
    Aug 20, 2014
    Posts:
    33
    So this doesn't work for sprites then?

    Wish I had figured that out before buying :/
     
  27. Guts

    Guts

    Joined:
    Jul 29, 2012
    Posts:
    17
    tl;dr: Atomizer is now free. Source repo here: https://bitbucket.org/Guts/atomizer. Download the package here: https://bitbucket.org/Guts/atomizer/downloads/atomizer.unitypackage

    Long version: I've decided to make Atomizer free software.
    I no longer feel justified charging money for a product that I'm not putting continuous effort into, so rather than abandoning it and letting it rot I'm making it freely available. There are also an abundance of sophisticated, well-supported particle effect packages available on the asset store that make Atomizer look completely amateur. To put it bluntly, I haven't put in the effort required to compete at all.

    Atomizer does a couple neat things, but it's flawed and lacking in features. I won't say that the source code is great - it's not. However, I think that adding a new effect using the existing framework is actually a pretty fun thing to do. The documentation included in the download package (and the source) explains how to do it. If you do make a neat new effect or improve the framework in some way, I'd be happy to include your changes in the "official" unity package.

    If there are any questions about this feel free to ask here. If you've recently bought Atomizer and want your money back, let me know and I'll figure out how to fix it.
     
    dyupa and chelnok like this.
  28. Rockson

    Rockson

    Joined:
    Dec 2, 2014
    Posts:
    7
    Beautiful asset, very useful!
    However i can't make it work with my own sprites! Are there specific import settings? The particle system takes 3/4 of the sprites and cuts the upper edge. Like if there is an offset... i'm going crazy!
     
  29. Cherno

    Cherno

    Joined:
    Apr 7, 2013
    Posts:
    515
    Nice work! I, for one, would really like to see a voxel explosion script that turns a mesh into small cubes (voxels) which explode. So far, my way of doin it is to reconstruct the mesh with single cubes of the right color and each with a rigidbody and collider, and add explosion force to them while destroying the original mesh. It doesn't work for animated models of course, and it's also a ton of work to do it all by hand.
     
  30. Rockson

    Rockson

    Joined:
    Dec 2, 2014
    Posts:
    7
    Can anyone tell me why does the atomizer cuts my sprite like this?
    My sprite
    MySprite.PNG
    Atomized sprite

    effect.PNG

    EDIT:
    It happens also with the examples! It doesn't happen only with the new UI images
     
    Last edited: Apr 1, 2015
  31. shaharpoa

    shaharpoa

    Joined:
    Apr 21, 2015
    Posts:
    1
    Hi,
    This Atomizer is awesome..!
    But I can't seem to make it to work properly.
    I get a runtime error: " array size must be at least: width*height "
    it happens on Snapshot.cs on line 72 : croppedTexture.SetPixels(pixels);
    (Which keeps running in an infinite loop)
    I have copied the same parameters as the demo project however i'm stuck on this one.
    have anyone encountered this issue and maybe have a solution for it ?

    Thanks,
    Shahar
     
  32. Benoitbo

    Benoitbo

    Joined:
    Aug 10, 2015
    Posts:
    4
    Hi,

    I recently started to use Atomizer (really nice plugin btw) and I was wondering if it was possible to change the particle renderer to have my own material on it instead of using the default material of Unity ?

    Thanks in advance.
     
  33. Benoitbo

    Benoitbo

    Joined:
    Aug 10, 2015
    Posts:
    4
    I just got an answer from the developer, so in case anyone was interested in my question here's the answer :

    Hello,

    Thanks for trying out Atomizer!

    There are 2 ways to change the particle material used.

    The first way is rather inflexible, and it will change the material for all of your Atomizer effects, but can be done from the editor.
    If you look in the Project view under Atomizer/Resources you will see a prefab named ManualAtomizerEffect. This GameObject contains a ParticleSystem component. In the Renderer section you can change the material to whatever you like.

    The second way is from script.
    The AtomizerEffectGroup object contains a ParticleSystem that you can grab a reference to. Here is an example that changes the particle material to a random material I've set up on the current object. It should hopefully get the idea across, but if not just let me know and I'll try to do better. It's actually been a while since I've done any Unity work so there have been some new developments to catch up on.

    // Generate a random effect.
    AtomizerEffectGroup effectGroup = GetRandomEffect();

    // Grab a reference to the attached ParticleSystem.
    ParticleSystem ps = effectGroup.GetComponent<ParticleSystem>();

    // Then get the renderer.
    ParticleSystemRenderer psRenderer = ps.GetComponent<ParticleSystemRenderer>();

    // And finally, assign a new material
    psRenderer.material = particleMats[Random.Range(0, particleMats.Length)];

    Andrew
     
    dyupa and Manny Calavera like this.
  34. markt1964

    markt1964

    Joined:
    Aug 30, 2011
    Posts:
    83
    Unfortunately, this particular plugin does not seem to work right for me (might be because I'm mostly using the Linux editor, which still has a few known issues and isn't quite ready for prime-time. The plugin seems to work fine on other platforms). Does anyone know what alleged products in the asset store that the developer was referring to that supposedly make this look amateurish? Because I looked around for at least an hour and I wasn't able to find one that did half of what this does.
     
  35. NatsupyYui

    NatsupyYui

    Joined:
    Jul 11, 2017
    Posts:
    18
    Thank you for this!
     
unityunity