The Generator object is responsible for generating objects in the scene. This is needed because the Emitter object only generates and manipulates particle data. If you want objects to be associated with those particles, you will need to add a Generator object.
What can be generated?
The Generator will generate almost any kind of object, though some are excluded. For example, it doesn't make much sense to generate multiple Sky objects, so X-Particles won’t let you do that. Nor will it generate objects such as particle modifiers, since these have no effect on the scene (this is a restriction within Cinema 4D, not X-Particles).
For any valid object create the object and make it a child of the Generator object. Then ensure that 'Draw Mode' is set to 'Geometry Only' or 'Geometry and Particles'. Playing the animation will now generate multiple copies of the child object(s).
Note that if you turn on object generation, but the Generator doesn't have any valid child objects, nothing will be generated at all. You may not even see particles in the editor, depending on the setting in 'Draw Mode'. It’s up to you to make sure that there is a valid child object or objects to generate.
What if the generator has more than one child object? There are several options to handle this. For more details, please see the 'Use Multiple Child Objects' section below.
The object's interface includes these sections:
For the 'Groups Affected' tab, and for the buttons at the bottom of the interface, please see the 'Common interface elements' page.
For objects to be generated from particles, you must tell the Generator which emitter it will work with. Drag an emitter object into this field to do that. Until you have done so, you will not be able to access any of the other settings in the Generator.
Click this button to create a new emitter and add it to the 'Emitter' link field.
Objects From Particle Birth
If this switch is checked, an object will be generated for each particle as soon as it is created. If it is unchecked, no object will be generated for newly-created particles until this switch is checked again, or until object generation for a particle is turned on by an Action.
You should normally leave this switch checked unless you are sure you want to turn it off.
Use Multiple Child Objects
This setting determines how the generator will deal with more than one child object. The drop-down menu has five settings:
- Sequentially [default setting]: for each particle the Generator will generate one of its child objects in turn. In other words, if you have a Generator with three child objects - a cube, a sphere, and a cone - the first particle will generate a cube, the second a sphere, the third a cone, the fourth a cube again, and so on.
- Randomly: for each particle the Generator will choose one of the child objects at random.
- First Child Only: the Generator will ignore other child objects and just generate the first valid child.
- Choose by Index: in this mode, you can choose which child object is to be generated. The first valid child is given the index of 1, the second is 2, and so on. This may not appear to be a very useful mode, but the great advantage is that you can change the object generated with an Action, so when a particle satisfies the required criteria it can be made to generate a different object.
- Assign by Group: child objects are assigned to each particle according to the particle's group. For example, group 1 particles are associated with the first child object of the generator, group 2 particles with the second child object, etc.
Index of Child Object to Generate
This is only available if you select 'Choose by index' from the 'Use multiple child objects' drop-down. It's up to you to make sure the index is valid. If the Generator only has two child object and you enter a '3' here, nothing will be generated.
The seed value for the random selection of objects when you select 'Randomly' from 'Use Multiple Child Objects'.
This drop-down lets you choose how the clones of the child objects are generated. 'Straight Clone' generates full copies, as if you duplicated the object in the object manager. 'Instances' generates Cinema 4D instances, while 'Render Instances' generates, well, render instances. Details of instances and render instances can be found in the Cinema 4D documentation.
Note that there is a small issue if you select render instances. In this case the source object which will be cloned will remain visible in the scene and will be rendered. This is due to internal workings of Cinema 4D. A simple workaround is to position the source object off screen in such a position that it will never appear in the rendered image.
This determines what the Generator shows in the editor and at render time. It has four settings:
This will turn off the editor display of the particles. This is because it can be distracting to see the particles and objects in the editor at the same time, especially in wireframe views.
Geometry will not be displayed and only the particles are shown. This is very useful if you are caching a scene which generates a lot of geometry. Because Cinema is quite slow in drawing multiple objects on screen, caching a lot of particles with geometry is also slow, as the geometry is shown in the editor. You can use this setting to generate the cache, then reset the drop-down menu to one that produces geometry before you render the cached scene.
Geometry and Particles
Both objects and particles are displayed.
Geometry on Render Only
With this setting, geometry will not be generated in the editor (so speeding up the viewport) but will automatically be generated when rendering to the picture viewer. This is a convenience setting so you don't have to remember to switch object generation on and off when creating a scene or rendering it.
Caution: if you select this option, then cache the scene, no geometry will be rendered in the picture viewer. This is because the generator will be cached when it is not producing any geometry, so nothing will be rendered. There are two solutions to this:
- don't cache the generator (turn generators off in the cache object's 'Inclusion' tab, or drop the generator into the 'Exclude' list)
- use an option other than 'Geometry on Render Only'
Suppose you are generating a sphere whose radius is keyframed to increase from 0 to 100 over a number of frames. If 'Animate' is checked, when a new sphere is generated its initial radius will be 0 and will increase to 100 as the particle gets older. If 'Animate' is off, then for a new sphere generated at (for example) frame 30, it will have the radius of the original sphere at 30 frames. Normally you would leave this switch on but it can be turned off if desired.
Note: for this to work the object must be animated using PLA animation. Using deformers or expressions such as the Pose Morph tag will not work. This is a limitation of Cinema 4D itself, not of X-Particles.
Scale and Variation
The Scale value determines how fast the object will be animated. For example, if you have an animated bird flapping its wings, a scale of 200% will cause the wings to flap twice as fast as normal. If you add some variation, the objects will be animated at different speeds.
Random Offset and Offset
By default, all animated objects will be animated from the same point in the scene. What this means is that all objects will appear to have the same animation - so birds will all flap their wings in unison, for example. That might be what you want, and if so, you can adjust the starting point by altering the 'Offset' value. Often, however, you will want the objects to be animated from different starting points from each other, which gives a more natural effect. To do this, check the 'Random Offset' switch.
Scale, Rotation and Offset quicktab
Offset and Variation
By default the generated object is given the same position as its source particle. If desired, you can offset the object from the particle using these two parameters.
The size of the generated objects can be set in one of four ways from this drop-down:
The scale of the particle will be used to scale the geometry. By default particles have a scale of 1, so with this option the generated object will have the same size as the source object, unless the particle scale is changed.
This option will scale the object size up or down to match the particle radius.
Important: with this option, the Generator uses the bounding box size of the original object to calculate the generated object's scale. If the bounding box has zero size, the scale will be set to zero. This can be seen with lights, for example, which by default have a scale of 1 on all axes but a size of zero (you can see these values in the Coordinates manager and the Coord. tab of the light object). If you use a Generator object to generate lights therefore, you must choose an option in this menu of something other than 'Particle Radius' to set the scale.
Source Object Scale
The generated object will have the same scale as the source object regardless of the particle scale.
With this option you can set the generated object's scale from the Generator object. Values are given in the 'Object Scale' setting and variation can be added with the 'Variation' setting.
Object Scale and Variation
These are used when the 'Scale Using' parameter is set to 'Set Scale'.
This drop-down determines how the generated object is rotated. It has three options:
The object rotation is set to the rotation of the particle (note: particle rotations MUST be enabled in the emitter for this to work).
The object rotation can be set from the Generator object using the 'Rotation' and 'Variation' fields.
Source Object Rotation
The generated object will have the same rotation as the source object regardless of the particle rotation.
Offset Particle Rotation
With this setting, the object rotation is set to the rotation of the particle, plus an offset given in the 'Rotation' and 'Variation' fields. (Note: particle rotations MUST be enabled in the emitter for this to work.)
Rotation and Variation
These fields are used when 'Rotate Using' is set to 'Set Rotation' or 'Offset Particle Rotation'.
Object Morphing quicktab
The settings in this section are used to control object morphing. For full details of how they are used, see the 'Morphing objects' page.
Uncheck this switch to disable morphing.
Drag into this list any objects you wish to use as morph targets. Each object MUST also be a child object of the Generator object.
Morph Target Index
The index of the object in the list you wish to morph to. This starts at 1 (the first object in the list). It is up to you to make sure that the index is a sensible one. If you set it to '3' and there are only two morph targets in the list, no morphing will occur.
This is the amount of morphing that will take place. Normally this is set to 100% - that is, a complete morph from the initial object to the morph target. But it can be reduced for an incomplete morph if desired.
This adds some random variation to the 'Morph Maximum' setting so that the generated objects can show different amounts of morphing if desired.