LogoLogo
  • Home
  • Projects
  • About
  • Contact

Particle Editor for Starling Framework

Devon O. · October 01, 2011 · Flash · 65 comments
7

So I finally had time to sit down and have a bit of a play with the Starling 2D framework for Flash’s GPU accelerated Stage3D the other day (as well as read through the extensive and thorough documentation). It looks to me quite promising and certainly fun to play with  (although this tweet from Iain Lobb suggests it may have some texture caching issues, I’m hoping those will be hammered out as work on the framework progresses). One of the things I was really excited to play around with was particles. Everyone loves particle effects. At this last Flash on the Beach, Lee Brimelow gave a cool sneak peak at using this very slick looking UI to create some particle effects, export them as a .pex file, then use that .pex file in a separate project (I mentioned that briefly in my last post). Little did I know at the time, but Lee was using the Starling framework and the slick looking particle editor he was demoing was Particle Designer from SeventyOne Squared. Needless to say, I was quite disappointed to discover that Particle Designer was (a) for Mac’s only, and (b) a commercial piece of software (though it only costs a measly 8 bucks – kudos to 71 * 71 for offering quality software at that price).

Not to leave us Windows users high and dry, I decided to make my own editor which you are welcome to run freely from the browser here.

My version makes extensive use of Keith Peters’ MinimalComps and Justin Windle’s Simple Flash GUI Tool, so I find myself once again thanking those two for their generous contributions to the community.

TO USE THE PARTICLE EDITOR:

If you’re on a Mac, don’t. Use Particle Designer mentioned above instead, it’s much better and they deserve the support. If you’re not on a Mac, or you’d prefer a free web version, click on the screen shot below (of course you will need Flash Player 11 installed).

You’ll see the default particle you’re presented with is a little candle flame type of particle. By clicking and dragging in this black area to the left you can re-position the particle effect. Play around with the settings in the ‘Particles’ column to see what nifty effects you can come up with. The ‘Particle Behavior’ column has additional settings which are specific to the emitter type selected in the ‘Particles’ column. The last two columns adjust the color, color variance, and blend function of the particle.

To adjust the particle texture, click on the ‘Edit Texture’ button in the ‘General’ column. At the moment, the editor’s a bit lame, but it allows you to select from 3 presets (circle, blob, or star) or upload your own texture (textures are kept to a max of 64×64. If you upload anything larger it will be resized to that. It is best to create a texture with a width and height set to a power of 2 (i.e. 2, 4, 16, 32, or 64)). Incidentally, the ‘Custom’ texture in the drop down box will be empty until you upload your own. The new texture will not go into effect until you click on the ‘Done’ button.

If you plan on using your particle effect on a color other than black, click on the ‘Edit Background’ button to set the color of the area behind your particle. This color won’t be saved at all, but is useful for a preview.

And, speaking of saving, to save your particle effect, click on the ‘Export Particle’ button. This will allow you to download a .zip file called ‘particle.zip’. Inside that .zip file you’ll find a ‘particle.pex’ file and a ‘texture.png’ file. To use these in your own projects, simply embed the two files into a Starling project as you usually would. Download the Starling Particle extension (you’ll need this for any particle effects in Starling anyway) for some quick and easy examples. I also highly recommend reading the lengthy Starling manual available on the ByteArray blog. The last few pages go over how to use particle effects.

TODO LIST

Some things I would like to add this when I get some time: as mentioned earlier, the texture editor’s a bit lame. I wouldn’t mind a more fully functional editor that would allow you to paint your own textures in the application rather than upload one.

I would also really like to create a library of particle presets to browse through and edit as well as the ability to save your creations to that library to share with others. I suppose that depends on whether or not this thing actually gets used by anyone other than myself. In the meantime, if you do create something that you’d like to share, email me the created .zip file at webmaster [at] onebyonedesign [dot] com. If I get a good 5 or 10, I’ll create a library manually. If I get a whole freakin slew of the things, I’ll take the time to create a library that you can save to yourself.

Also, post some comments if you find any bugs or have any suggestions.

 

UPDATE 11OCT11

Thanks to a comment below, the editor now includes X and Y Emitter position variance controls for ‘Gravity’ type emitters.

UPDATE 15OCT11

