Cinema 4D Tutorial – Multiple Object Particle Emission

Emit into multiple

Emit into multiple objects

Here is a setup that you can use when working with Thinking Particles and emitting into objects. This setup allows you to emit particles from multiple objects but only using one emitter. The principle is as follows…

You basically iterate through a list of objects. Then pass these objects into the volume position node, the result being that the particles are then placed into each object from the list. There is also included a simple method of enabling or disabling the objects from being included. Therefore you can control which objects have particles inside or not on a per object basis.

The great thing about a setup like this is that it is fairly simple to use and expand. It is easy to adjust the particle emitter as you are only using one emitter, yet it is quite powerful because it allows you to emit particles into an infinite number of objects. Well ok, perhaps not infinite, but you can certainly emit into hundreds if not thousands of objects with relative ease.

If you look at the screenshot above it may look like the particles are all in the same mesh, but each letter of the logo is an independent object. This means each letter can be transformed, textured and animated individually. Yet all the particles are generated with one emitter.

Anyway enough of this banter, how does it actually work?

Xpresso Setup

Xpresso Setup

Here is a screenshot of the Xpresso setup. The first node is the Object List node. You can find this by right clicking in the Xpresso window and choosing
New Node > Xpresso > Iterator > ObjectList

Object List Node

Object List Node

This node is really handy as it allows you to drag any objects from your scene into the Iteration List field and it will then iterate through the list. In other words it will output the object for every object in the list. It doesn’t matter where in the object manager hierarchy these objects are, so they don’t all need to exist in the same hierarchy. If you do want to add multiple objects by shift or control clicking to select your objects, remember to lock the attribute manager with the ObjectList parameters visible before you start clicking in the object manager to select your objects. If you don’t, you’ll lose the Iteration List field and will have to go back and select the ObjectList node in your Xpresso window again.

Iteration List

Iteration List

The next node along is a simple object node. Link the Instance output into the object node Object input port. If you drag one of your objects into the Xpresso window it will automatically add the Object node for you. You can see I dragged the ‘L’ object into my setup.

To emit particles we will use the most basic of all the TP generators. We would like to create particles and we are not really bothered about speed, position etc at this point in the setup. ThePBorn node is found under…
New Node > Thinking Particles > TP Generators > PBorn

 

PBorn

Add the PBorn node

Next we need to place our particles into each of the objects. To do this we can use the PVolumePosition node.
New Node > Thinking Particles > TP Helper > PVolumePosition

 

PVolumePosition

Add the PVolumePosition node

The PVolumePosition node allows us to specify an object volume that we would like to use with our particles. So you could link an object node output port into the PVolumePosition Object input port. However we want to iterate through our list, so we will link the ObjectList Instance output into this port instead. This in itself will not place the particles into the objects. We need to explicitly define the particles we would like to affect and what we would like to do to them. We use the PSetData node for this, which can be found under
New Node > Thinking Particles > TP Standard > PSetData

PSetData

Add the PSetData node


First of all you drag the Particle Birth from the PBorn node into the PSetData Particle input port. This tells the node that these are the particles we would like to affect. We then drag the PVolumePosition Position output and link it into the PSetData Position input port. Basically saying that we would like to place our particles into the positions that are defined by the PVolumePosition node.

So in a setup where you use one object, this would all work fine now. If you have been building the setup as you read through this, then press play and you will probably see all your particles being created in the first object that you placed into the ObjectList. It seems that it isn’t iterating through the list. So at this point we can employ a new trick which offers another benefit as well. We need to force the PBorn node to refresh on each frame. By default the PBorn node is on. If we link our iteration through the On port of the node it will check this port for every frame as the ObjectList iterates through each object. The trick I chose to use for this was to link the Xray checkbox into the PBorn On port. By doing this we have the added benefit of including or excluding objects from the setup depending on the state of the Xray checkbox. Of course you don’t need to use the Xray checkbox, you could add some userdata and link that to the On port.

XRay

The Xray checkbox

In my setup the Object from the ObjectList is passed through the Xpresso, the Xray checkbox is evaluated, the particles are created and the same object is passed into the PVolumePosition and the particles are placed there. The objects are of course iterated through, so this happens for all the objects in the list. This is then repeated.

Xpresso Setup

Xpresso Setup

So as you can see a nice simple setup with a great workflow and lots of potential. Certainly saves creating an emitter for every object you’d like to place particle into. Now what you do with those particles is entirely up to you.

If you’d like to download the sample scene I created which demonstrates this then click here. It was made in 11.5, but should be fine in r11 and r12 too. Have fun!


Cinema 4D Tutorial – Multiple Object Particle Emission

Author: Tim

