2
$\begingroup$

I have created a particle system that spawns from an object over time.

cube objects are particle emissions

Here is the .blend file http://blenderartists.org/forum/showthread.php?352210-3Pointedit-Sketchbook&p=2827061&viewfull=1#post2827061

But to spawn cubes from vertices over time I have to use a gradient texture on an object that is UV unwrapped. Which means that i have to use a plane as the particle emitter. This creates problems when I emit from another particle system to create the red balls. I end up emitting from both of the vertices at that location, creating 2 red balls in one spot (to fix this I reduce the balls but there aren't enough to fill the emitter length).

Can I apply a texture to a mesh that has no faces (thus eliminating extra verts I don't want)? Are there any other ways to emit a particle system over time?

I want to keep the system simple and attached to one emitter object, so that it can scale easily.

$\endgroup$
  • 1
    $\begingroup$ So your animation looks the way you want but you want to make it more flexible, to be able to expand it to more points? What if used a python script to create the animation from a list of points? $\endgroup$ – sambler Mar 2 '15 at 12:14
  • 1
    $\begingroup$ Infact it doesn't work correctly, because I must use a second particle system to generate the red balls I end up with to many red balls at the vertices points. To get close to the correct number I actually have to use (number of vets) - 1, which results in not enough red balls. For example. I was wondering if I could use the Animation Nodes addon to generate this setup, but theres not great docs with its rapid development. $\endgroup$ – 3pointedit Mar 2 '15 at 12:48
  • 1
    $\begingroup$ Starting with a copy of your sample file, delete all but the Sphere and Cube that you have setup, then paste this script into a text block and run it. Is it close to the animation you want? $\endgroup$ – sambler Mar 2 '15 at 20:28
  • $\begingroup$ OMG, thank you so much! I appreciate the commenting in the script very much. I guess the "mainpoints" are fixed but could be variables based on user placement? I wonder if I can create a UI for a setup (place "mainpoints") and refinement (alter particle variables etc)? $\endgroup$ – 3pointedit Mar 3 '15 at 2:19
  • $\begingroup$ If you need help adjusting any of it just ask. most of the particle system options you can just 'copy the data path' and paste it after the pset. to set it. $\endgroup$ – sambler Mar 3 '15 at 3:56
2
$\begingroup$

Instead of trying to get one particle system to emit in the right places you can add a new red sphere in the place and animate the visibility of it. The particle system on each sphere can also be set to emit at a specific frame. You can then add one curve object with a hook to animate the line linking each node together.

You can automate this task with a python script, with a list of data setup at the start you can easily adjust where the points are created. The script I created is a bit longer than expected so I will leave the whole thing available on gist.github.

The key points in the script are starting with a list of data for each point

mainpoints = [
    [  1,  8, (-2.605,  0.796,  2.531)],
    [ 29, 10, (-1.228, -1.007, -0.235)],
    [ 58,  8, ( 1.917,  0.060,  1.495)],
    [ 75,  8, ( 3.430, -2.621,  1.495)],
    [ 92, 10, ( 1.296, -6.226,  2.644)],
    [110,  8, (-2.013, -4.600,  0.311)],
]

Each line is an array containing the frame, number of particles and location of each red sphere you want to generate. This can easily be altered or expanded for each project you do.

Next we setup a few variables that define what object gets replicated at each point and used for particles, then some particles options that you may want to adjust each time.

The rest of the script simply loops through each item in the mainpoints array and creates each item and adds the particle systems for each one. Then it creates a curve and animates the hook to travel to the next location. Along the way locations are keyframed so things are in the right position when they need to be.

Any settings for the particle system can be added to the script and some variables can be set at the top of the script as I have done for easy adjustment.

Edit:

I just revised the script. In revision 3 the script scans objects with a name starting with 'data-' and then takes two numbers from the name, the first is the frame to show and the second is the number of particles to emit. This replaces the rigid list of data and allows a visual placement of each point. The earlier revision can be accessed at the above link if it is desired.

$\endgroup$
  • $\begingroup$ Whoa thank you again. I really appreciate the rewrite, It's really flexible now. i see that you added the additional particle systems for trailing lines too. I was considering how to add a second tier of node spawning. Instead of looping inside the current script I will just regenerate another instance... I hope that I wont conflict with items generated the first time? $\endgroup$ – 3pointedit Mar 3 '15 at 8:06
  • $\begingroup$ I've just realized that the empties, or 'data' array inputs, will get confused when I add a second tier won't they... hmmm. I guess I can delete the first ones as they won't be reused. $\endgroup$ – 3pointedit Mar 3 '15 at 8:14
  • $\begingroup$ If you put the 'data points' and original items on another layer it makes it easy to select everything else and delete them to rerun the script. They are all generated so no harm deleting to rerun the script. $\endgroup$ – sambler Mar 3 '15 at 8:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.