It’s now possible to load .pex files. Keep in mind this won’t change the particle texture. At the moment that will still have to be changed separately, if you want to do so. There also isn’t a whole lot going on in the way of error checking, so you may or may not get some unexpected results or errors if the pex file isn’t what the app expected. If that happens, let me know and I’ll see what I can do to fix it.

I also utilized swffit for those with smaller screen sizes.

UPDATE 31OCT11

Added Tangential Acceleration (“Tan Acc”) to the Gravity Emitter behavior settings (I was also going to add Tangential Acceleration Variance, but some experimentation seemed to suggest that it didn’t actually do anything. I may be wrong and add it later).

Also happened to notice that there is a video tutorial over at gotoAndLearn.com showing how to use this Particle Editor then actually use the generated particles in a Starling Project. A huge thanks to Lee Brimelow for that.

UPDATE 05FEB12

Finally fixed user uploaded texture transparency bug.

UPDATE 06APR12

Updated to the most recent versions of Starling (1.0) and Starling Particle Extension from Github.

UPDATE 03JUN12

Included controls for particle rotation (start, start variance, end and end variance).

UPDATE 10JUN12

Added Tangential Acceleration Variance for gravity emitters. And for Radial emitters, allowed degrees per second to be a negative number (to spin in opposite direction). Radial Acceleration and Radial Acceleration Variance still seem to do nothing in Starling, yet.

UPDATE 31AUG12

Updated to Starling 1.2. Added Radial Acceleration and Radial Acceleration Variance (finally).

UPDATE 19JAN13

Updated to Starling 1.3. Open sourced entire project. Download it or branch it on GitHub.

UPDATE 21SEP13

Updated to Starling 1.4RC2. Published to Flash Player 11.5 using Air 3.8 (ASC2). Thanks to Jack Ront of All Play, No Work, .plist files can now be optionally included in output .zip (just tick the box next to the export button). For anyone  forking the github repo, I’ve done a major refactor – removing the Starling Master and Particle Extension libraries from my own repo (those will now have to be downloaded or forked separately) and adding the project classes to a onebyonedesign package.

UPDATE 04JAN14

Added a ‘Randomize’ button to spark some inspiration. The randomize button won’t change the emitter type or the blend functions, but all slider values will be set to a random position.

UPDATE 02AUG14

Updated to latest versions of Starling and Starling Particle Extension. Published .swf to Flash Player 14. Added support Minimum Radius Variance. Performed a major refactor on source (available on Github).

  Facebook   Pinterest   Twitter   Google+
stage3dstarling
  • Some Windchimes and More from FOTB
    September 26, 2009 · 4 comments
    2422
    5
    Read more
  • 3D Shell Game
    June 25, 2008 · 3 comments
    2247
    2
    Read more
  • FIS Athlone && Warbler Update
    April 05, 2009 · 0 comments
    2224
    2
    Read more