18 Comments

  1. Bobby
    Bobby On March 22, 2011 at 12:53 PM

    Excellent post Tim! You truly prove that you are one of the three elite C4D guru’s on the scene today!

    I had a question regarding texturing the particles. I am thinking somehow the ‘Pborn’ node will need to be textured, but as it isn’t included in the object list how does one go about texturing the particles within Xpresso?

    Thank you!
    Bobby

  2. Alex Czetwertynski
    Alex Czetwertynski On March 22, 2011 at 3:08 PM

    Great tip!
    One thing to add is that this will only work if objects have been converted to polygons…
    I thought that if they were in their primitive state, there would be at least one particle created per object, but it seems like there is only one particle created, and that is for the object used to create the “Object” node in the Xpresso editor.
    Why is that?

    Thanks Tim!
    Alex

  3. Tim
    Tim On March 22, 2011 at 3:19 PM

    @Alex I believe this is because TP needs polygons or at least points to create the Volume from. When you use parametric objects there is no geometry. I was actually shown a neat trick today by a guy called Derya Öztürk which misuses the Correction Deformer combined with the Connect object so that you can generate particles within parametric objects. Perhaps something worthy of a post of it’s own?

  4. Alex Czetwertynski
    Alex Czetwertynski On March 22, 2011 at 3:23 PM

    Right, but in this case I have say, 4 objects in my link list. So in this case TP is only seeing one object, and creating one particle for it..I would have thought it would have created at least one particle per parametric object, since, in my understanding, a parametric object is the equivalent of one primitive…but I might be wrong there.

    The correction deformer is amazing! Finally a solution to actually keep objects “live” in C4d… I would love to know more about it in connection with the Connect object…

    Thanks again for the great tips

    Alex

  5. Tim
    Tim On March 22, 2011 at 3:59 PM

    I’m unsure of the real technical reason, but it is to do with the PBorn node only taking the matrix from the first object. I’m not sure without messing why it doesn’t iterate through the list, the refresh of the PBorn node is missing for each object iteration. I’m sure I could solve it, but I think there are easier ways to achieve this…

    For example, if you wanted to use the axis of multiple parametric objects as emitters you can do it quite easily with PStorm. Link the ObjectList into an Object node and then link up the Global Position and Matrix to the PStorm node position and alignment. See this scene for an example

    http://www.luxx.com.au/blog/downloads/helloluxx_tp_emitmultiple02.zip

  6. […] site with full post here: LINK Comments RSS Feed   Both comments and trackbacks are currently closed   Share on […]

  7. Alex Czetwertynski
    Alex Czetwertynski On April 4, 2011 at 6:57 PM

    TIm, I found this tip, related to your suggestion of using the Correction deformer. Seems like you don’t even need a connect object…
    http://www

  8. c1p0
    c1p0 On April 24, 2011 at 7:19 PM

    Hi!

    Awesome tip, never thought of something like this. I tried to figure out a way, so i could use a condition node before the pborn, but it works unstable 🙁 I spent 3 nights, no results yet.

  9. Thomas
    Thomas On April 26, 2011 at 9:31 PM

    Am I doing something completely wrong. When I add a pVolumePosition node I don’t get the port descriptions to show and I can’t get the tutorial to work. The version that is provided as a download works, however.

    Is anyone else (not) seeing the same thing?

    Weird…

  10. Thomas
    Thomas On April 26, 2011 at 9:34 PM

    I am an idiot. I forgot to check “xray” for each object so now I get the particles. However, still no labels for the ports in the pVolumePosition node. I’ll report this to maxon.

    • Tim
      Tim On April 26, 2011 at 9:46 PM

      @Thomas Right Click on the node and choose Ports > Show Names. Some of the nodes have the port names hidden so that you can see the linked object directly in the Xpresso window.

  11. Thomas
    Thomas On April 26, 2011 at 9:53 PM

    @Tim Thanks! That did the trick. I learn something new every day 🙂

  12. Kevin
    Kevin On November 29, 2012 at 4:38 AM

    This is a great tut. Thanks! I’m using a PSurface Position and am trying to get the particles that emit to inherit the velocity of the geometry. Right now they just emit and stay static. I tried PMotion Inheritance and PPosition follow, but it doesn’t seem to understand the object list. Any ideas?

  13. Jeff
    Jeff On December 25, 2012 at 6:16 AM

    Ok, I’m trying this with two sweep nurbs as my geometry, I’ve tried this from scratch, and also just to replace the object list from the example file with my objects. I’ve tried the nurbs flattened into polys… still no luck. I cannot get the particles to emit from my sweep nurbs geometry. I really need some help because I’m stuck and have to try and get this working. Does anyone know if there’s something about R13 that is different enough to “break” this? I’m realllly not very good with xpresso so diagnosing this is nearly impossible for me on my own. Please advise. 😀

    • Tim
      Tim On January 15, 2013 at 11:49 AM

      Did you try connecting the separate parts (caps, rounding, etc) from the sweep nurbs once you had made the object editable?

  14. Dima
    Dima On October 5, 2014 at 11:51 AM

    Hello, Tim.
    Thank you for this tutorial. I have one question. This technic works good with static objects, but what about animated or dynamic ones. It doesn’t seem to work with those. Any ideas on how to make it work?
    Thank you in advance.

  15. #digital murmuration | On October 22, 2015 at 7:34 AM

    […] Cinema 4D Tutorial – Inheritance Effector & Particle Morph – YouTube Cinema 4D Tutorial – Multiple Object Particle Emission […]

Leave a Reply