65 Comments:
  1. Great stuff, was looking for just this since I am on Windows. Any chance source could be made available so we could run it as an AIR app and not on the Web.

    Either way thanks a ton.

    Phil · October 01, 2011
  2. Thank you for the comments Phil. Not sure about releasing the source. I had to a bit of ‘hacking’ on both some Starling classes and Justin Windle’s Simple GUI to get everything to work the way I wanted. And aside from that it’s just a big mess. I may do an .air release of my own later though – that’s a good idea.

    Devon O. · October 01, 2011
  3. Hello,

    Very nice actually, thank you.

    One request:
    Could you please add controls for sourcePositionVariance x and y?

    Would be good for controlling rain and snow flakes ;)

    Antti · October 11, 2011
  4. Hey Antti,

    Not sure how I overlooked that. I’ll try to get it in this weekend. Thanks for the suggestion.

    Devon O. · October 11, 2011
  5. Thank you, looking forward to it :)

    Also, how about “Load” button for editing xml?

    Antti · October 11, 2011
  6. The X and Y variance is now added.. The load button was meant to be included in my TODO list. The trouble there is deciding whether or not I want to be fancy and allow loading custom particles, or take the easy way out and only allow loading the pex files. I suppose the latter would at least be a start.

    Devon O. · October 11, 2011
  7. That’s awesome, thanks!

    Antti · October 12, 2011
  8. Awesome work. If you’re like me then every time I create something like this the testing takes forever because I end up playing and becoming mesmerized by the visual patterns. 10 minutes later I remember I have code to write. :-)

    polyGeek · October 12, 2011
  9. Great work!! I love this!!

    JIAZI · October 12, 2011
  10. Hey polyGeek,

    I know what you mean. Aside from building and playing with this thing, I haven’t actually touched Starling. About time I actually sit down and make something. :)

    Devon O. · October 15, 2011
  11. Very cool. Thanks for sharing!

    Scottae · October 18, 2011
  12. hi, great work!
    I opened the .pex file on Particle Designer and it seems the “Emitter Angle” has a 180 degree offset.
    I would allow to edit values by hand on the textfields, because with scrollbars some values are impossible to achieve

    airnan · November 01, 2011
  13. Thanks for the browser version of your particle editor extension.

    When I uploaded a custom texture PNG (24-bit with alpha channel) it does not recognize texture alpha.

    Any ideas?

    BTW, an input area for the slider tools, would be a good idea for fine tune.

    Özgür ALTAY · November 14, 2011
  14. hey Özgür, sorry about the problems. Would it be possible to send over the png in question (or another one saved the same way) so I can do some tests. I agree some input tools might help out and may look at it later. I’ve actually been doing fine tuning by editing the output xml file, but I guess that kind of defeats the purpose.

    Devon O. · November 14, 2011
  15. thanks Devon,

    I’ve just sended (to your onebyonedesign.com) e-mail with attachments about the issue.

    Özgür ALTAY · November 15, 2011
  16. Just got the email, but it may not be until the weekend that I have some time to look into the problems.

    Devon O. · November 15, 2011
  17. Hi Devon,

    Thanks your editor is marvelous! I really like it. Can you possibly add a heart shape texture in the list to choose? I like to make some special effect for my love ones..;)

    I tried upload a texture myself but it seems always changes the texture background even I use no color as background.

    For example if I export the star particle.zip and then just upload the texture.png back to your screen, it then changes its background, is it a bug?

    thanks

    Nel

    Nel · February 02, 2012
  18. Hi Devon,

    Awesome, thank you.

    I’m also having the same issue with loading my own textures as it doesn’t recognise the alpha value, they are just pngs done if PS.

    As Nel said, if you export the star texture for example and reload it it doesn’t recognise the alpha anymore.

    Thanks,
    Greg

    Greg · February 04, 2012
  19. Hey Nel and Greg.

    I’ve had others complain about the transparency problems as well but being the lazy (oops – I mean busy) bastard that I am, I never got around to fixing it. It has finally been fixed now though. And in the spirit of Valentine’s Day, I’ve also added a heart as a default particle.

    Thanks to everyone who brought the bug to my attention – sorry it took so long for me to fix it.

    d.

    Devon O. · February 05, 2012
  20. Fantastic work – very useful. However i cant seem to create even the most basic explosion like effect – i’ve been tweaking everything but nothing resembling an explosion – starting in one point and expanding outwards. Any pointers would be greatly appreciated.

    fideldonson · March 27, 2012
  21. Hey fideldonson,

    Try using a gravity emitter, maybe bring down the max particles to around 200 or so, give it a short lifespan (maybe .5 or so), adjust the lifespan variance to taste (around 1.5), set the angle variance to 360, play around with the speed and speed variance and bump up the y gravity to around 150 or so, then play around with everything else. Of course the trick is getting the emitter to fire only once. I’m not sure if Starling has a built in one-shot particle effect (haven’t played with it for awhile), but I’m sure you can fake it fairly easily by starting the particle effect then, nearly immediately, stopping it. Hope that helps out some.

    d.

    Devon O. · March 30, 2012
  22. Hi Devon,
    I just wanted to tell you that I’ve found (and fixed) the problem that caused the particles in Starling to look different from the output of the 71squared Particle Designer sometimes. Since the output has thus changed, it would be great if you could update the PS code used in your preview.

    Thanks for the great work on that editor! =)
    Daniel

    PrimaryFeather · April 05, 2012
  23. Will do – thank you for the heads up…

    Devon O. · April 05, 2012
  24. This is a very cool tool. Thanks a lot for making this and putting it up!

    Any plans to include particle rotation in an upcomming build?

    Colin Northway · May 29, 2012
  25. Hey Colin,

    I didn’t even realize Starling currently supports particle rotation. Just updated. Thank you for the heads up.

    Devon O. · June 03, 2012
  26. Awesome tool, I’ve used it several times!

    Any plans to add Tangential Acceleration Variance, Radial Acceleration, and Radial Acceleration Variance? From what I can tell, those are the only particle behavior parameters that your tool lacks compared to Particle Designer.

    Thanks for your hard work!

    Pat · June 05, 2012
  27. Oh great! The update makes it even better!

    Colin Northway · June 05, 2012
  28. Thanks Colin.

    @Pat – you can see at one of my update entries I tried adding some of those things, but they didn’t do anything at the time. Starling’s been updated several times since though, so, yes, I’ll check it out this weekend – and if they’ve been implemented by Starling, I’ll add those last few modifiers.. Glad this thing proved to be useful..

    Devon O. · June 05, 2012
  29. Thanks for the latest updated, Colin!
    In theory, Starling should make use of tangantial and radial acceleration variance! http://goo.gl/0Bsrg — it was (accidentally) ignored in older versions, though.

    PrimaryFeather · June 10, 2012
  30. Incredible work! If there were any suggestions, it’d be:

    – option to manually type in values. Sometimes the sliders are a little finicky and I can’t get back to certain values, so it’d make it easier just to click the value field and type it in.
    – AIR version so that I can have the option of running it locally. I’m worried that I’ll start using this too much and one day it’ll disappear.

    Either way, thanks a lot for this tool. I’ve been mucking around with it and made some pretty decent looking effects that I might send you at some point.

    Tyler · July 09, 2012
  31. Just another shout-out that someone else out there loves and uses this tool. Great work. Thank you again!

    Aaron · July 10, 2012
  32. Is it possible to turn the Texture Smoothing off? (using nearest neighbor or something like that?)

    I would like to create particles with rougher edges to fit an 8-bit visual style. It looks like the texture is blurred too, but I assume that’s just because of the texture stretches, but I could be wrong!

    If you know of a quick work-around this problem I would appreciate your help! Thanks

    (Note: Not sure if my email subscribes to your replies, but if you can directly send me a reply to my email address that would be great.)

    Pierre Chamberlain · August 24, 2012
  33. Hey Pierre, Straight AGAL does allow for ‘nearest sampling’ with the tex operator (e.g. tex oc, v0, fs0 )

    Now how that can be reached through Starling, I’m not entirely sure. I do know that it was just recently announced that Starling will support custom filters, so what may be a possibility is to write a filter / shader that creates that 8-bit style (should be fairly simple process, and look, there’s one here: http://wonderfl.net/c/l43h ) and apply it to the entire project. So, that’s an idea, anyway..

    Devon O. · August 30, 2012
  34. Hi

    Exporting from the app doesn’t work for me in Chrome 22.01 works fine in FireFox 14. Anyone else getting this?

    Ollie · September 04, 2012
  35. Hey Ollie. Sorry for the difficulties.. I’m currently using Chrome 23.0.1251.2 dev-m and it works fine for me. I know that doesn’t help you much, but it may just be the Chrome release..

    Devon O. · September 04, 2012
  36. Any chance you could open source this?? I’d love to build a more full featured AIR version of this, with support for multiple projects and a list of existing effects, but before starting I’ love to get that whole right-hand of GUI :D

    Shawn · December 19, 2012
  37. I´d like to know if it is open source… can I help to develop it?

    ricardo mello · January 15, 2013
  38. For all those asking about open sourcing this – I will eventually. Just need to clean it up a bit then I’ll throw it up on github and you can take it from there. Just give me a week or so.. :)

    Devon O. · January 15, 2013
  39. Just a little bug report, sry, i didnt find your mail.
    If i change ‘Lifespan’ then EmissionRate is not updated.
    It’s only updated by changing ‘Max Particles’.

    Neto · January 20, 2013
  40. So I have no doubt I am doing something wrong, but I was trying to create a particle that was essentially the texture that is uploaded with no blending or alpha on a white background? I can’t seem to figure out what I need to do. Every time I set the blendmode options the closest I can get renders the texture with a black box around it.

    Max · January 23, 2013
  41. Hey Max,

    It’s usually hit or miss for me as well and I just play until I get what I want. Have you tried SOURCE_ALPHA, and ONE_MINUS_SOURCE_ALPHA though? In theory that should keep the particle’s alpha but leave everything else the same. In theory…

    Devon O. · January 23, 2013
  42. It seems that no matter how I set the blending it seems to either invert the transparency or just makes everything black. LOL. No worries though I have quite a few very nice particles I have created with this exceptional tool. A fantastic job with all of this. Worst case Ontario I will just make my backgrounds a bit darker if I have to. =)

    Max · February 04, 2013
  43. Hi Devin O,

    Not sure if this happens for everyone, but I think I found a bug. After hitting Export Particle and saving out a .zip file, extracting the .pex file and loading it back in, the following fields are not being imported. Tan. Acc. Var, Rad. Acc, and Rad Acc. Var.

    Also would be great if it automatically saved out a .zip. As in Chrome it saves out a file with no extension unless you manually add the .zip.

    Thanks for the great tool. Keep up the great work.

    James · March 13, 2013
  44. Hey James,

    Thank you for that info. I’ll check into that this weekend.

    d.

    Devon O. · March 13, 2013
  45. Hey James,

    Those 3 variables have been fixed. I can’t reproduce the ‘.zip’ extension bug (even in Chrome). Thanks again for the info and the kind words.

    d.

    Devon O. · March 17, 2013
  46. Hey James,

    Thank you very much for the great tool.

    Is it possible to add a text box where I can input the parameters directly?

    I know it’s too much for a free user to ask for this, but thank you if you can make it happen :)

    =L33= · April 12, 2013
1 2 Next »

Leave a Comment! Cancel reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

Devon O. Wolfgang

AIR | Unity3D | AR/VR

Unity Certified Developer

Technical Reviewer of “The Essential Guide to Flash CS4 AIR Development” and “Starling Game Development Essentials”

Reviewer of “The Starling Handbook”

Unity Engineer at Touch Press.

Categories
  • Actionscript (95)
  • AIR (16)
  • Flash (99)
  • Games (7)
  • Liberty (13)
  • Life (53)
  • Shaders (20)
  • Unity3D (21)
Recent Comments
  • MainDepth on Unity Ripple or Shock Wave Effect
  • Devon O. on Unity Ripple or Shock Wave Effect
  • Feral_Pug on Unity Ripple or Shock Wave Effect
  • bavvireal on Unity3D Endless Runner Part I – Curved Worlds
  • Danielius Vargonas on Custom Post Processing with the LWRP
Archives
  • December 2020 (1)
  • December 2019 (1)
  • September 2019 (1)
  • February 2019 (2)
  • December 2018 (1)
  • July 2018 (1)
  • June 2018 (1)
  • May 2018 (2)
  • January 2018 (1)
  • December 2017 (2)
  • October 2017 (1)
  • September 2017 (2)
  • January 2017 (1)
  • July 2016 (1)
  • December 2015 (2)
  • March 2015 (1)
  • September 2014 (1)
  • January 2014 (1)
  • August 2013 (1)
  • July 2013 (1)
  • May 2013 (1)
  • March 2013 (2)
  • December 2012 (1)
  • November 2012 (1)
  • September 2012 (3)
  • June 2012 (2)
  • May 2012 (1)
  • April 2012 (1)
  • December 2011 (2)
  • October 2011 (3)
  • September 2011 (1)
  • August 2011 (1)
  • July 2011 (1)
  • May 2011 (2)
  • April 2011 (2)
  • March 2011 (1)
  • February 2011 (1)
  • January 2011 (2)
  • December 2010 (3)
  • October 2010 (5)
  • September 2010 (1)
  • July 2010 (2)
  • May 2010 (5)
  • April 2010 (2)
  • March 2010 (7)
  • February 2010 (5)
  • January 2010 (5)
  • December 2009 (3)
  • November 2009 (1)
  • October 2009 (5)
  • September 2009 (5)
  • August 2009 (1)
  • July 2009 (1)
  • June 2009 (2)
  • May 2009 (6)
  • April 2009 (4)
  • March 2009 (2)
  • February 2009 (4)
  • January 2009 (1)
  • December 2008 (5)
  • November 2008 (2)
  • September 2008 (1)
  • August 2008 (6)
  • July 2008 (6)
  • June 2008 (9)
  • May 2008 (4)
  • April 2008 (3)
  • March 2008 (4)
  • February 2008 (9)
  • January 2008 (7)
  • December 2007 (6)
Copyright © 2021 Devon O. Wolfgang